summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAravind Venkateswaran <aravindh@codeaurora.org>2016-07-11 18:19:04 -0700
committerAravind Venkateswaran <aravindh@codeaurora.org>2016-07-14 14:45:18 -0700
commita5312f6f7fe42a188d6db75aa9f9453dbcf3bf1f (patch)
tree07c4c936150df2635b433a6f9109e1a91ef1cff6
parentaa958278d16faccd0cc79650b94ea6aa18d4131d (diff)
msm: mdss: mdp: fix handling of GDSC off notifier
In the current implementation, MDP driver registers for MDSS GDSC notifier and attempts to halt any active VBIF transactions whenever the MDSS GDSC is turned off. This results in a call to the bus driver to remove any active bus bandwidth vote. However, it is possible that notifier call could be a result MDSS GDSC being turned off by the bus driver during probe time and calling back in to the bus driver can result in a deadlock. Avoid this by handling GDSC off notifier only if there are any active overlay sessions. Change-Id: Id53a790cf67b201a4207f85604cb3472275d418a Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c
index 164bf0273597..5a355f226179 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp.c
@@ -1638,9 +1638,16 @@ static int mdss_mdp_gdsc_notifier_call(struct notifier_block *self,
if (event & REGULATOR_EVENT_ENABLE) {
__mdss_restore_sec_cfg(mdata);
} else if (event & REGULATOR_EVENT_PRE_DISABLE) {
- pr_debug("mdss gdsc is getting disabled\n");
- /* halt the vbif transactions */
- mdss_mdp_vbif_axi_halt(mdata);
+ int active_cnt = atomic_read(&mdata->active_intf_cnt);
+
+ pr_debug("mdss gdsc is getting disabled, active_cnt=%d\n",
+ active_cnt);
+ /*
+ * halt the vbif transactions only if we have any active
+ * overlay session
+ */
+ if (active_cnt)
+ mdss_mdp_vbif_axi_halt(mdata);
}
return NOTIFY_OK;