msm_fb: display: empty pending queue during suspend

Overlay_play() adds a pipe into pending queue and pan_display()
will commit those pipes to hardware and empty queue. This patch
will make sure queue is empty at suspend so that no unexpected
pipes will be commited to hardware by pan_display() at resume.
Otherwise, iommu page fault may happen.

Change-Id: Iafdf469c6cdbf5d469c9dee114555a8d1adb9c66
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
This commit is contained in:
Kuogee Hsieh 2012-09-25 19:31:33 -07:00 committed by Stephen Boyd
parent 03528a7a6a
commit 0cb749aee4
4 changed files with 40 additions and 0 deletions

View file

@ -1113,6 +1113,16 @@ int mdp4_dsi_cmd_off(struct platform_device *pdev)
vp->update_cnt = 0; /* empty queue */
}
undx = vctrl->update_ndx;
vp = &vctrl->vlist[undx];
if (vp->update_cnt) {
/*
* pipe's iommu will be freed at next overlay play
* and iommu_drop statistic will be increased by one
*/
vp->update_cnt = 0; /* empty queue */
}
pr_debug("%s-:\n", __func__);
return ret;
}

View file

@ -737,6 +737,16 @@ int mdp4_dsi_video_off(struct platform_device *pdev)
vp->update_cnt = 0; /* empty queue */
}
undx = vctrl->update_ndx;
vp = &vctrl->vlist[undx];
if (vp->update_cnt) {
/*
* pipe's iommu will be freed at next overlay play
* and iommu_drop statistic will be increased by one
*/
vp->update_cnt = 0; /* empty queue */
}
if (pipe) {
/* sanity check, free pipes besides base layer */
mdp4_overlay_unset_mixer(pipe->mixer_num);

View file

@ -652,6 +652,16 @@ int mdp4_dtv_off(struct platform_device *pdev)
vp->update_cnt = 0; /* empty queue */
}
undx = vctrl->update_ndx;
vp = &vctrl->vlist[undx];
if (vp->update_cnt) {
/*
* pipe's iommu will be freed at next overlay play
* and iommu_drop statistic will be increased by one
*/
vp->update_cnt = 0; /* empty queue */
}
ret = panel_next_off(pdev);
mdp_footswitch_ctrl(FALSE);

View file

@ -715,6 +715,16 @@ int mdp4_lcdc_off(struct platform_device *pdev)
vp->update_cnt = 0; /* empty queue */
}
undx = vctrl->update_ndx;
vp = &vctrl->vlist[undx];
if (vp->update_cnt) {
/*
* pipe's iommu will be freed at next overlay play
* and iommu_drop statistic will be increased by one
*/
vp->update_cnt = 0; /* empty queue */
}
if (pipe) {
/* sanity check, free pipes besides base layer */
mdp4_overlay_unset_mixer(pipe->mixer_num);