]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/glk: Improve rounding caused by pre-CSC gamma tables
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 10 Mar 2017 10:18:34 +0000 (12:18 +0200)
committerAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Tue, 14 Mar 2017 14:07:00 +0000 (16:07 +0200)
commita0fae6a9928a119dab61cfb25e5a94a803ee2e13
treec33ca36b9a5856300572768e816eafbfdefb7abd
parentacfa269ba34060d7b3b88163e2bbea1d86b3159f
drm/i915/glk: Improve rounding caused by pre-CSC gamma tables

The 33rd entry in the pre-CSC gamma table in Geminilake can represent a
value of 1.0 as 17 bits fixed point with one integer bit. However, the
table was generated such that the value of 1.0 would be 0.ffff with
all the intervals scaled accordingly. For instance, 0.5 mapped to
0.7fff instead of 0.8000.

For a reason that is not clear to the author, the rounding seems to be
different when a cursor plane is used, leading to some seemingly random
failures of the kms_cursor_crc igt tests. The differences weren't
perceptible at 8bpc with images captured by a Chamelium device, but did
cause CRC mismatches.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170310101835.29845-1-ander.conselvan.de.oliveira@intel.com
drivers/gpu/drm/i915/intel_color.c