diff options
| author | Ping Li <quicpingli@codeaurora.org> | 2013-10-02 16:36:53 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:21:57 -0700 |
| commit | fb140ff0070946c4fdbfc6fa2d6c12ac30c329c9 (patch) | |
| tree | 1278a62f6ed90e527834b82c357a5de35a5b9536 | |
| parent | 282163f58b940a7925dadce44ffc2bf911000856 (diff) | |
msm: mdss: Prevent ALS data configuration when AD is disabled
If assertive display is disabled, backlight data structure is reset
to NULL, which in some conditons gets dereferenced or casuses
crash.
Change-Id: I535eac6d2f0aef222fc2846f80d72db1f3e3480d
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp.c | 3 |
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 ed95030f70d4..c0dbad7be27b 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c @@ -1250,7 +1250,8 @@ int mdss_mdp_pp_resume(struct mdss_mdp_ctl *ctl, u32 dspp_num) pp_ad_cfg_write(ad); if (PP_AD_STATE_INIT & ad->state) pp_ad_init_write(ad); - if (PP_AD_STATE_DATA & ad->state) { + if ((PP_AD_STATE_DATA & ad->state) && + (ad->sts & PP_STS_ENABLE)) { bl = ad->bl_mfd->bl_level; ad->last_bl = bl; if (ad->state & PP_AD_STATE_BL_LIN) { |
