drm/i915/sdvo: Implement limited color range for SDVO HDMI properly
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 8 Jan 2020 18:12:38 +0000 (20:12 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 9 Jul 2020 13:21:30 +0000 (16:21 +0300)
commit90f8ed85c6f31a53d8bdf04d80900d87296f6701
treefd1326010305241ad73866cd726b76a527e58e8f
parent80f5ad62b6ecef424d25da2680150c828cbe7227
drm/i915/sdvo: Implement limited color range for SDVO HDMI properly

The SDVO/HDMI port register limited color range bit can only be used
with TMDS encoding and not SDVO encoding, ie. to be used only when
using the port as a HDMI port as opposed to a SDVO port. The SDVO
spec does have a note that some GMCHs might allow that, but gen4
bspec vehemently disagrees. I suppose on ILK+ it might work since
the color range handling is on the CPU side rather than on the PCH
side, so there is no clear linkage between the TMDS vs. SDVO
encoding and color range. Alas, I have no hardware to test that
theory.

To implement limited color range support for SDVO->HDMI we need to
ask the SDVO device to do the range compression. Do so, but first
check if the device even supports the colorimetry selection.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200108181242.13650-5-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_hdmi.h
drivers/gpu/drm/i915/display/intel_sdvo.c