aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/atomic.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-12-06 17:39:23 +0100
committerSimon Ser <contact@emersion.fr>2022-12-07 17:45:59 +0100
commit037b21647b06957682ff8a0a1b24dcbc49e1c357 (patch)
tree17d400d4f4e3e54f161ccc5baa7820cc3691fcae /backend/drm/atomic.c
parentae61cd6bfb97a2ab5d03b30d90dd81ee6c82d352 (diff)
backend/drm: store pending FB in state
Instead of having a pending_fb field on the struct wlr_drm_plane, move it to struct wlr_drm_connector_state. That way, there's no risk having a stale pending FB around: the state doesn't survive across tests and commits. The cursor is a special case because it's disconnected from the atomic state: the wlr_backend_impl.set_cursor hook sets the cursor for the next commit. Move the field to wlr_drm_connector.cursor_pending_fb.
Diffstat (limited to 'backend/drm/atomic.c')
-rw-r--r--backend/drm/atomic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index 1ca1467c..c69d6abd 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -294,8 +294,8 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
if (crtc->props.vrr_enabled != 0) {
atomic_add(&atom, crtc->id, crtc->props.vrr_enabled, vrr_enabled);
}
- set_plane_props(&atom, drm, crtc->primary, plane_get_next_fb(crtc->primary),
- crtc->id, 0, 0);
+ set_plane_props(&atom, drm, crtc->primary, state->primary_fb, crtc->id,
+ 0, 0);
if (crtc->primary->props.fb_damage_clips != 0) {
atomic_add(&atom, crtc->primary->id,
crtc->primary->props.fb_damage_clips, fb_damage_clips);