Commit 24013b93 authored by Melissa Wen's avatar Melissa Wen Committed by Alex Deucher

drm/drm_plane: track color mgmt changes per plane

We will add color mgmt properties to DRM planes in the next patches and
we want to track when one of this properties change to define atomic
commit behaviors. Using a similar approach from CRTC color props, we set
a color_mgmt_changed boolean whenever a plane color prop changes.
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarMelissa Wen <mwen@igalia.com>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 60160310
...@@ -733,6 +733,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p, ...@@ -733,6 +733,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p,
drm_get_color_encoding_name(state->color_encoding)); drm_get_color_encoding_name(state->color_encoding));
drm_printf(p, "\tcolor-range=%s\n", drm_printf(p, "\tcolor-range=%s\n",
drm_get_color_range_name(state->color_range)); drm_get_color_range_name(state->color_range));
drm_printf(p, "\tcolor_mgmt_changed=%d\n", state->color_mgmt_changed);
if (plane->funcs->atomic_print_state) if (plane->funcs->atomic_print_state)
plane->funcs->atomic_print_state(p, state); plane->funcs->atomic_print_state(p, state);
......
...@@ -352,6 +352,7 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, ...@@ -352,6 +352,7 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
state->fence = NULL; state->fence = NULL;
state->commit = NULL; state->commit = NULL;
state->fb_damage_clips = NULL; state->fb_damage_clips = NULL;
state->color_mgmt_changed = false;
} }
EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state); EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
......
...@@ -251,6 +251,13 @@ struct drm_plane_state { ...@@ -251,6 +251,13 @@ struct drm_plane_state {
/** @state: backpointer to global drm_atomic_state */ /** @state: backpointer to global drm_atomic_state */
struct drm_atomic_state *state; struct drm_atomic_state *state;
/**
* @color_mgmt_changed: Color management properties have changed. Used
* by the atomic helpers and drivers to steer the atomic commit control
* flow.
*/
bool color_mgmt_changed : 1;
}; };
static inline struct drm_rect static inline struct drm_rect
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment