drm/i915: Create resized LUTs for ivb+ split gamma mode
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Oct 2022 11:39:06 +0000 (14:39 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 10 Nov 2022 07:13:43 +0000 (09:13 +0200)
commit764afecbbcd26bea57fcd928680d413b2c851590
treee8fc6a799829e5bf3ea46151fd349a1bffaea3ac
parent6398acf34819da99e5110e7eae47e81ef5e4bb77
drm/i915: Create resized LUTs for ivb+ split gamma mode

Currently when opeating in split gamma mode we do the
"skip ever other sw LUT entry" trick in the low level
LUT programming/readout functions. That is very annoying
and a big hinderance to revamping the color management
uapi.

Let's get rid of that problem by making half sized copies
of the software LUTs and plugging those into the internal
{pre,post}_csc_lut attachment points (instead of the sticking
the uapi provide sw LUTs there directly).

With this the low level stuff will operate purely in terms
the hardware LUT sizes, and all uapi nonsense is contained
to the atomic check phase. The one thing we do lose is
intel_color_assert_luts() since we no longer have a way to
check that the uapi LUTs were correctly used when generating
the internal copies. But that seems like a price worth paying.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026113906.10551-12-ville.syrjala@linux.intel.com
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
drivers/gpu/drm/i915/display/intel_color.c