drm/amd/display: PQ tail accuracy
authorKrunoslav Kovac <krunoslav.kovac@amd.com>
Tue, 8 Aug 2023 18:33:42 +0000 (14:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 18:58:33 +0000 (14:58 -0400)
commit4d5fd3d08ea9926fb2031ff7cfb4d72b7c950301
tree37e254d4d8e09dc571a799321d246b1769c99024
parent53d8e3beeaa92d916546abb4c4ac2b88d5a5b3f8
drm/amd/display: PQ tail accuracy

[WHY & HOW]
HW LUTs changed slightly in DCN3: 256 base+slope pairs were replaced by
257 bases. Code was still calculating all 256 base+slope and then
creating 257th pt as last base + last slope.
This was done in wrong format, and then "fixed" it by making the last
two points the same thus making the last slope=0.
However, this also created some precision problems near the end that
are not visible but they do show up with capture cards.

Solution is to calculate 257 and remove deltas since we no longer have
those HW registers.

Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Acked-by: Wayne Lin <wayne.lin@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/dcn30/dcn30_cm_common.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c