Merge "msm: mdss: always set mdp_busy when partial update is disabled"

This commit is contained in:
Linux Build Service Account 2014-07-18 06:55:39 -07:00 committed by Gerrit - the friendly Code Review server
commit 3e7642f992
2 changed files with 34 additions and 12 deletions

View file

@ -1318,6 +1318,8 @@ int mdss_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl,
int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
{
struct dcs_cmd_req *req;
struct mdss_panel_info *pinfo;
struct mdss_rect *roi = NULL;
int ret = -EINVAL;
int rc = 0;
@ -1373,8 +1375,19 @@ need_lock:
XLOG_FUNC_EXIT);
if (from_mdp) { /* from mdp kickoff */
/* acquire lock only has new frame update */
if (ctrl->roi.w != 0 || ctrl->roi.h != 0)
/*
* when partial update enabled, the roi of pinfo
* is updated before mdp kickoff. Either width or
* height of roi is 0, then it is false kickoff so
* no mdp_busy flag set needed.
* when partial update disabled, mdp_busy flag
* alway set.
*/
pinfo = &ctrl->panel_data.panel_info;
if (pinfo->partial_update_enabled)
roi = &pinfo->roi;
if (!roi || (roi->w != 0 || roi->h != 0))
mdss_dsi_cmd_mdp_start(ctrl);
mutex_unlock(&ctrl->cmd_mutex);

View file

@ -377,6 +377,7 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata)
struct mdss_rect *p_roi;
struct mdss_rect *c_roi;
struct mdss_dsi_ctrl_pdata *ctrl = NULL;
struct mdss_dsi_ctrl_pdata *other = NULL;
struct dcs_cmd_req cmdreq;
int left_or_both = 0;
@ -390,19 +391,32 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata)
pinfo = &pdata->panel_info;
p_roi = &pinfo->roi;
c_roi = &ctrl->roi;
/*
* if broadcase mode enable or roi had changed
* then do col_page update
* to avoid keep sending same col_page info to panel,
* if roi_merge enabled, the roi of left ctrl is used
* to compare against new merged roi and saved new
* merged roi to it after comparing.
* if roi_merge disabled, then the calling ctrl's roi
* and pinfo's roi are used to compare.
*/
if (pinfo->partial_update_roi_merge) {
left_or_both = mdss_dsi_roi_merge(ctrl, &roi);
other = mdss_dsi_get_ctrl_by_index(DSI_CTRL_LEFT);
c_roi = &other->roi;
} else {
c_roi = &ctrl->roi;
roi = *p_roi;
}
/* roi had changed, do col_page update */
if (mdss_dsi_sync_wait_enable(ctrl) ||
!mdss_rect_cmp(c_roi, p_roi)) {
!mdss_rect_cmp(c_roi, &roi)) {
pr_debug("%s: ndx=%d x=%d y=%d w=%d h=%d\n",
__func__, ctrl->ndx, p_roi->x,
p_roi->y, p_roi->w, p_roi->h);
*c_roi = *p_roi; /* keep to ctrl */
*c_roi = roi; /* keep to ctrl */
if (c_roi->w == 0 || c_roi->h == 0) {
/* no new frame update */
pr_debug("%s: ctrl=%d, no partial roi set\n",
@ -411,11 +425,6 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata)
return 0;
}
roi = *c_roi;
if (pinfo->partial_update_roi_merge)
left_or_both = mdss_dsi_roi_merge(ctrl, &roi);
if (pinfo->partial_update_dcs_cmd_by_left) {
if (left_or_both && ctrl->ndx == DSI_CTRL_RIGHT) {
/* 2A/2B sent by left already */