drm/amd/display: Fix max brightness pixel accuracy
authorFelipe Clark <felclark@amd.com>
Mon, 28 Sep 2020 15:03:38 +0000 (11:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 26 Oct 2020 17:33:31 +0000 (13:33 -0400)
commitdef48da790ce0b6f93638d9c3225913a61bd613f
treed16baab940ac7934fb39af490bdd7533d343aaec
parent35a4644c935ee8263b1d99a0fe4d5370deb4f606
drm/amd/display: Fix max brightness pixel accuracy

[WHY]
It was detected in some Freesync HDR tests that displays were not
reaching their maximum nominal brightness.

[HOW]
The Multi-plane combiner (MPC) Output Gamma (OGAM) block builds a
discrete Lookup Table (LUT). When the display's maximum brightness
falls in between two values, having to be linearly interpolated by
the hardware, rounding issues might occur that will cause the
display to never reach its maximum brightness.
The fix involves doing the calculations backwards, ensuring that
the interpolation in the maximum brightness values translates to an
output of 1.0.

Signed-off-by: Felipe Clark <felclark@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c