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:
parent
acd7b2ddcd
commit
267be03381
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue