drm/i915: Add gamma/degamma readout for ivb/hsw
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 14 Nov 2022 15:37:23 +0000 (17:37 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 22 Nov 2022 12:44:47 +0000 (14:44 +0200)
commit9f9af566a177689e812557fb1eb08433adcd6951
tree2dab0efbc39b5062aa3e14c369f8e43c8f622fde
parent36eb28b44bc84a3091bad93f70bbe86746167f24
drm/i915: Add gamma/degamma readout for ivb/hsw

We now have all the code necessary for gamma/degamma readout on
ivb/hsw. Plug it all in. As with bdw+ the cooked {pre,post}_csc_lut
make this trivial even in split gamma mode.

Note that on HSW if IPS is enabled the hardware will hang if
you try to access the LUT in split gamma mode. Thus we need to
reorder the LUT readout vs. IPS enable steps.

v2: deal with {pre,post}_csc_lut
    split gamma is no longer a problem
    handle HSW IPS w/a
v3: use ilk_has_post_csc_lut() helper

Reviewed-by: Uma Shankar <uma.shankar@intel.com> #v1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221114153732.11773-12-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/display/intel_display.c