mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
backend/drm: introduce page-flip tracking struct
Introduce a per-page-flip tracking struct passed to the kernel when we request a page-flip event for an atomic commit. The kernel will pass us back this pointer when delivering the event. This eliminates any risk of mixing up events together. In particular, if two events are pending, or if the CRTC of a connector is swapped, we no longer blow up in the page-flip event handler. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3753
This commit is contained in:
parent
c9c9dd6a5b
commit
3b53d1cbf1
6 changed files with 76 additions and 47 deletions
|
|
@ -12,6 +12,7 @@ struct wlr_drm_connector;
|
|||
struct wlr_drm_crtc;
|
||||
struct wlr_drm_connector_state;
|
||||
struct wlr_drm_fb;
|
||||
struct wlr_drm_page_flip;
|
||||
|
||||
// Used to provide atomic or legacy DRM functions
|
||||
struct wlr_drm_interface {
|
||||
|
|
@ -19,8 +20,8 @@ struct wlr_drm_interface {
|
|||
void (*finish)(struct wlr_drm_backend *drm);
|
||||
// Commit all pending changes on a CRTC.
|
||||
bool (*crtc_commit)(struct wlr_drm_connector *conn,
|
||||
const struct wlr_drm_connector_state *state, uint32_t flags,
|
||||
bool test_only);
|
||||
const struct wlr_drm_connector_state *state,
|
||||
struct wlr_drm_page_flip *page_flip, uint32_t flags, bool test_only);
|
||||
};
|
||||
|
||||
extern const struct wlr_drm_interface atomic_iface;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue