drm/amd/display: Gamut remap only changes missed
authorKrunoslav Kovac <krunoslav.kovac@amd.com>
Mon, 31 Jul 2023 20:46:14 +0000 (16:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2023 22:08:28 +0000 (18:08 -0400)
commitd288c87151a176cda322e8ae19ec307353706cc3
tree635f026e9e70d3f1cb27f3b1c1e3307f8b4b691d
parentaa298b30ce566bb7fe0d5967d3d864cf636d8e4f
drm/amd/display: Gamut remap only changes missed

[WHY&HOW]
If surface format is dynamically changed within app without changing
timing / whole plane, we don't reprogram gamut remap matrix.

Issue example:
Linear FP16 scRGB going to PQ+BT.2020 monitor.
Remap = scRGB->BT.2020

App switches swapchain format to 10-bit PQ+BT.2020.
SW calculates correctly that new Remap = bypass (in=-out=BT.2020).
But update not applied in HW.

Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Krunoslav Kovac <krunoslav.kovac@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c