From: Murton Liu <[email protected]>

[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.

Change-Id: I1d26459b94c341f248092c98e98684ced062565c
Signed-off-by: Murton Liu <[email protected]>
Reviewed-by: Krunoslav Kovac <[email protected]>
Acked-by: Bhawanpreet Lakha <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c 
b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index a59b89b27583..84cfe709bdc2 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -1227,7 +1227,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);
 
-- 
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to