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

Commit 7476cd69 authored by Sravan Kumar D.V.N's avatar Sravan Kumar D.V.N Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Do not apply bl scale if current back light is zero



Calling mdss_fb_set_backlight when current back light zero
to update bl scale will reset the unset_bl_level to zero.
This affects ESD recovery as unset_bl_level is not updated
on recovery path. Hence avoiding calling mdss_fb_set_backlight
through mdss_bl_scale_config when current backlight is zero.

CRs-Fixed: 1115920
Change-Id: I4e3297604a4585233c075f9ca08a6f8f527b0438
Signed-off-by: default avatarSravan Kumar D.V.N <sravank1@codeaurora.org>
Signed-off-by: default avatarKrishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
parent d5e23dae
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4972,8 +4972,10 @@ static int mdss_bl_scale_config(struct msm_fb_data_type *mfd,
	pr_debug("update scale = %d, min_lvl = %d\n", mfd->bl_scale,
							mfd->bl_min_lvl);

	/* update current backlight to use new scaling*/
	/* Update current backlight to use new scaling, if it is not zero */
	if (curr_bl)
		mdss_fb_set_backlight(mfd, curr_bl);

	mutex_unlock(&mfd->bl_lock);
	return ret;
}