Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3668d60c authored by Ping Li's avatar Ping Li
Browse files

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: default avatarPing Li <quicpingli@codeaurora.org>
parent eeca98f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {