]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Add regamma/degamma coefficients and set sRGB when TF is BT709
authorJaehyun Chung <jaehyun.chung@amd.com>
Tue, 24 Aug 2021 18:05:48 +0000 (14:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Sep 2021 19:57:10 +0000 (15:57 -0400)
commite8f801dbe762b9deddb6972ae0c6f5a6673f9f73
treeb3bc95426941b0a015acb2667084e5ee60a198e8
parentfd04aa90c94092bd5c3c6c05527e801e982abcd7
drm/amd/display: Add regamma/degamma coefficients and set sRGB when TF is BT709

[Why]
In YUV case, need to set the input TF to sRGB instead of BT709,
even though the input TF type is distributed. SRGB was not
being used because pixel format was not being set in the
surface update sequence.
Also, we were using the same coefficients for degamma and
regamma formula, causing the cutoff point of the linear
section of the curve to be incorrect.

[How]
Set pixel format in the surface update sequence. Add separate
coefficient arrays for regamma and degamma.

Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Jaehyun Chung <jaehyun.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c