linux/drivers/gpu/drm/amd/display/dc/dce110
Leo (Sunpeng) Li b2f3f5920d 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 <sunpeng.li@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-04-12 13:56:21 -05:00
..
dce110_compressor.c drm/amd/display: Fix FBC text console corruption 2018-04-12 13:55:55 -05:00
dce110_compressor.h amdgpu/dc: another round of dce/dcn construct cleanups. 2017-09-29 13:02:34 -04:00
dce110_hw_sequencer.c drm/amd/display: Fix regamma not affecting full-intensity color values 2018-04-12 13:56:21 -05:00
dce110_hw_sequencer.h drm/amd/display: remove unused function prototypes 2018-02-19 14:19:29 -05:00
dce110_mem_input_v.c drm/amd/display/dc/dce110/dce110_mem_input_v: use swap macro in program_size_and_rotation 2017-12-06 12:47:57 -05:00
dce110_mem_input_v.h drm/amd/display: dce 8 - 12 mem_input refactor to new style 2017-09-26 18:07:12 -04:00
dce110_opp_csc_v.c amdgpu/dc: Fix enum mismatch in calls to program_color_matrix() 2018-02-19 14:19:44 -05:00
dce110_opp_regamma_v.c drm/amd/display: Remove extra arr_points element 2017-12-06 12:47:36 -05:00
dce110_opp_v.c amdgpu/dc: another round of dce/dcn construct cleanups. 2017-09-29 13:02:34 -04:00
dce110_opp_v.h amdgpu/dc: another round of dce/dcn construct cleanups. 2017-09-29 13:02:34 -04:00
dce110_resource.c drm/amd/display: validate plane format on primary plane 2018-03-07 16:11:36 -05:00
dce110_resource.h amdgpu/dc: remove pointless return from build_pipe_hw_param 2017-09-29 13:02:41 -04:00
dce110_timing_generator_v.c drm/amd/display: define DC_LOGGER for logger 2018-03-05 15:35:13 -05:00
dce110_timing_generator_v.h amdgpu/dc: another round of dce/dcn construct cleanups. 2017-09-29 13:02:34 -04:00
dce110_timing_generator.c drm/amd/display: Expose DCE110 CRC functions for DCE8 2018-02-19 14:20:10 -05:00
dce110_timing_generator.h drm/amd/display: Expose DCE110 CRC functions for DCE8 2018-02-19 14:20:10 -05:00
dce110_transform_v.c drm/amd/display: define DC_LOGGER for logger 2018-03-05 15:35:13 -05:00
dce110_transform_v.h amdgpu/dc: make program_regamma_pwl return void 2017-09-29 13:02:08 -04:00
Makefile drm/amdgpu: add license to Makefiles 2017-12-07 11:51:10 -05:00