From e2cda4570ed9eb7640336cec43d8961256bebd05 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 2 Dec 2025 12:51:12 -0600 Subject: [PATCH] drm/state-propose: Store the type of proposed state Keeping track of what mode we prepared the state in will be useful for printing debug information later, when we have a way to reuse old state. Signed-off-by: Derek Foreman --- libweston/backend-drm/drm-internal.h | 1 + libweston/backend-drm/state-propose.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libweston/backend-drm/drm-internal.h b/libweston/backend-drm/drm-internal.h index fb913a73b..685f92ba0 100644 --- a/libweston/backend-drm/drm-internal.h +++ b/libweston/backend-drm/drm-internal.h @@ -357,6 +357,7 @@ enum drm_output_propose_state_mode { struct drm_output_state { struct drm_pending_state *pending_state; struct drm_output *output; + enum drm_output_propose_state_mode mode; struct wl_list link; enum dpms_enum dpms; enum weston_hdcp_protection protection; diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index 258351b7d..a75ce5809 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -900,6 +900,7 @@ drm_output_propose_state(struct weston_output *output_base, state = drm_output_state_duplicate(output->state_cur, pending_state, DRM_OUTPUT_STATE_CLEAR_PLANES); + state->mode = mode; state->dpms = WESTON_DPMS_ON; state->planes_enabled = !output_base->disable_planes;