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

Commit 814b756d authored by Fudong Wang's avatar Fudong Wang Committed by Greg Kroah-Hartman
Browse files

drm/amd/display: clear optc underflow before turn off odm clock



[ Upstream commit b2a93490201300a749ad261b5c5d05cb50179c44 ]

[Why]
After ODM clock off, optc underflow bit will be kept there always and clear not work.
We need to clear that before clock off.

[How]
Clear that if have when clock off.

Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarFudong Wang <Fudong.Wang@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a06e4eb6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -425,6 +425,11 @@ void optc1_enable_optc_clock(struct timing_generator *optc, bool enable)
				OTG_CLOCK_ON, 1,
				1, 1000);
	} else  {

		//last chance to clear underflow, otherwise, it will always there due to clock is off.
		if (optc->funcs->is_optc_underflow_occurred(optc) == true)
			optc->funcs->clear_optc_underflow(optc);

		REG_UPDATE_2(OTG_CLOCK_CONTROL,
				OTG_CLOCK_GATE_DIS, 0,
				OTG_CLOCK_EN, 0);