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

Commit 546c1cab authored by Ping Li's avatar Ping Li Committed by Benet Clark
Browse files

msm: mdss: Update ad_bl_level on first set backlight call



AD stores a backlight level in a variable for its processing
called ad_bl_level. This needs to be initialized to the actual
backlight level at the start.

Missing this initialization and doing the backlight calculation
for AD will cause an error and ad_bl_level will never be
updated to a non zero value. This change makes sure the
ad_bl_level is set to a non zero value in all cases.

Change-Id: I285332613ffcc1d6c94247b7c9bd89f054c80d4c
Signed-off-by: default avatarPing Li <pingli@codeaurora.org>
parent 8ddc7643
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2213,6 +2213,8 @@ static int pp_ad_calc_bl(struct msm_fb_data_type *mfd, int bl_in, int *bl_out,
	}

	mutex_lock(&ad->lock);
	if (!mfd->ad_bl_level)
		mfd->ad_bl_level = bl_in;
	if (!(ad->state & PP_AD_STATE_RUN)) {
		pr_debug("AD is not running.\n");
		mutex_unlock(&ad->lock);