]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Fix dim display on DCE11
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>
Thu, 29 Mar 2018 21:04:12 +0000 (17:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:47:51 +0000 (07:47 +0200)
[ Upstream commit 84ffa80123f56f80145dc638f21dfcbedda5610d ]

Before programming the input gamma, check that we're not using the
identity correction.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index d0575999f17282a97f1c1ecffc0fcae85c5f7e2a..09c93f6ebb104bcab1efa86d22be468b3ef228be 100644 (file)
@@ -279,7 +279,9 @@ dce110_set_input_transfer_func(struct pipe_ctx *pipe_ctx,
        build_prescale_params(&prescale_params, plane_state);
        ipp->funcs->ipp_program_prescale(ipp, &prescale_params);
 
-       if (plane_state->gamma_correction && dce_use_lut(plane_state->format))
+       if (plane_state->gamma_correction &&
+                       !plane_state->gamma_correction->is_identity &&
+                       dce_use_lut(plane_state->format))
                ipp->funcs->ipp_program_input_lut(ipp, plane_state->gamma_correction);
 
        if (tf == NULL) {