msm: mdss: Acquire shared lock after getting frame on wfd

Currently there is a deadlock when wfd and rotation is done
simultaneously and trying to acquire the shared lock. To
prevent this, acquire shared lock after rotated frame is
ready for wfd.

Change-Id: I3865f02c345ddadd985ee35134454a789936a79a
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
This commit is contained in:
Jayant Shekhar 2014-05-07 20:09:28 +05:30 committed by David Keitel
parent 5d518cef78
commit c6d38586a7
2 changed files with 9 additions and 3 deletions

View file

@ -2746,7 +2746,8 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg)
}
}
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_READY);
if (!ctl->shared_lock)
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_READY);
if (ctl->wait_pingpong)
ctl->wait_pingpong(ctl, NULL);

View file

@ -1297,8 +1297,11 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
int ret = 0;
int sd_in_pipe = 0;
if (ctl->shared_lock)
if (ctl->shared_lock) {
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_BEGIN);
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_READY);
mutex_lock(ctl->shared_lock);
}
mutex_lock(&mdp5_data->ov_lock);
mutex_lock(&mdp5_data->list_lock);
@ -1322,7 +1325,9 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
mdp5_data->sd_enabled = 0;
}
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_BEGIN);
if (!ctl->shared_lock)
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_BEGIN);
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false);
if (data)