From 86f43ec47dc35560d576cdbc7ca6777be9e7fa3e Mon Sep 17 00:00:00 2001 From: Huaibin Yang Date: Fri, 2 Nov 2012 17:30:46 -0700 Subject: [PATCH] msm_fb: display: empty pending queue during suspend for wfd Add the logic for wfd writeback interface. It already presents on other display interfaces. Change-Id: I389be77ec18041e260d0e71940586e86f1841ff8 Signed-off-by: Huaibin Yang Signed-off-by: Sudhir Sharma (cherry picked from commit 3df55288659cfa826e9ad89cb38a8b722b2ae20f) --- drivers/video/msm/mdp4_overlay_writeback.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/video/msm/mdp4_overlay_writeback.c b/drivers/video/msm/mdp4_overlay_writeback.c index 292754a484e1..5a91b0cbae67 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);