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: Kuogee Hsieh <khsieh@codeaurora.org>
This commit is contained in:
Kuogee Hsieh 2014-09-29 13:47:37 -07:00 committed by David Keitel
parent acd7b2ddcd
commit 267be03381

View file

@ -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;