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

Commit 90291ece authored by Ping Li's avatar Ping Li
Browse files

msm: mdss: Add AD BL ATT debug log and checks



Enable more checks and add more debug logs for AD BL attenuation
functionality tests.

Change-Id: I088657bdbed553970c3550aab5bdc399970d9b23
Signed-off-by: default avatarPing Li <quicpingli@codeaurora.org>
parent cb3919b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -986,6 +986,7 @@ void mdss_fb_set_backlight(struct msm_fb_data_type *mfd, u32 bkl_lvl)
			mfd->bl_level = bkl_lvl;
			return;
		}
		pr_debug("backlight sent to panel :%d\n", temp);
		pdata->set_backlight(pdata, temp);
		mfd->bl_level = bkl_lvl;
		mfd->bl_level_scaled = temp;
+3 −2
Original line number Diff line number Diff line
@@ -4876,7 +4876,8 @@ static int pp_ad_attenuate_bl(u32 bl, u32 *bl_out,
	}

	ret = mdss_mdp_get_ad(mfd, &ad);
	if (ret || !ad) {
	if (ret || !ad || !ad->bl_mfd || !ad->bl_mfd->panel_info ||
		!ad->bl_mfd->panel_info->bl_max || !ad->bl_att_lut) {
		pr_err("Failed to get the ad.\n");
		return ret;
	}
@@ -4892,7 +4893,7 @@ static int pp_ad_attenuate_bl(u32 bl, u32 *bl_out,
		shift++;
	}
	n = bl >> shift;
	if (n >= AD_BL_ATT_LUT_LEN) {
	if (n >= (AD_BL_ATT_LUT_LEN - 1)) {
		pr_err("Invalid index for BL attenuation: %d.\n", n);
		return ret;
	}