diff options
| author | Abhijit Kulkarni <kabhijit@codeaurora.org> | 2017-01-23 18:32:04 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-24 11:25:13 -0800 |
| commit | 912edf6078113fc56caccd02dfa729e960250ce8 (patch) | |
| tree | 8a8a959d96c2932c0d606289b0f17107d3569022 | |
| parent | 314869eb56763d34f91d5483b0d510267894fadd (diff) | |
msm: mdss: Fix handling of Doze mode
This change fails the atomic validation if the commit happens
when panel is in ultra low power mode. This change also initializes
the play count when the panel power state changes.
Change-Id: Ie55dca6c8160c0eef4d4d01635d50d2d011e228c
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.h | 8 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_ctl.c | 11 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_layer.c | 5 |
3 files changed, 18 insertions, 6 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.h b/drivers/video/fbdev/msm/mdss_fb.h index 1487c4e7f6e2..51688858e6fa 100644 --- a/drivers/video/fbdev/msm/mdss_fb.h +++ b/drivers/video/fbdev/msm/mdss_fb.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -427,6 +427,12 @@ static inline bool mdss_fb_is_power_on_lp(struct msm_fb_data_type *mfd) return mdss_panel_is_power_on_lp(mfd->panel_power_state); } +static inline bool mdss_fb_is_power_on_ulp(struct msm_fb_data_type *mfd) +{ + return mdss_panel_is_power_on_ulp(mfd->panel_power_state); +} + + static inline bool mdss_fb_is_hdmi_primary(struct msm_fb_data_type *mfd) { return (mfd && (mfd->index == 0) && diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index f397aca8ad3a..bda1ab7331ee 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -4434,6 +4434,13 @@ int mdss_mdp_ctl_stop(struct mdss_mdp_ctl *ctl, int power_state) goto end; } + /* + * reset the play_cnt, after the cmd_stop + * this will ensure pipes are reconfiged + * after every panel power state change + */ + ctl->play_cnt = 0; + if (mdss_panel_is_power_on(power_state)) { pr_debug("panel is not off, leaving ctl power on\n"); goto end; @@ -4450,8 +4457,6 @@ int mdss_mdp_ctl_stop(struct mdss_mdp_ctl *ctl, int power_state) mdss_mdp_reset_mixercfg(ctl); - ctl->play_cnt = 0; - end: if (!ret) { ctl->power_state = power_state; diff --git a/drivers/video/fbdev/msm/mdss_mdp_layer.c b/drivers/video/fbdev/msm/mdss_mdp_layer.c index 5a7f8e7e95b4..e81f1975f0ae 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_layer.c +++ b/drivers/video/fbdev/msm/mdss_mdp_layer.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -2726,7 +2726,8 @@ int mdss_mdp_layer_atomic_validate(struct msm_fb_data_type *mfd, return -ENODEV; } - if (mdss_fb_is_power_off(mfd)) { + if (mdss_fb_is_power_off(mfd) || + mdss_fb_is_power_on_ulp(mfd)) { pr_err("display interface is in off state fb:%d\n", mfd->index); return -EPERM; |
