backend/drm: fix "a page-flip is already pending" errors on modeset

When performing a modeset, the DRM backend will request a page-flip
event. However frame_pending wasn't set to true, so any subsequent
wlr_output_schedule_frame calls would imemdiately trigger a synthetic
frame event, asking the compositor to submit a new frame. Committing the
new frame fails with "a page-flip is already pending" error in the DRM
backend.
master
Simon Ser 4 years ago
parent f0ddcd361e
commit ee43ef3c9d

@ -373,6 +373,12 @@ static bool drm_crtc_page_flip(struct wlr_drm_connector *conn) {
}
conn->pageflip_pending = true;
// wlr_output's API guarantees that submitting a buffer will schedule a
// frame event. However the DRM backend will also schedule a frame event
// when performing a modeset. Set frame_pending to true so that
// wlr_output_schedule_frame doesn't trigger a synthetic frame event.
conn->output.frame_pending = true;
return true;
}

Loading…
Cancel
Save