mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: display: vsync usage in turning off dsi video
Add timeout to waiting for vsync so that it can come out when vsync interrupt is not working. Need not wait for vsync after timing engine is off. Change-Id: Ib989e435405613d891024ba15144723730454e34 Signed-off-by: Ken Zhang <kenz@codeaurora.org> Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
This commit is contained in:
parent
4da0857ac5
commit
0f16f59916
1 changed files with 8 additions and 2 deletions
|
@ -336,6 +336,7 @@ void mdp4_dsi_video_wait4vsync(int cndx)
|
|||
struct vsycn_ctrl *vctrl;
|
||||
struct mdp4_overlay_pipe *pipe;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (cndx >= MAX_CONTROLLER) {
|
||||
pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
|
||||
|
@ -356,8 +357,12 @@ void mdp4_dsi_video_wait4vsync(int cndx)
|
|||
|
||||
vctrl->wait_vsync_cnt++;
|
||||
spin_unlock_irqrestore(&vctrl->spin_lock, flags);
|
||||
/* double the timeout in vsync time stamp generation */
|
||||
ret = wait_for_completion_interruptible_timeout(&vctrl->vsync_comp,
|
||||
msecs_to_jiffies(VSYNC_PERIOD * 8));
|
||||
if (ret <= 0)
|
||||
pr_err("%s timeout ret=%d", __func__, ret);
|
||||
|
||||
wait_for_completion(&vctrl->vsync_comp);
|
||||
mdp4_video_vsync_irq_ctrl(cndx, 0);
|
||||
mdp4_stat.wait4vsync0++;
|
||||
}
|
||||
|
@ -524,7 +529,8 @@ static void mdp4_dsi_video_tg_off(struct vsycn_ctrl *vctrl)
|
|||
MDP_OUTP(MDP_BASE + DSI_VIDEO_BASE, 0); /* turn off timing generator */
|
||||
spin_unlock_irqrestore(&vctrl->spin_lock, flags);
|
||||
|
||||
mdp4_dsi_video_wait4vsync(0);
|
||||
/* some delay after turning off the tg */
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
int mdp4_dsi_video_splash_done(void)
|
||||
|
|
Loading…
Reference in a new issue