summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKuogee Hsieh <khsieh@codeaurora.org>2014-12-10 09:26:40 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:36:58 -0700
commit59be0cd32d7e76b234d5542e5b14426bc2f49b8a (patch)
treea0cd1b1f4e358e7b50e075d158ddfb917eed218c /drivers
parent88ba84bbe7db683beedf2bbff58d826041d2b330 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi_panel.c42
1 files changed, 32 insertions, 10 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c
index a009314f87f4..514ee605b574 100644
--- a/drivers/video/fbdev/msm/mdss_dsi_panel.c
+++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c
@@ -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,
- struct mdss_rect *roi)
+ struct mdss_rect *roi, int unicast)
{
struct dcs_cmd_req cmdreq;
- roi = &ctrl->roi;
-
caset[1] = (((roi->x) & 0xFF00) >> 8);
caset[2] = (((roi->x) & 0xFF));
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));
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.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)
{
struct mdss_panel_info *pinfo;
- struct mdss_rect roi;
+ struct mdss_rect roi = {0};
struct mdss_rect *p_roi;
struct mdss_rect *c_roi;
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)
ctrl = mdss_dsi_get_ctrl_by_index(
DSI_CTRL_LEFT);
- mdss_dsi_send_col_page_addr(ctrl, &roi);
+ mdss_dsi_send_col_page_addr(ctrl, &roi, 0);
} else {
/*
* when sync_wait_broadcast enabled,
@@ -483,11 +483,33 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata)
goto end;
if (mdss_dsi_is_left_ctrl(ctrl)) {
- mdss_dsi_send_col_page_addr(ctrl, &ctrl->roi);
- mdss_dsi_send_col_page_addr(other, &other->roi);
+ if (pinfo->partial_update_roi_merge) {
+ /*
+ * 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 {
- mdss_dsi_send_col_page_addr(other, &other->roi);
- mdss_dsi_send_col_page_addr(ctrl, &ctrl->roi);
+ if (pinfo->partial_update_roi_merge) {
+ /*
+ * 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);
+ }
}
}
}