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 <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-12-02 12:51:12 -06:00
parent eda7e524fd
commit e2cda4570e
2 changed files with 2 additions and 0 deletions

View file

@ -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;

View file

@ -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;