From: Dmytro Laktyushkin <dmytro.laktyush...@amd.com>

[why]
Currently we do not turn off autocal when scaling is in bypass.
In case vbios enalbes auto scale and our first mode set is a non-scaled
mode we have autocal on causing screen corruption.

[how]
moves turning autocal off to be first thing done during scaler setup

Signed-off-by: Dmytro Laktyushkin <dmytro.laktyush...@amd.com>
Reviewed-by: Tony Cheng <tony.ch...@amd.com>
Acked-by: Harry Wentland <harry.wentl...@amd.com>
---
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c 
b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
index f862fd148cca..f0cc97518c49 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c
@@ -655,6 +655,12 @@ void dpp1_dscl_set_scaler_manual_scale(
 
        dpp->scl_data = *scl_data;
 
+       /* Autocal off */
+       REG_SET_3(DSCL_AUTOCAL, 0,
+               AUTOCAL_MODE, AUTOCAL_MODE_OFF,
+               AUTOCAL_NUM_PIPE, 0,
+               AUTOCAL_PIPE_ID, 0);
+
        /* Recout */
        dpp1_dscl_set_recout(dpp, &scl_data->recout);
 
@@ -678,12 +684,6 @@ void dpp1_dscl_set_scaler_manual_scale(
        if (dscl_mode == DSCL_MODE_SCALING_444_BYPASS)
                return;
 
-       /* Autocal off */
-       REG_SET_3(DSCL_AUTOCAL, 0,
-               AUTOCAL_MODE, AUTOCAL_MODE_OFF,
-               AUTOCAL_NUM_PIPE, 0,
-               AUTOCAL_PIPE_ID, 0);
-
        /* Black offsets */
        if (ycbcr)
                REG_SET_2(SCL_BLACK_OFFSET, 0,
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to