msm: mdss: Fix AD calibration mode resume backlight issue
AD when set in calibration mode will block all backlight updates from frameworks. Hence during suspend/blank the backlight would not be 0 but will be set to the value set in calibration mode. Now this is changed as during suspend the backlight is set to 0 within driver itself. This complicates things by causing backlight to remain 0 post resume in calibration mode. Now changing the behavior so that backlight is set to 0 during suspend and set to the calibration set value upon resume. Change-Id: Id0b3919a7034875b3f3a606d00f462ceb21f40ee Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
This commit is contained in:
parent
8f293cab86
commit
f954efe130
3 changed files with 13 additions and 1 deletions
|
@ -858,6 +858,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;
|
||||
|
||||
|
@ -1473,7 +1474,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;
|
||||
mdss_fb_set_backlight(mfd, mfd->unset_bl_level);
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
|
|
@ -286,6 +286,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;
|
||||
|
|
|
@ -4942,6 +4942,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");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue