drm: always check the repaint_status in update_complete

Initially finish_frame() was never called in drm_output_update_complete() for
'dpms_off_pending = true'. This is wrong for repaint_status ==
REPAINT_AWAITING_COMPLETION and that was fixed in
68d49d772c ("compositor-drm: run finish_frame when
dpms is turned off in update_complete").
However finish_frame() may now be called for repaint_status !=
REPAINT_AWAITING_COMPLETION, which is not allowed and results in a failed
assertion.

Fix this by checking dpms and repaint_status unconditionally.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
dev
Michael Olbrich 4 years ago
parent 5130a8c21a
commit d70e712c2f
  1. 3
      libweston/backend-drm/drm.c

@ -306,7 +306,8 @@ drm_output_update_complete(struct drm_output *output, uint32_t flags,
output->dpms_off_pending = false;
drm_output_get_disable_state(pending, output);
drm_pending_state_apply_sync(pending);
} else if (output->state_cur->dpms == WESTON_DPMS_OFF &&
}
if (output->state_cur->dpms == WESTON_DPMS_OFF &&
output->base.repaint_status != REPAINT_AWAITING_COMPLETION) {
/* DPMS can happen to us either in the middle of a repaint
* cycle (when we have painted fresh content, only to throw it

Loading…
Cancel
Save