summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuogee Hsieh <khsieh@codeaurora.org>2014-09-29 13:47:37 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:34:32 -0700
commit267be033817f2aed0d2d64b612e43c57a2d07af7 (patch)
treef38d87599371818707d1c676e1d1c7dc523a93f3
parentacd7b2ddcd4b9e78ba02ea801d0fe388ab1bafbe (diff)
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>
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi_cmd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi_cmd.c b/drivers/video/fbdev/msm/mdss_dsi_cmd.c
index f64ac148c0ab..f233589d5de6 100644
--- a/drivers/video/fbdev/msm/mdss_dsi_cmd.c
+++ b/drivers/video/fbdev/msm/mdss_dsi_cmd.c
@@ -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;