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

Commit 93a20642 authored by Rajkumar Subbiah's avatar Rajkumar Subbiah Committed by Abhijith Desai
Browse files

msm: mdss: wait for pp done when switching from ON to LP1



If a low power mode switch is initiated while a kickoff is
in progress, the panel could be turned off before the
current frame transfer is completed causing a display hang.
This change recognizes this case and waits for the current
frame to finish before initiating the power state switch.

Change-Id: Ieea32acd67c56a7ed8a83ff92c3b49ad76d70086
Signed-off-by: default avatarRajkumar Subbiah <rsubbia@codeaurora.org>
parent 49104578
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -3270,8 +3270,18 @@ int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
		 * mode.
		 */
		send_panel_events = true;
		if (mdss_panel_is_power_on_ulp(panel_power_state))
		if (mdss_panel_is_power_on_ulp(panel_power_state)) {
			turn_off_clocks = true;
		} else if (atomic_read(&ctx->koff_cnt)) {
			/*
			 * Transition from interactive to low power
			 * Wait for kickoffs to finish
			 */
			MDSS_XLOG(ctl->num, atomic_read(&ctx->koff_cnt));
			mdss_mdp_cmd_wait4pingpong(ctl, NULL);
			if (sctl)
				mdss_mdp_cmd_wait4pingpong(sctl, NULL);
		}
	} else {
		/* Transitions between low power and ultra low power */
		if (mdss_panel_is_power_on_ulp(panel_power_state)) {