msm_fb: display: change the location of wakeup timer call

There are two pathes (pan display and overlay commit) to commit
display buffer, so change the location of cpu timer wakup call to the
common pipe_commit function to make sure cpu get waked up around
vsync.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Change-Id: Idbe6049d740a7e17a6a90e28566f7a9c74e348f2
This commit is contained in:
Huaibin Yang 2012-10-29 16:19:03 -07:00 committed by Stephen Boyd
parent eebca117d6
commit e386d15cde
3 changed files with 12 additions and 3 deletions

View file

@ -168,6 +168,8 @@ int mdp4_dsi_video_pipe_commit(int cndx, int wait)
pipe = vctrl->base_pipe; pipe = vctrl->base_pipe;
mixer = pipe->mixer_num; mixer = pipe->mixer_num;
mdp_update_pm(vctrl->mfd, vctrl->vsync_time);
if (vp->update_cnt == 0) { if (vp->update_cnt == 0) {
mutex_unlock(&vctrl->update_lock); mutex_unlock(&vctrl->update_lock);
return cnt; return cnt;
@ -1132,7 +1134,6 @@ void mdp4_dsi_video_overlay(struct msm_fb_data_type *mfd)
mdp4_dsi_video_pipe_queue(0, pipe); mdp4_dsi_video_pipe_queue(0, pipe);
} }
mdp_update_pm(mfd, vsync_ctrl_db[0].vsync_time);
mdp4_overlay_mdp_perf_upd(mfd, 1); mdp4_overlay_mdp_perf_upd(mfd, 1);
cnt = mdp4_dsi_video_pipe_commit(cndx, 0); cnt = mdp4_dsi_video_pipe_commit(cndx, 0);

View file

@ -81,6 +81,7 @@ static struct vsycn_ctrl {
struct completion dmae_comp; struct completion dmae_comp;
struct completion vsync_comp; struct completion vsync_comp;
spinlock_t spin_lock; spinlock_t spin_lock;
struct msm_fb_data_type *mfd;
struct mdp4_overlay_pipe *base_pipe; struct mdp4_overlay_pipe *base_pipe;
struct vsync_update vlist[2]; struct vsync_update vlist[2];
int vsync_irq_enabled; int vsync_irq_enabled;
@ -185,6 +186,8 @@ int mdp4_dtv_pipe_commit(int cndx, int wait)
mixer = pipe->mixer_num; mixer = pipe->mixer_num;
mdp4_overlay_iommu_unmap_freelist(mixer); mdp4_overlay_iommu_unmap_freelist(mixer);
mdp_update_pm(vctrl->mfd, vctrl->vsync_time);
if (vp->update_cnt == 0) { if (vp->update_cnt == 0) {
mutex_unlock(&vctrl->update_lock); mutex_unlock(&vctrl->update_lock);
return 0; return 0;
@ -414,6 +417,9 @@ static int mdp4_dtv_start(struct msm_fb_data_type *mfd)
uint32_t userformat; uint32_t userformat;
struct fb_info *fbi; struct fb_info *fbi;
struct fb_var_screeninfo *var; struct fb_var_screeninfo *var;
struct vsycn_ctrl *vctrl;
vctrl = &vsync_ctrl_db[0];
if (!mfd) if (!mfd)
return -ENODEV; return -ENODEV;
@ -424,6 +430,8 @@ static int mdp4_dtv_start(struct msm_fb_data_type *mfd)
fbi = mfd->fbi; fbi = mfd->fbi;
var = &fbi->var; var = &fbi->var;
vctrl->mfd = mfd;
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
if (hdmi_prim_display) { if (hdmi_prim_display) {
if (is_mdp4_hw_reset()) { if (is_mdp4_hw_reset()) {
@ -1068,7 +1076,6 @@ void mdp4_dtv_overlay(struct msm_fb_data_type *mfd)
pipe->srcp0_addr = (uint32)mfd->ibuf.buf; pipe->srcp0_addr = (uint32)mfd->ibuf.buf;
mdp4_dtv_pipe_queue(0, pipe); mdp4_dtv_pipe_queue(0, pipe);
} }
mdp_update_pm(mfd, vsync_ctrl_db[0].vsync_time);
mdp4_overlay_mdp_perf_upd(mfd, 1); mdp4_overlay_mdp_perf_upd(mfd, 1);
mdp4_dtv_pipe_commit(0, 0); mdp4_dtv_pipe_commit(0, 0);

View file

@ -172,6 +172,8 @@ int mdp4_lcdc_pipe_commit(int cndx, int wait)
pipe = vctrl->base_pipe; pipe = vctrl->base_pipe;
mixer = pipe->mixer_num; mixer = pipe->mixer_num;
mdp_update_pm(vctrl->mfd, vctrl->vsync_time);
if (vp->update_cnt == 0) { if (vp->update_cnt == 0) {
mutex_unlock(&vctrl->update_lock); mutex_unlock(&vctrl->update_lock);
return 0; return 0;
@ -971,7 +973,6 @@ void mdp4_lcdc_overlay(struct msm_fb_data_type *mfd)
mdp4_lcdc_pipe_queue(0, pipe); mdp4_lcdc_pipe_queue(0, pipe);
} }
mdp_update_pm(mfd, vsync_ctrl_db[0].vsync_time);
mdp4_overlay_mdp_perf_upd(mfd, 1); mdp4_overlay_mdp_perf_upd(mfd, 1);