OSDN Git Service

drm/amd/display: enable cursor degamma for DCN3+ DRM legacy gamma
authorMelissa Wen <mwen@igalia.com>
Thu, 31 Aug 2023 16:12:28 +0000 (15:12 -0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Sep 2023 02:09:33 +0000 (22:09 -0400)
commit57a943ebfcdb4a97fbb409640234bdb44bfa1953
tree4c6cfad49389d4f47a441e086ece799e02680374
parent47428f4b638d3b3264a2efa1a567b0bbddbb6107
drm/amd/display: enable cursor degamma for DCN3+ DRM legacy gamma

For DRM legacy gamma, AMD display manager applies implicit sRGB degamma
using a pre-defined sRGB transfer function. It works fine for DCN2
family where degamma ROM and custom curves go to the same color block.
But, on DCN3+, degamma is split into two blocks: degamma ROM for
pre-defined TFs and `gamma correction` for user/custom curves and
degamma ROM settings doesn't apply to cursor plane. To get DRM legacy
gamma working as expected, enable cursor degamma ROM for implict sRGB
degamma on HW with this configuration.

Cc: stable@vger.kernel.org
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2803
Fixes: 96b020e2163f ("drm/amd/display: check attr flag before set cursor degamma on DCN3+")
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c