From 47fc8d8adfa09ceb656e41adb00fea9a43af0bf4 Mon Sep 17 00:00:00 2001 From: Aravind Venkateswaran Date: Fri, 19 Dec 2014 17:21:49 -0800 Subject: [PATCH] msm: mdss: fix issues with transition from LP3 to LP2 When transitioning from LP3 power state to LP2 power state, reset the flag to indicate that the interface is active again and can accept updates. This ensures that all the interface clocks are correctly turned back during the subsequent display update. Change-Id: Ia3e90a5e9da7432529a9dd5ca3c5690b8d6c2af0 Signed-off-by: Aravind Venkateswaran --- drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c index df3d54ed9cb2..ea9d94a37e09 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c @@ -1157,11 +1157,13 @@ int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state) } else { /* * Transition from ultra low power to low power does - * not require any special handling. The clocks would + * not require any special handling. Just rest the + * intf_stopped flag so that the clocks would * get turned on when the first update comes. */ - pr_debug("%s: nothing to be done.\n", __func__); - return 0; + pr_debug("%s: reset intf_stopped flag.\n", __func__); + ctx->intf_stopped = 0; + goto end; } } @@ -1197,7 +1199,6 @@ panel_events: WARN(ret, "intf %d unblank error (%d)\n", ctl->intf_num, ret); } - ctx->panel_power_state = panel_power_state; if (!panel_off) { pr_debug("%s: cmd_stop with panel always on\n", __func__); @@ -1213,6 +1214,8 @@ panel_events: ctl->remove_vsync_handler = NULL; end: + if (!IS_ERR_VALUE(ret)) + ctx->panel_power_state = panel_power_state; MDSS_XLOG(ctl->num, atomic_read(&ctx->koff_cnt), ctx->clk_enabled, ctx->rdptr_enabled, XLOG_FUNC_EXIT); pr_debug("%s:-\n", __func__);