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

Commit 2a833d2a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dsi-staging: handle panel init failure properly"

parents 56e45768 230fc263
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -3665,10 +3665,14 @@ int dsi_panel_set_lp1(struct dsi_panel *panel)
	}

	mutex_lock(&panel->panel_lock);
	if (!panel->panel_initialized)
		goto exit;

	rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_LP1);
	if (rc)
		pr_err("[%s] failed to send DSI_CMD_SET_LP1 cmd, rc=%d\n",
		       panel->name, rc);
exit:
	mutex_unlock(&panel->panel_lock);
	return rc;
}
@@ -3683,10 +3687,14 @@ int dsi_panel_set_lp2(struct dsi_panel *panel)
	}

	mutex_lock(&panel->panel_lock);
	if (!panel->panel_initialized)
		goto exit;

	rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_LP2);
	if (rc)
		pr_err("[%s] failed to send DSI_CMD_SET_LP2 cmd, rc=%d\n",
		       panel->name, rc);
exit:
	mutex_unlock(&panel->panel_lock);
	return rc;
}
@@ -3701,10 +3709,14 @@ int dsi_panel_set_nolp(struct dsi_panel *panel)
	}

	mutex_lock(&panel->panel_lock);
	if (!panel->panel_initialized)
		goto exit;

	rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_NOLP);
	if (rc)
		pr_err("[%s] failed to send DSI_CMD_SET_NOLP cmd, rc=%d\n",
		       panel->name, rc);
exit:
	mutex_unlock(&panel->panel_lock);
	return rc;
}
@@ -3953,10 +3965,10 @@ int dsi_panel_enable(struct dsi_panel *panel)
	mutex_lock(&panel->panel_lock);

	rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_ON);
	if (rc) {
	if (rc)
		pr_err("[%s] failed to send DSI_CMD_SET_ON cmds, rc=%d\n",
		       panel->name, rc);
	}
	else
		panel->panel_initialized = true;
	mutex_unlock(&panel->panel_lock);
	return rc;