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

Commit f2f8e391 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Remove backlight min level checks during backlight scaling"

parents d7ab29db 83147f1a
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -1603,10 +1603,6 @@ int mdp3_validate_scale_config(struct mdp_bl_scale_data *data)
		pr_err("%s invalid bl_scale\n", __func__);
		return -EINVAL;
	}
	if (data->min_lvl > MDP_HISTOGRAM_BL_LEVEL_MAX) {
		pr_err("%s invalid bl_min_lvl\n", __func__);
		return -EINVAL;
	}
	return 0;
}

@@ -1810,9 +1806,7 @@ static int mdp3_bl_scale_config(struct msm_fb_data_type *mfd,
	mutex_lock(&mfd->bl_lock);
	curr_bl = mfd->bl_level;
	mfd->bl_scale = data->scale;
	mfd->bl_min_lvl = data->min_lvl;
	pr_debug("update scale = %d, min_lvl = %d\n", mfd->bl_scale,
							mfd->bl_min_lvl);
	pr_debug("update scale = %d\n", mfd->bl_scale);

	/* update current backlight to use new scaling*/
	mdss_fb_set_backlight(mfd, curr_bl);
+13 −19
Original line number Diff line number Diff line
@@ -1134,7 +1134,6 @@ static int mdss_fb_probe(struct platform_device *pdev)
		mfd->bl_level = 0;

	mfd->bl_scale = 1024;
	mfd->bl_min_lvl = 30;
	mfd->ad_bl_level = 0;
	mfd->fb_imgType = MDP_RGBA_8888;
	mfd->calib_mode_bl = 0;
@@ -1512,7 +1511,6 @@ static void mdss_fb_scale_bl(struct msm_fb_data_type *mfd, u32 *bl_lvl)
	u32 temp = *bl_lvl;

	pr_debug("input = %d, scale = %d\n", temp, mfd->bl_scale);
	if (temp >= mfd->bl_min_lvl) {
	if (temp > mfd->panel_info->bl_max) {
		pr_warn("%s: invalid bl level\n",
				__func__);
@@ -1529,10 +1527,6 @@ static void mdss_fb_scale_bl(struct msm_fb_data_type *mfd, u32 *bl_lvl)
	 */
	temp = (temp * mfd->bl_scale) / 1024;

		/*if less than minimum level, use min level*/
		if (temp < mfd->bl_min_lvl)
			temp = mfd->bl_min_lvl;
	}
	pr_debug("output = %d\n", temp);

	(*bl_lvl) = temp;
+0 −1
Original line number Diff line number Diff line
@@ -299,7 +299,6 @@ struct msm_fb_data_type {
	u32 ad_bl_level;
	u32 bl_level;
	u32 bl_scale;
	u32 bl_min_lvl;
	u32 unset_bl_level;
	bool allow_bl_update;
	u32 bl_level_scaled;
+1 −3
Original line number Diff line number Diff line
@@ -4405,9 +4405,7 @@ static int mdss_bl_scale_config(struct msm_fb_data_type *mfd,
	mutex_lock(&mfd->bl_lock);
	curr_bl = mfd->bl_level;
	mfd->bl_scale = data->scale;
	mfd->bl_min_lvl = data->min_lvl;
	pr_debug("update scale = %d, min_lvl = %d\n", mfd->bl_scale,
							mfd->bl_min_lvl);
	pr_debug("update scale = %d\n", mfd->bl_scale);

	/* update current backlight to use new scaling*/
	mdss_fb_set_backlight(mfd, curr_bl);