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.
This commit is contained in:
Simon Ser 2020-12-25 11:12:21 +01:00
parent 576ff57db0
commit adfb7cd35a
2 changed files with 18 additions and 14 deletions

View file

@ -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(