]> Git Repo - linux.git/commitdiff
drm/drm_plane: track color mgmt changes per plane
authorMelissa Wen <[email protected]>
Thu, 16 Nov 2023 19:57:43 +0000 (18:57 -0100)
committerAlex Deucher <[email protected]>
Wed, 13 Dec 2023 20:09:53 +0000 (15:09 -0500)
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: Harry Wentland <[email protected]>
Signed-off-by: Melissa Wen <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_atomic_state_helper.c
include/drm/drm_plane.h

index c31fc0b48c316ae210892efbb65e2b6962595b8a..a91737adf8e7b66af7af539a7ad93ad2427e00f5 100644 (file)
@@ -733,6 +733,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p,
                   drm_get_color_encoding_name(state->color_encoding));
        drm_printf(p, "\tcolor-range=%s\n",
                   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)
                plane->funcs->atomic_print_state(p, state);
index 54975de44a0e34f5fb3d6f29e39d6c5bd865ace9..519228eb109533d2596e899a57b571fa0995824f 100644 (file)
@@ -352,6 +352,7 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
        state->fence = NULL;
        state->commit = NULL;
        state->fb_damage_clips = NULL;
+       state->color_mgmt_changed = false;
 }
 EXPORT_SYMBOL(__drm_atomic_helper_plane_duplicate_state);
 
index c6565a6f9324cfb0cd2f8ed990d1321c539bedd5..641fe298052dc3cc1a9b779a09cbbb314a0b8309 100644 (file)
@@ -251,6 +251,13 @@ struct drm_plane_state {
 
        /** @state: backpointer to global drm_atomic_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
This page took 0.049612 seconds and 4 git commands to generate.