diff --git a/drivers/video/msm/mdp4_overlay_dsi_cmd.c b/drivers/video/msm/mdp4_overlay_dsi_cmd.c index 8a5ae18e0a94..cde5c9735a4b 100644 --- a/drivers/video/msm/mdp4_overlay_dsi_cmd.c +++ b/drivers/video/msm/mdp4_overlay_dsi_cmd.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -275,10 +275,11 @@ int mdp4_dsi_cmd_pipe_commit(int cndx, int wait) mdp_update_pm(vctrl->mfd, vctrl->vsync_time); - if (vp->update_cnt == 0) { - mutex_unlock(&vctrl->update_lock); - return cnt; - } + /* + * allow stage_commit without pipes queued + * (vp->update_cnt == 0) to unstage pipes after + * overlay_unset + */ vctrl->update_ndx++; vctrl->update_ndx &= 0x01; diff --git a/drivers/video/msm/mdp4_overlay_dsi_video.c b/drivers/video/msm/mdp4_overlay_dsi_video.c index f31dd9848127..6239cce43a8b 100644 --- a/drivers/video/msm/mdp4_overlay_dsi_video.c +++ b/drivers/video/msm/mdp4_overlay_dsi_video.c @@ -170,10 +170,11 @@ int mdp4_dsi_video_pipe_commit(int cndx, int wait) mdp_update_pm(vctrl->mfd, vctrl->vsync_time); - if (vp->update_cnt == 0) { - mutex_unlock(&vctrl->update_lock); - return cnt; - } + /* + * allow stage_commit without pipes queued + * (vp->update_cnt == 0) to unstage pipes after + * overlay_unset + */ vctrl->update_ndx++; vctrl->update_ndx &= 0x01; @@ -1137,7 +1138,7 @@ void mdp4_dsi_video_overlay(struct msm_fb_data_type *mfd) mdp4_overlay_mdp_perf_upd(mfd, 1); cnt = mdp4_dsi_video_pipe_commit(cndx, 0); - if (cnt) { + if (cnt >= 0) { if (pipe->ov_blt_addr) mdp4_dsi_video_wait4ov(cndx); else diff --git a/drivers/video/msm/mdp4_overlay_dtv.c b/drivers/video/msm/mdp4_overlay_dtv.c index 7f3e287098da..34983a4a4f5c 100644 --- a/drivers/video/msm/mdp4_overlay_dtv.c +++ b/drivers/video/msm/mdp4_overlay_dtv.c @@ -188,10 +188,11 @@ int mdp4_dtv_pipe_commit(int cndx, int wait) mdp_update_pm(vctrl->mfd, vctrl->vsync_time); - if (vp->update_cnt == 0) { - mutex_unlock(&vctrl->update_lock); - return 0; - } + /* + * allow stage_commit without pipes queued + * (vp->update_cnt == 0) to unstage pipes after + * overlay_unset + */ vctrl->update_ndx++; vctrl->update_ndx &= 0x01; diff --git a/drivers/video/msm/mdp4_overlay_lcdc.c b/drivers/video/msm/mdp4_overlay_lcdc.c index 7a320013dabe..9feaaca07470 100644 --- a/drivers/video/msm/mdp4_overlay_lcdc.c +++ b/drivers/video/msm/mdp4_overlay_lcdc.c @@ -174,10 +174,11 @@ int mdp4_lcdc_pipe_commit(int cndx, int wait) mdp_update_pm(vctrl->mfd, vctrl->vsync_time); - if (vp->update_cnt == 0) { - mutex_unlock(&vctrl->update_lock); - return 0; - } + /* + * allow stage_commit without pipes queued + * (vp->update_cnt == 0) to unstage pipes after + * overlay_unset + */ vctrl->update_ndx++; vctrl->update_ndx &= 0x01; @@ -977,7 +978,7 @@ void mdp4_lcdc_overlay(struct msm_fb_data_type *mfd) mdp4_overlay_mdp_perf_upd(mfd, 1); cnt = mdp4_lcdc_pipe_commit(cndx, 0); - if (cnt) { + if (cnt >= 0) { if (pipe->ov_blt_addr) mdp4_lcdc_wait4ov(cndx); else diff --git a/drivers/video/msm/mdp4_overlay_writeback.c b/drivers/video/msm/mdp4_overlay_writeback.c index bd20e8215185..82feabaea29b 100644 --- a/drivers/video/msm/mdp4_overlay_writeback.c +++ b/drivers/video/msm/mdp4_overlay_writeback.c @@ -344,10 +344,11 @@ int mdp4_wfd_pipe_commit(struct msm_fb_data_type *mfd, pipe = vctrl->base_pipe; mixer = pipe->mixer_num; - if (vp->update_cnt == 0) { - mutex_unlock(&vctrl->update_lock); - return cnt; - } + /* + * allow stage_commit without pipes queued + * (vp->update_cnt == 0) to unstage pipes after + * overlay_unset + */ vctrl->update_ndx++; vctrl->update_ndx &= 0x01;