msm: mdss: send dcs command through dsi-1 only when roi-merge enabled

DSi-1 is responsible for triggering both controllers to send
dcs command to both panels at same time when sync-wait-broadcast
enabled. Therefore 2A/2B dcs command need to be sent to panels
through dsi-1 when both roi-merge and sync-wait-broadcast enabled.

CRs-Fixed: 769487
Change-Id: I2ad02e8c63c1f214513583060103901e28b92e61
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
This commit is contained in:
Kuogee Hsieh 2014-12-10 09:26:40 -08:00 committed by David Keitel
parent 88ba84bbe7
commit 59be0cd32d

View file

@ -380,12 +380,10 @@ static struct dsi_cmd_desc set_col_page_addr_cmd[] = {
}; };
static void mdss_dsi_send_col_page_addr(struct mdss_dsi_ctrl_pdata *ctrl, static void mdss_dsi_send_col_page_addr(struct mdss_dsi_ctrl_pdata *ctrl,
struct mdss_rect *roi) struct mdss_rect *roi, int unicast)
{ {
struct dcs_cmd_req cmdreq; struct dcs_cmd_req cmdreq;
roi = &ctrl->roi;
caset[1] = (((roi->x) & 0xFF00) >> 8); caset[1] = (((roi->x) & 0xFF00) >> 8);
caset[2] = (((roi->x) & 0xFF)); caset[2] = (((roi->x) & 0xFF));
caset[3] = (((roi->x - 1 + roi->w) & 0xFF00) >> 8); caset[3] = (((roi->x - 1 + roi->w) & 0xFF00) >> 8);
@ -400,7 +398,9 @@ static void mdss_dsi_send_col_page_addr(struct mdss_dsi_ctrl_pdata *ctrl,
memset(&cmdreq, 0, sizeof(cmdreq)); memset(&cmdreq, 0, sizeof(cmdreq));
cmdreq.cmds_cnt = 2; cmdreq.cmds_cnt = 2;
cmdreq.flags = CMD_REQ_COMMIT | CMD_CLK_CTRL | CMD_REQ_UNICAST; cmdreq.flags = CMD_REQ_COMMIT | CMD_CLK_CTRL;
if (unicast)
cmdreq.flags |= CMD_REQ_UNICAST;
cmdreq.rlen = 0; cmdreq.rlen = 0;
cmdreq.cb = NULL; cmdreq.cb = NULL;
@ -411,7 +411,7 @@ static void mdss_dsi_send_col_page_addr(struct mdss_dsi_ctrl_pdata *ctrl,
static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata) static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata)
{ {
struct mdss_panel_info *pinfo; struct mdss_panel_info *pinfo;
struct mdss_rect roi; struct mdss_rect roi = {0};
struct mdss_rect *p_roi; struct mdss_rect *p_roi;
struct mdss_rect *c_roi; struct mdss_rect *c_roi;
struct mdss_dsi_ctrl_pdata *ctrl = NULL; struct mdss_dsi_ctrl_pdata *ctrl = NULL;
@ -471,7 +471,7 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata)
if (pinfo->dcs_cmd_by_left) if (pinfo->dcs_cmd_by_left)
ctrl = mdss_dsi_get_ctrl_by_index( ctrl = mdss_dsi_get_ctrl_by_index(
DSI_CTRL_LEFT); DSI_CTRL_LEFT);
mdss_dsi_send_col_page_addr(ctrl, &roi); mdss_dsi_send_col_page_addr(ctrl, &roi, 0);
} else { } else {
/* /*
* when sync_wait_broadcast enabled, * when sync_wait_broadcast enabled,
@ -483,11 +483,33 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata)
goto end; goto end;
if (mdss_dsi_is_left_ctrl(ctrl)) { if (mdss_dsi_is_left_ctrl(ctrl)) {
mdss_dsi_send_col_page_addr(ctrl, &ctrl->roi); if (pinfo->partial_update_roi_merge) {
mdss_dsi_send_col_page_addr(other, &other->roi); /*
* roi is the one after merged
* to dsi-1 only
*/
mdss_dsi_send_col_page_addr(other,
&roi, 0);
} else {
mdss_dsi_send_col_page_addr(ctrl,
&ctrl->roi, 1);
mdss_dsi_send_col_page_addr(other,
&other->roi, 1);
}
} else { } else {
mdss_dsi_send_col_page_addr(other, &other->roi); if (pinfo->partial_update_roi_merge) {
mdss_dsi_send_col_page_addr(ctrl, &ctrl->roi); /*
* roi is the one after merged
* to dsi-1 only
*/
mdss_dsi_send_col_page_addr(ctrl,
&roi, 0);
} else {
mdss_dsi_send_col_page_addr(other,
&other->roi, 1);
mdss_dsi_send_col_page_addr(ctrl,
&ctrl->roi, 1);
}
} }
} }
} }