[PATCH 14/23] drm/i915/color: Add callbacks to set plane CTM

Chaitanya Kumar Borah chaitanya.kumar.borah at intel.com
Mon Jun 16 11:54:39 UTC 2025


Add callback to intel color functions for setting plane CTM.

v2: adapt to struct intel_display

Signed-off-by: Uma Shankar <uma.shankar at intel.com>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 2f5e4f7c8eb3..0ff4f31bb925 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -33,6 +33,7 @@
 #include "intel_dsb.h"
 #include "intel_vrr.h"
 #include "skl_universal_plane.h"
+#include "skl_universal_plane_regs.h"
 
 struct intel_color_funcs {
 	int (*color_check)(struct intel_atomic_state *state,
@@ -88,6 +89,9 @@ struct intel_color_funcs {
 	 * Read config other than LUTs and CSCs, before them. Optional.
 	 */
 	void (*get_config)(struct intel_crtc_state *crtc_state);
+
+	/* Plane CSC*/
+	void (*load_plane_csc_matrix)(const struct intel_plane_state *plane_state);
 };
 
 #define CTM_COEFF_SIGN	(1ULL << 63)
@@ -4100,7 +4104,10 @@ static const struct drm_color_lut_range xelpd_gamma_hdr[] = {
 static void
 intel_color_load_plane_csc_matrix(const struct intel_plane_state *plane_state)
 {
-	/* CTM programming */
+	struct intel_display *display = to_intel_display(plane_state);
+
+	if (display->funcs.color->load_plane_csc_matrix)
+		display->funcs.color->load_plane_csc_matrix(plane_state);
 }
 
 void intel_color_plane_program_pipeline(const struct intel_plane_state *plane_state)
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list