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

Commit cf73e59b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: dsi: fix handling of ulps_suspend feature flag"

parents 919f946d 2638bebf
Loading
Loading
Loading
Loading
+20 −8
Original line number Diff line number Diff line
@@ -1089,7 +1089,7 @@ static int mdss_dsi_ulps_config(struct mdss_dsi_ctrl_pdata *ctrl,
	pinfo = &pdata->panel_info;
	mipi = &pinfo->mipi;

	if (!mdss_dsi_ulps_feature_enabled(pdata) ||
	if (!mdss_dsi_ulps_feature_enabled(pdata) &&
			!pinfo->ulps_suspend_enabled) {
		pr_debug("%s: ULPS feature is not enabled\n", __func__);
		return 0;
@@ -1446,8 +1446,18 @@ int mdss_dsi_pre_clkoff_cb(void *priv,
	pdata = &ctrl->panel_data;

	if ((clk & MDSS_DSI_LINK_CLK) && (new_state == MDSS_DSI_CLK_OFF)) {

		/*
		 * If ULPS feature is enabled, enter ULPS first.
		 * However, when blanking the panel, we should enter ULPS
		 * only if ULPS during suspend feature is enabled.
		 */
		if (pdata->panel_info.blank_state ==
			MDSS_PANEL_BLANK_BLANK) {
			if (pdata->panel_info.ulps_suspend_enabled)
				mdss_dsi_ulps_config(ctrl, 1);
		} else if (mdss_dsi_ulps_feature_enabled(pdata)) {
			rc = mdss_dsi_ulps_config(ctrl, 1);
		}
		if (rc) {
			pr_err("%s: failed enable ulps, rc = %d\n",
			       __func__, rc);
@@ -1537,6 +1547,7 @@ int mdss_dsi_post_clkon_cb(void *priv,
		}
	}
	if (clk & MDSS_DSI_LINK_CLK) {
		if (ctrl->ulps) {
			rc = mdss_dsi_ulps_config(ctrl, 0);
			if (rc) {
				pr_err("%s: failed to disable ulps, rc= %d\n",
@@ -1544,6 +1555,7 @@ int mdss_dsi_post_clkon_cb(void *priv,
				goto error;
			}
		}
	}
error:
	return rc;
}