]> Gentwo Git Trees - linux/.git/commitdiff
drm/colorop: pass plane_color_pipeline client cap to atomic check
authorHarry Wentland <harry.wentland@amd.com>
Sat, 15 Nov 2025 00:01:48 +0000 (17:01 -0700)
committerSimon Ser <contact@emersion.fr>
Wed, 26 Nov 2025 22:03:33 +0000 (23:03 +0100)
Drivers will need to know whether an atomic check/commit
originated from a client with DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE
so they can ignore deprecated properties, like COLOR_ENCODING
and COLOR_RANGE.

Pass the plane_color_pipeline bit to drm_atomic_state.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Link: https://patch.msgid.link/20251115000237.3561250-24-alex.hung@amd.com
drivers/gpu/drm/drm_atomic_uapi.c
include/drm/drm_atomic.h

index 392198aae072213ae822e6128e7957e04b48a77f..6f4345b9b2a3c1a4130e732d1a69de049e185b51 100644 (file)
@@ -1584,6 +1584,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
        drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
        state->acquire_ctx = &ctx;
        state->allow_modeset = !!(arg->flags & DRM_MODE_ATOMIC_ALLOW_MODESET);
+       state->plane_color_pipeline = file_priv->plane_color_pipeline;
 
 retry:
        copied_objs = 0;
index faeb5de74d50ca212e277c541a6063177640797b..e65ea288cb8be82b23c07e4be23d034455cea1b0 100644 (file)
@@ -537,6 +537,24 @@ struct drm_atomic_state {
         */
        bool checked : 1;
 
+       /**
+        * @plane_color_pipeline:
+        *
+        * Indicates whether this atomic state originated with a client that
+        * set the DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE.
+        *
+        * Drivers and helper functions should use this to ignore legacy
+        * properties that are incompatible with the drm_plane COLOR_PIPELINE
+        * behavior, such as:
+        *
+        *  - COLOR_RANGE
+        *  - COLOR_ENCODING
+        *
+        * or any other driver-specific properties that might affect pixel
+        * values.
+        */
+       bool plane_color_pipeline : 1;
+
        /**
         * @colorops:
         *