drm/i915: Share {csc,gamma}_enable calculation for ilk/snb vs. ivb+
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Oct 2022 11:39:05 +0000 (14:39 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 3 Nov 2022 16:16:18 +0000 (18:16 +0200)
commit9034f9c4e284138d5e5646b89285d7a89b840f5e
tree143bab39818dfbe87b643b2bbcb66b9a6fa66e09
parent4c0119dd0a7728456a2394c1bc0aa612e1f2c3cb
drm/i915: Share {csc,gamma}_enable calculation for ilk/snb vs. ivb+

ilk/snb vs. ivb+ hardware is mostly identical except for the addition
of the split gamma mode on ivb. Thus we can share the csc_enable
and gamma_enable calculation for both variants. Pull that stuff
into a few helpers.

Note that this also fills in the missing ctm/degamma stuff into
ilk_color_check() pretty much, so for good measure let's also
add a few extra checks relating to that, although we still don't
expose ctm/degamma to userspace. But now it'll be trivial to do
so if we wish.

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