msm: display: only release kickoff when no cleanup pipe

If there is some pipe to clean up, need wait for it be done to
make sure the pipe can be used for the second cycle and recover
mode can be executed.

Change-Id: Ifb3fdb152bc4bbf367b3d272aa0c88b1a0650c19
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
This commit is contained in:
Ken Zhang 2014-05-14 12:14:19 -04:00 committed by David Keitel
parent a3b8b7d84b
commit 208c3bd8aa

View file

@ -1291,6 +1291,7 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd);
int ret = 0;
int sd_in_pipe = 0;
bool need_cleanup = false;
ATRACE_BEGIN(__func__);
if (ctl->shared_lock) {
@ -1337,6 +1338,7 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
mdss_mdp_pipe_queue_data(pipe, NULL);
mdss_mdp_mixer_pipe_unstage(pipe, pipe->mixer_left);
mdss_mdp_mixer_pipe_unstage(pipe, pipe->mixer_right);
need_cleanup = true;
}
ATRACE_BEGIN("sspp_programming");
@ -1354,8 +1356,10 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
ATRACE_END("display_commit");
}
atomic_set(&mfd->kickoff_pending, 0);
wake_up_all(&mfd->kickoff_wait_q);
if (!need_cleanup) {
atomic_set(&mfd->kickoff_pending, 0);
wake_up_all(&mfd->kickoff_wait_q);
}
if (IS_ERR_VALUE(ret))
goto commit_fail;
@ -1383,7 +1387,10 @@ commit_fail:
ATRACE_END("overlay_cleanup");
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF, false);
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_FLUSHED);
if (need_cleanup) {
atomic_set(&mfd->kickoff_pending, 0);
wake_up_all(&mfd->kickoff_wait_q);
}
mutex_unlock(&mdp5_data->ov_lock);
if (ctl->shared_lock)
mutex_unlock(ctl->shared_lock);