diff options
| author | Leo (Sunpeng) Li <[email protected]> | 2018-04-03 20:07:16 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2018-05-15 18:43:23 +0000 |
| commit | fc6de1c565e03f492a3d9725b93092dac0cc1845 (patch) | |
| tree | 7fccb69dc4d561daf208560571ed74a8994a2ad0 /drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | |
| parent | drm/amd/display: Move dp_pixel_encoding_type to stream_encoder include (diff) | |
| download | kernel-fc6de1c565e03f492a3d9725b93092dac0cc1845.tar.gz kernel-fc6de1c565e03f492a3d9725b93092dac0cc1845.zip | |
drm/amd/display: Fix regamma not affecting full-intensity color values
Hardware understands the regamma LUT as a piecewise linear function,
with points spaced exponentially along the range. We previously
programmed the LUT for range [2^-10, 2^0). This causes (normalized)
color values of 1 (=2^0) to miss the programmed LUT, and fall onto the
end region.
For DCE, the end region is extrapolated using a single (base, slope)
pair, using the max y-value from the last point in the curve as base.
This presents a problem, since this value affects all three color
channels. Scaling down the intensity of say - the blue regamma curve -
will not affect it's end region. This is especially noticiable when
using RedShift. It scales down the blue and green channels, but leaves
full-intensity colors unshifted.
Therefore, extend the range to cover [2^-10, 2^1) by programming another
hardware segment, containing only one point. That way, we won't be
hitting the end region.
Note that things are a bit different for DCN, since the end region can
be set per-channel.
Signed-off-by: Leo (Sunpeng) Li <[email protected]>
Reviewed-by: Krunoslav Kovac <[email protected]>
Acked-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_test.c')
0 files changed, 0 insertions, 0 deletions
