wlroots-hyprland/backend/drm
Simon Ser f5889319f7 backend/drm: fix queued cursor FB overwritten with NULL
With the following sequence of events, the cursor FB fields could
end up being all set to NULL while the cursor is enabled:

1. set_cursor is called, conn->cursor_pending_fb is set to a FB
   pointer.
2. The output is committed with a buffer. crtc->cursor->queued_fb
   is set to the FB pointer, conn->cursor_pending_fb is reset to
   NULL. A page-flip event is expected in the future.
3. The output is committed with a modeset before the page-flip
   event is triggered. crtc->cursor->queued_fb is reset to NULL.

At this point all of crtc->cursor->current_fb,
crtc->cursor->queued_fb and conn->cursor_pending_fb are NULL which
is a bogus state when the cursor plane is enabled.

To avoid this issue, avoid overwriting crtc->cursor->queued_fb
with a NULL pointer on commit. The cursor logic still isn't great,
but let's keep a rework of that for a separate patch.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3734
2024-03-04 01:37:52 +00:00
..
atomic.c backend/drm: don't destroy previous DRM master blobs 2024-02-21 15:10:44 +00:00
backend.c backend/drm: move restore logic to drm.c 2024-02-15 09:37:46 +01:00
drm.c backend/drm: fix queued cursor FB overwritten with NULL 2024-03-04 01:37:52 +00:00
fb.c backend/drm: split wlr_drm_fb related functions into separate file 2023-11-30 14:44:46 +00:00
gen_pnpids.sh backend/drm: use libdisplay-info to parse EDID 2023-02-28 14:44:02 +00:00
legacy.c backend/drm: atomically reset state after VT switch 2024-02-14 19:13:23 +01:00
libliftoff.c backend/drm: don't destroy previous DRM master blobs 2024-02-21 15:10:44 +00:00
meson.build backend/drm: split wlr_drm_fb related functions into separate file 2023-11-30 14:44:46 +00:00
monitor.c backend/drm: drop wl_display argument 2024-01-25 15:05:36 +00:00
properties.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
renderer.c allocator: remove backend parameter in allocator_autocreate_with_drm_fd 2024-02-02 16:36:31 -05:00
util.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00