mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
drm/amd/display: fix gamma not being applied correctly
[ Upstream commit 8ce504b938 ]
[why]
Gamma was always being set as identity on SDR monitor,
leading to no changes in gamma. This caused nightlight to
not apply correctly.
[how]
Added a default gamma structure to compare against
in the sdr case.
Signed-off-by: Murton Liu <murton.liu@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8218fcf466
commit
d43f6c2ea4
@@ -1190,7 +1190,8 @@ static bool dcn10_set_input_transfer_func(struct pipe_ctx *pipe_ctx,
|
||||
tf = plane_state->in_transfer_func;
|
||||
|
||||
if (plane_state->gamma_correction &&
|
||||
!plane_state->gamma_correction->is_identity
|
||||
!dpp_base->ctx->dc->debug.always_use_regamma
|
||||
&& !plane_state->gamma_correction->is_identity
|
||||
&& dce_use_lut(plane_state->format))
|
||||
dpp_base->funcs->dpp_program_input_lut(dpp_base, plane_state->gamma_correction);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user