[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251223-mtk-post-blend-color-pipeline-v3-7-7d969f9a37a0@collabora.com>
Date: Tue, 23 Dec 2025 15:01:27 -0300
From: Ariel D'Alessandro <ariel.dalessandro@...labora.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Louis Chauvet <louis.chauvet@...tlin.com>,
Haneen Mohammed <hamohammed.sa@...il.com>,
Melissa Wen <melissa.srw@...il.com>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
kernel@...labora.com,
Nícolas F. R. A. Prado <nfraprado@...labora.com>,
Ariel D'Alessandro <ariel.dalessandro@...labora.com>
Subject: [PATCH v3 07/21] drm/atomic: Pass crtc_color_pipeline client cap
to atomic check
From: "Nícolas F. R. A. Prado" <nfraprado@...labora.com>
Pass the state of the CRTC (post-blend) color pipeline client cap to the
atomic state so that drivers can rely on it to enable color pipeline
functionality and ignore the deprecated color management CRTC
properties.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
Co-developed-by: Ariel D'Alessandro <ariel.dalessandro@...labora.com>
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@...labora.com>
Reviewed-by: Louis Chauvet <louis.chauvet@...tlin.com>
---
drivers/gpu/drm/drm_atomic_uapi.c | 1 +
include/drm/drm_atomic.h | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index d1bc78b2567a9..03f5a80448d10 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1668,6 +1668,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
state->acquire_ctx = &ctx;
state->allow_modeset = !!(arg->flags & DRM_MODE_ATOMIC_ALLOW_MODESET);
state->plane_color_pipeline = file_priv->plane_color_pipeline;
+ state->crtc_color_pipeline = file_priv->crtc_color_pipeline;
retry:
copied_objs = 0;
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 74ce26fa8838b..7eb21c0426105 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -560,6 +560,26 @@ struct drm_atomic_state {
*/
bool plane_color_pipeline : 1;
+ /**
+ * @crtc_color_pipeline:
+ *
+ * Indicates whether this atomic state originated with a client that
+ * set the DRM_CLIENT_CAP_CRTC_COLOR_PIPELINE.
+ *
+ * Drivers and helper functions should use this to ignore legacy
+ * properties that are incompatible with the drm_crtc COLOR_PIPELINE
+ * behavior, such as:
+ *
+ * - GAMMA_LUT
+ * - DEGAMMA_LUT
+ * - GAMMA_LUT_SIZE
+ * - CTM
+ *
+ * or any other driver-specific properties that might affect pixel
+ * values.
+ */
+ bool crtc_color_pipeline : 1;
+
/**
* @colorops:
*
--
2.51.0
Powered by blists - more mailing lists