wlroots/backend/drm
Simon Ser af445f475a 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
(cherry picked from commit f5889319f7)
2024-03-03 20:41:23 -05:00
..
atomic.c backend/drm: add wlr_drm_connector_state.nonblock 2023-11-19 15:32:30 +01:00
backend.c backend/drm: Destroy page flips on backend destroy 2023-11-17 14:34:32 -05:00
drm.c backend/drm: fix queued cursor FB overwritten with NULL 2024-03-03 20:41:23 -05:00
gen_pnpids.sh backend/drm: use libdisplay-info to parse EDID 2023-02-28 14:44:02 +00:00
legacy.c backend/drm: drop unnecessary flags in legacy interface 2023-11-19 15:32:30 +01:00
libliftoff.c backend/drm: fix fb_damage_clips_arr memory leak 2024-02-19 10:20:07 -05:00
meson.build backend/drm: use libdisplay-info for CVT mode generation 2023-02-28 14:44:02 +00:00
monitor.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
properties.c backend/drm: set "max bpc" to the max 2022-06-19 16:55:36 +00:00
renderer.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
util.c backend/drm: fix di_info memory leak 2023-05-08 10:16:25 +08:00