drm/i915/color: Downscale degamma lut values read from hardware
authorChaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Tue, 25 Jul 2023 08:30:02 +0000 (14:00 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 27 Jul 2023 12:39:12 +0000 (18:09 +0530)
commit14c8fca214a27e24f033fe906191651ffe601074
treee269af050d04153b64df97754e2f42cbae39314c
parent435cbb0b0ecd3ffd6468acc09c146aaae0cf48fd
drm/i915/color: Downscale degamma lut values read from hardware

For MTL and beyond, convert back the 24 bit lut values
read from HW to 16 bit values to maintain parity with
userspace values. This way we avoid pipe config mismatch
for pre-csc lut values.

v2: Add helper function to downscale values (Jani)

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230725083002.3779717-3-chaitanya.kumar.borah@intel.com
drivers/gpu/drm/i915/display/intel_color.c