From adfb7cd35a364cfbb197720bbb821ccd3c22a613 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 25 Dec 2020 11:12:21 +0100 Subject: backend/drm: stash pending page-flip CRTC wlr_drm_connector.crtc may be updated by the DRM backend while a page-flip is pending. In this case, the page-flip handler won't be able to find the right wlr_drm_connector from the CRTC ID. Save the CRTC when performing a page-flip to ensure we always find the right connector when we get the event. --- include/backend/drm/drm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h index 3f2215fb..c3391dcf 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm/drm.h @@ -129,13 +129,14 @@ struct wlr_drm_connector { struct wl_list link; - /* + /* CRTC ID if a page-flip is pending, zero otherwise. + * * We've asked for a state change in the kernel, and yet to receive a * notification for its completion. Currently, the kernel only has a * queue length of 1, and no way to modify your submissions after * they're sent. */ - bool pageflip_pending; + uint32_t pending_page_flip_crtc; }; struct wlr_drm_backend *get_drm_backend_from_backend( -- cgit v1.2.3