mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: display: reduce timeline to 1 for smart panel
For smart display, dsi command and wfd, since it has its own buffer, the input buffer can be released once the display commit finishes, hence the fence threshold for creation can be smaller. This patch reduce the timeline from 2 to 1 for samrt panels. Also, it needs to wait4dmap/wait4ov after kicked off. Otherwise, tearing may happen. Change-Id: I9eca871d8d863ef23b1d67b6e1e9cffea40ae4a6 Signed-off-by: Ken Zhang <kenz@codeaurora.org> Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
This commit is contained in:
parent
d21375bd0e
commit
5fe00a30c9
2 changed files with 15 additions and 5 deletions
|
@ -155,7 +155,7 @@ static void mdp4_dsi_cmd_do_blt(struct msm_fb_data_type *mfd, int enable)
|
|||
int cndx = 0;
|
||||
struct vsycn_ctrl *vctrl;
|
||||
struct mdp4_overlay_pipe *pipe;
|
||||
int need_wait;
|
||||
int need_wait = 0;
|
||||
|
||||
vctrl = &vsync_ctrl_db[cndx];
|
||||
pipe = vctrl->base_pipe;
|
||||
|
@ -405,8 +405,12 @@ int mdp4_dsi_cmd_pipe_commit(int cndx, int wait)
|
|||
|
||||
mdp4_stat.overlay_commit[pipe->mixer_num]++;
|
||||
|
||||
if (wait)
|
||||
mdp4_dsi_cmd_wait4vsync(0);
|
||||
if (wait) {
|
||||
if (pipe->ov_blt_addr)
|
||||
mdp4_dsi_cmd_wait4ov(0);
|
||||
else
|
||||
mdp4_dsi_cmd_wait4dmap(0);
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
@ -1207,7 +1211,7 @@ void mdp4_dsi_cmd_overlay(struct msm_fb_data_type *mfd)
|
|||
}
|
||||
|
||||
mdp4_overlay_mdp_perf_upd(mfd, 1);
|
||||
mdp4_dsi_cmd_pipe_commit(cndx, 0);
|
||||
mdp4_dsi_cmd_pipe_commit(cndx, 1);
|
||||
mdp4_overlay_mdp_perf_upd(mfd, 0);
|
||||
mutex_unlock(&mfd->dma->ov_mutex);
|
||||
|
||||
|
|
|
@ -3601,6 +3601,7 @@ static int msmfb_handle_buf_sync_ioctl(struct msm_fb_data_type *mfd,
|
|||
struct mdp_buf_sync *buf_sync)
|
||||
{
|
||||
int i, fence_cnt = 0, ret = 0;
|
||||
u32 threshold;
|
||||
int acq_fen_fd[MDP_MAX_FENCE_FD];
|
||||
struct sync_fence *fence;
|
||||
|
||||
|
@ -3636,8 +3637,13 @@ static int msmfb_handle_buf_sync_ioctl(struct msm_fb_data_type *mfd,
|
|||
if (buf_sync->flags & MDP_BUF_SYNC_FLAG_WAIT) {
|
||||
msm_fb_wait_for_fence(mfd);
|
||||
}
|
||||
if ((mfd->panel.type == MIPI_CMD_PANEL) ||
|
||||
(mfd->panel.type == WRITEBACK_PANEL))
|
||||
threshold = 1;
|
||||
else
|
||||
threshold = 2;
|
||||
mfd->cur_rel_sync_pt = sw_sync_pt_create(mfd->timeline,
|
||||
mfd->timeline_value + 2);
|
||||
mfd->timeline_value + threshold);
|
||||
if (mfd->cur_rel_sync_pt == NULL) {
|
||||
pr_err("%s: cannot create sync point", __func__);
|
||||
ret = -ENOMEM;
|
||||
|
|
Loading…
Reference in a new issue