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

Commit df589a64 authored by Kuogee Hsieh's avatar Kuogee Hsieh
Browse files

msm: mdss: check dcs_cmd_by_left for tear_on and tear_off



"dcs_cmd_by_left" indicates that dcs commands can be only sent
for left DSI controller. Tear_on and Tear_off should not be send
to right controller when above flag is set. This change fixes the
tear_on and tear_off APIs with input validation.

CRs-Fixed: 728424
Change-Id: Ia4e37456bf4377f7dc4c7a3c1d929c06420b05e4
Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
parent e33b9fba
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -612,6 +612,11 @@ static struct dsi_cmd_desc dsi_tear_off_cmd = {
void mdss_dsi_set_tear_on(struct mdss_dsi_ctrl_pdata *ctrl)
{
	struct dcs_cmd_req cmdreq;
	struct mdss_panel_info *pinfo;

	pinfo = &(ctrl->panel_data.panel_info);
	if (pinfo->dcs_cmd_by_left && ctrl->ndx != DSI_CTRL_LEFT)
		return;

	cmdreq.cmds = &dsi_tear_on_cmd;
	cmdreq.cmds_cnt = 1;
@@ -625,6 +630,11 @@ void mdss_dsi_set_tear_on(struct mdss_dsi_ctrl_pdata *ctrl)
void mdss_dsi_set_tear_off(struct mdss_dsi_ctrl_pdata *ctrl)
{
	struct dcs_cmd_req cmdreq;
	struct mdss_panel_info *pinfo;

	pinfo = &(ctrl->panel_data.panel_info);
	if (pinfo->dcs_cmd_by_left && ctrl->ndx != DSI_CTRL_LEFT)
		return;

	cmdreq.cmds = &dsi_tear_off_cmd;
	cmdreq.cmds_cnt = 1;