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

Commit 2b26128f authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: mdss: reset intf_stopped flag for sctl when exiting LP states



When exiting low power state (LP1 of LP2), ensure that the intf_stopped
flag is reset for the secondary ctl as well, otherwise it may result in
the display corruption for that ctl path.

Change-Id: I2ac9cff00e25a3cae6999e33c9f5a7a959413277
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent da830b29
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1669,6 +1669,8 @@ static int mdss_mdp_cmd_panel_on(struct mdss_mdp_ctl *ctl,
			CTL_INTF_EVENT_FLAG_DEFAULT);

		ctx->intf_stopped = 0;
		if (sctx)
			sctx->intf_stopped = 0;
	} else {
		pr_err("%s: Panel already on\n", __func__);
	}
@@ -2055,6 +2057,7 @@ static int mdss_mdp_cmd_stop_sub(struct mdss_mdp_ctl *ctl,
int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
{
	struct mdss_mdp_cmd_ctx *ctx = ctl->intf_ctx[MASTER_CTX];
	struct mdss_mdp_cmd_ctx *sctx;
	struct mdss_mdp_ctl *sctl = mdss_mdp_get_split_ctl(ctl);
	bool panel_off = false;
	bool turn_off_clocks = false;
@@ -2080,6 +2083,9 @@ int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
	pr_debug("%s: transition from %d --> %d\n", __func__,
		ctx->panel_power_state, panel_power_state);

	if (sctl)
		sctx = (struct mdss_mdp_cmd_ctx *) sctl->intf_ctx[MASTER_CTX];

	if (ctl->cmd_autorefresh_en) {
		int pre_suspend = ctx->autorefresh_pending_frame_cnt;
		int hz, rc;
@@ -2141,6 +2147,9 @@ int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
				(void *)&ctx->intf_recovery,
				CTL_INTF_EVENT_FLAG_DEFAULT);
			ctx->intf_stopped = 0;
			if (sctx)
				sctx->intf_stopped = 0;

			goto end;
		}
	}