diff options
author | Simon Ser <contact@emersion.fr> | 2020-11-02 12:11:51 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-11-03 08:09:54 +0100 |
commit | ee43ef3c9d783c832a9b93fbcb9c1fb8c092f196 (patch) | |
tree | c19a14a144f03fac2574af60ba81f3bff020d405 /backend | |
parent | f0ddcd361ea8b20b0a5da8effc30d8c51540f948 (diff) |
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.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 03cd9318..2644014c 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -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; } |