drm/i915: Implement CTM property support for VLV
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 13 Apr 2023 16:49:14 +0000 (19:49 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 26 May 2023 15:08:16 +0000 (18:08 +0300)
commit47d56cadb9e28da5b1bc5bad7e15120310aa118b
tree88c7cba08379657d213b8facca0684ddfb08fe7e
parent78776086371bf8aba4314a52a46c52d946984c61
drm/i915: Implement CTM property support for VLV

VLV has a so called "wide gamut color correction" unit (WGC).
What it is is a 3x3 matrix similar to the later CHV CGM
CSC, with less precisions/range. In fact CHV also has the WGC
but using it there doesn't really make sense when you have the
superior CGM CSC around.

Hook up the necessary stuff to expose the WGC as the CTM
crtc property.

One additional crazy idea that came to mind would be to use
the WGC as an output CSC on CHV for YCbCr output. But it
would be incompatible with the legacy LUT usage. In fact
since the WGC lacks post-offsets we'd probably have to
use the legacy LUT to do that final part of the RGB->YCbCr
conversion. Sounds doable, but perhaps not worth the hassle.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230413164916.4221-6-ville.syrjala@linux.intel.com
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/display/intel_crtc_state_dump.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/i915_reg.h