diff --git a/drivers/video/msm/mdp4_overlay_writeback.c b/drivers/video/msm/mdp4_overlay_writeback.c index 292754a484e..5a91b0cbae6 100644 --- a/drivers/video/msm/mdp4_overlay_writeback.c +++ b/drivers/video/msm/mdp4_overlay_writeback.c @@ -175,6 +175,8 @@ int mdp4_overlay_writeback_off(struct platform_device *pdev) struct vsycn_ctrl *vctrl; struct mdp4_overlay_pipe *pipe; int ret = 0; + int undx; + struct vsync_update *vp; pr_debug("%s+:\n", __func__); @@ -193,6 +195,16 @@ int mdp4_overlay_writeback_off(struct platform_device *pdev) mdp4_overlay_pipe_free(pipe); vctrl->base_pipe = NULL; + 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_clk_ctrl(1);