summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Vanderlip <carlv@codeaurora.org>2013-05-16 21:03:10 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:17:30 -0700
commit846ecddb2c9dafec42400fb3ed7eb227bf49f46f (patch)
treeaee5b0c9f46a6f9838e98c18e363368c03d6bef6
parent25a1341eb76ce9033d54ebfc3c58bbdfc3c15c51 (diff)
msm: mdss: Prevent VSYNC enable when assertive display stopped
Only enable vsync when vsync requested and assertive display is on. Prevent NULL pointer dereference if vsync is called after assertive display is disabled. Change-Id: Ibc3eae66c2dc5869f26c145cb310502507fbfe69 Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c
index 0d343babb560..48641bfe7d9b 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_pp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c
@@ -3073,7 +3073,8 @@ static int mdss_mdp_ad_setup(struct msm_fb_data_type *mfd)
if (PP_AD_STS_DIRTY_VSYNC & ad->sts) {
pr_debug("dirty vsync, calc_itr = %d", ad->calc_itr);
ad->sts &= ~PP_AD_STS_DIRTY_VSYNC;
- if (!(PP_AD_STATE_VSYNC & ad->state) && ad->calc_itr) {
+ if (!(PP_AD_STATE_VSYNC & ad->state) && ad->calc_itr &&
+ (ad->state & PP_AD_STATE_RUN)) {
ctl->add_vsync_handler(ctl, &ad->handle);
ad->state |= PP_AD_STATE_VSYNC;
} else if ((PP_AD_STATE_VSYNC & ad->state) &&