Fix TTY switching after failed failed repaint with legacy mode set.

Reported in !179 adding weston_output_repaint_failed resets the output

Co-authored-by: Daniel Stone
Co-authored-by: Julius Krah
Signed-off-by: n3rdopolis <bluescreen_avenger@verizon.net>
dev
nerdopolis 3 years ago committed by n3rdopolis
parent a822afaaef
commit d2a320d53e
  1. 8
      libweston/backend-drm/kms.c
  2. 4
      libweston/backend.h
  3. 9
      libweston/compositor.c

@ -1271,6 +1271,14 @@ drm_pending_state_apply(struct drm_pending_state *pending_state)
if (ret != 0) { if (ret != 0) {
weston_log("Couldn't apply state for output %s\n", weston_log("Couldn't apply state for output %s\n",
output->base.name); output->base.name);
weston_output_repaint_failed(&output->base);
drm_output_state_free(output->state_cur);
output->state_cur = drm_output_state_alloc(output, NULL);
b->state_invalid = true;
if (!b->use_pixman) {
drm_output_fini_egl(output);
drm_output_init_egl(output, b);
}
} }
} }

@ -161,6 +161,10 @@ void
weston_output_finish_frame(struct weston_output *output, weston_output_finish_frame(struct weston_output *output,
const struct timespec *stamp, const struct timespec *stamp,
uint32_t presented_flags); uint32_t presented_flags);
void
weston_output_repaint_failed(struct weston_output *output);
int int
weston_output_mode_set_native(struct weston_output *output, weston_output_mode_set_native(struct weston_output *output,
struct weston_mode *mode, struct weston_mode *mode,

@ -3215,6 +3215,15 @@ out:
output_repaint_timer_arm(compositor); output_repaint_timer_arm(compositor);
} }
WL_EXPORT void
weston_output_repaint_failed(struct weston_output *output)
{
weston_log("Clearing repaint status.\n");
assert(output->repaint_status == REPAINT_AWAITING_COMPLETION);
output->repaint_status = REPAINT_NOT_SCHEDULED;
}
static void static void
idle_repaint(void *data) idle_repaint(void *data)
{ {

Loading…
Cancel
Save