]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/display: Prevent double YUV range correction on HDR planes
authorAndres Calderon Jaramillo <andrescj@chromium.org>
Tue, 15 Dec 2020 22:42:19 +0000 (22:42 +0000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 27 Jan 2021 23:35:25 +0000 (01:35 +0200)
commit053eccc68320ac15b423757f39b6982c96c55826
tree8400faafd2c544a1c3db1661eab0c5fc2558ccd7
parent59bd33c4211ceecfb5090e8386623beb20551bde
drm/i915/display: Prevent double YUV range correction on HDR planes

Prevent the ICL HDR plane pipeline from performing YUV color range
correction twice when the input is in limited range. This is done by
removing the limited-range code from icl_program_input_csc().

Before this patch the following could happen: user space gives us a YUV
buffer in limited range; per the pipeline in [1], the plane would first
go through a "YUV Range correct" stage that expands the range; the plane
would then go through the "Input CSC" stage which would also expand the
range because icl_program_input_csc() would use a matrix and an offset
that assume limited-range input; this would ultimately cause dark and
light colors to appear darker and lighter than they should respectively.

This is an issue because if a buffer switches between being scanned out
and being composited with the GPU, the user will see a color difference.
If this switching happens quickly and frequently, the user will perceive
this as a flickering.

[1] https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-icllp-vol12-displayengine_0.pdf#page=281

Cc: stable@vger.kernel.org
Signed-off-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215224219.3896256-1-andrescj@google.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_sprite.c