On Wed, 02 Jul 2025, Uma Shankar <uma.shan...@intel.com> wrote: > From: Chaitanya Kumar Borah <chaitanya.kumar.bo...@intel.com> > > Add callback to intel color functions for setting plane CTM. > > v2: adapt to struct intel_display > v3: add dsb support > > Signed-off-by: Uma Shankar <uma.shan...@intel.com> > Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.bo...@intel.com> > --- > drivers/gpu/drm/i915/display/intel_color.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_color.c > b/drivers/gpu/drm/i915/display/intel_color.c > index 7c53572f729b..f7237d00be7a 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"
This patch does not need this. > > #define PLANE_DEGAMMA_SIZE 128 > #define PLANE_GAMMA_SIZE 32 > @@ -91,6 +92,10 @@ 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)(struct intel_dsb *dsb, > + const struct intel_plane_state > *plane_state); > }; > > #define CTM_COEFF_SIGN (1ULL << 63) > @@ -3971,7 +3976,10 @@ static void > intel_color_load_plane_csc_matrix(struct intel_dsb *dsb, > 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(dsb, plane_state); > } > > void intel_color_plane_program_pipeline(struct intel_dsb *dsb, -- Jani Nikula, Intel