Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec952131 authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher
Browse files

drm/amd/display: properly turn autocal off



[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: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 522e6b43
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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,