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

Commit 9273145e 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: Fix AD calibration mode resume backlight issue"

parents 2b860e5c 67a29544
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -814,6 +814,7 @@ static int mdss_fb_probe(struct platform_device *pdev)
	mfd->bl_min_lvl = 30;
	mfd->ad_bl_level = 0;
	mfd->fb_imgType = MDP_RGBA_8888;
	mfd->calib_mode_bl = 0;

	mfd->pdev = pdev;

@@ -1409,7 +1410,16 @@ static int mdss_fb_blank_unblank(struct msm_fb_data_type *mfd)
		mutex_lock(&mfd->bl_lock);
		if (!mfd->bl_updated) {
			mfd->bl_updated = 1;
			/*
			 * If in AD calibration mode then frameworks would not
			 * be allowed to update backlight hence post unblank
			 * the backlight would remain 0 (0 is set in blank).
			 * Hence resetting back to calibration mode value
			 */
			if (!IS_CALIB_MODE_BL(mfd))
				mdss_fb_set_backlight(mfd, mfd->unset_bl_level);
			else
				mdss_fb_set_backlight(mfd, mfd->calib_mode_bl);
		}
		mutex_unlock(&mfd->bl_lock);
	}
+1 −0
Original line number Diff line number Diff line
@@ -275,6 +275,7 @@ struct msm_fb_data_type {
	int ext_ad_ctrl;
	u32 ext_bl_ctrl;
	u32 calib_mode;
	u32 calib_mode_bl;
	u32 ad_bl_level;
	u32 bl_level;
	u32 bl_scale;
+1 −0
Original line number Diff line number Diff line
@@ -4648,6 +4648,7 @@ int mdss_mdp_ad_input(struct msm_fb_data_type *mfd,
			mdss_fb_set_backlight(mfd, bl);
			mutex_unlock(&mfd->bl_lock);
			mutex_lock(&ad->lock);
			mfd->calib_mode_bl = bl;
		} else {
			pr_warn("should be in calib mode\n");
		}