]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Never set limited_color_range=true for YCbCr output
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 18 Jul 2019 16:45:23 +0000 (19:45 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 20 Sep 2019 18:45:51 +0000 (21:45 +0300)
commite750e02016ece3a972459f53a89d07cda1c97ed5
tree551eac77d46e7284fe271474d3536d6e0f2f07e6
parentbd69f0c62f39b20d5db79a813678d437ec406cfb
drm/i915: Never set limited_color_range=true for YCbCr output

crtc_state->limited_color_range only applies to RGB output but
we're currently setting it even for YCbCr output. That will
lead to conflicting MSA and PIPECONF settings which can mess
up the image. Let's make sure limited_color_range stays unset
with YCbCr output.

Also WARN if we end up with such a bogus combination when
programming the MSA MISC bits as it's impossible to even
indicate quantization rangle for YCbCr via MSA MISC. YCbCr
output is simply assumed to be limited range always. Note
that VSC SDP does provide a mechanism for full range YCbCr,
so in the future we may want to rethink how we compute/store
this state.

And for good measure we add the same WARN to the HDMI path.

v2: s/==/!=/ in the HDMI WARN

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190718164523.11738-1-ville.syrjala@linux.intel.com
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_hdmi.c