]> 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)
commitc6ecd6d319712807d477edf22eb0b8701ba1cfaa
treeb3bc95426941b0a015acb2667084e5ee60a198e8
parentf420235876dd0198c0633cec14089192badadd5b
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