drm/i915: Polish CHV .load_luts() a bit
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 7 Nov 2019 15:17:15 +0000 (17:17 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 3 Mar 2020 17:26:23 +0000 (19:26 +0200)
commit3faf8b8532d750be669af0d27049914cff90acd8
tree95949fda37eb04119f545807829a003b723f9dbb
parent6e482b96b387d717302b6d281120121bf93b1936
drm/i915: Polish CHV .load_luts() a bit

It irks me to use crtc_state_is_legacy_gamma() inside the guts
of the CHV color management code. Let's get rid of it and instead
just consult cgm_mode to figure out if we want to enable the pipe
gamma or the CGM gamma.

Also CHV display engine is based on i965/g4x so we should fall back
to the i965 path when the CGM gamma is not used.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107151725.10507-3-ville.syrjala@linux.intel.com
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
drivers/gpu/drm/i915/display/intel_color.c