diff options
| author | Krishna Chaitanya Parimi <cparimi@codeaurora.org> | 2015-01-09 15:09:59 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:42:33 -0700 |
| commit | f954efe13095bca79095360614a9f53d245c9846 (patch) | |
| tree | ae69ba8e6b84829e1837d3edefc1ca8547069f8c /drivers/video/fbdev | |
| parent | 8f293cab86b79e9addb24f8c9706b590cf7e1dcf (diff) | |
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>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 12 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.h | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp.c | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index fd936bbfcd08..f28401b522f8 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -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); } diff --git a/drivers/video/fbdev/msm/mdss_fb.h b/drivers/video/fbdev/msm/mdss_fb.h index ace685c58154..b5419ca127eb 100644 --- a/drivers/video/fbdev/msm/mdss_fb.h +++ b/drivers/video/fbdev/msm/mdss_fb.h @@ -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; diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c index d56371433f72..90fa5c37dc9b 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c @@ -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"); } |
