drm/i915: Don't use split gamma when we don't have to
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 1 Apr 2019 20:02:26 +0000 (23:02 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 3 Apr 2019 19:26:12 +0000 (22:26 +0300)
commit5bda1aca5d9475ee2035d29d4855dbf97ad164ad
tree33cb91b0185f1ef1e993ac4b9bb0bdbff353e7e1
parent320d41b33ade094f08c6a0cbb7a0bd305fceaf5f
drm/i915: Don't use split gamma when we don't have to

Using the split gamma mode when we don't have to has the annoying
requirement of loading a linear LUT to the unused half. Instead
let's make life simpler by switching to the 10bit gamma mode
and duplicating each entry.

This also allows us to load the software gamma LUT into the
hardware degamma LUT, thus removing some of the buggy
configurations we currently allow (YCbCr/limited range RGB
+ gamma LUT). We do still have other configurations that are
also buggy, but those will need more complicated fixes
or they just need to be rejected. Sadly GLK doesn't have
this flexibility anymore and the degamma and gamma LUTs
are very different so no help there.

v2: Apply a mask when checking gamma_mode on icl since it
    contains more bits than just the gamma mode
v3: Rebase due to EXT_GC_MAX/EXT2_GC_MAX changes
v4: s/advertize/advertise/ (Uma)

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