From b6cd64fd538abc99d0a521d806c5fad6abd22ead Mon Sep 17 00:00:00 2001 From: Aravind Venkateswaran Date: Thu, 18 Dec 2014 12:23:05 -0800 Subject: [PATCH] msm: mdss: dsi: enter ULPS after blanking the panel during suspend In the current implementation, when the display is blanked, DSI phy is turned off prior to turning off the supply to the panel. This results in an abrupt transition on the DSI lanes from LP11 to LP00 which is in violation of the MIPI spec, and can potentially cause panels to go to a bad state. Fix this by requesting ULPS entry when display is blanked. Change-Id: I5c3e422cfdd9a398939a7277cd78ed7adb16d76f Signed-off-by: Aravind Venkateswaran --- drivers/video/fbdev/msm/msm_mdss_io_8974.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/video/fbdev/msm/msm_mdss_io_8974.c b/drivers/video/fbdev/msm/msm_mdss_io_8974.c index f37caf2f2359..0448f9ec87e9 100644 --- a/drivers/video/fbdev/msm/msm_mdss_io_8974.c +++ b/drivers/video/fbdev/msm/msm_mdss_io_8974.c @@ -1194,7 +1194,8 @@ static int mdss_dsi_ulps_config(struct mdss_dsi_ctrl_pdata *ctrl, mipi = &pinfo->mipi; if (!mdss_dsi_ulps_feature_enabled(pdata) && - !pinfo->ulps_suspend_enabled) { + !pinfo->ulps_suspend_enabled && + (pinfo->blank_state != MDSS_PANEL_BLANK_BLANK)) { pr_debug("%s: ULPS feature not supported. enable=%d\n", __func__, enable); return -ENOTSUPP; @@ -1641,18 +1642,7 @@ static int mdss_dsi_clk_ctrl_sub(struct mdss_dsi_ctrl_pdata *ctrl, } } else { if (clk_type & DSI_LINK_CLKS) { - /* - * If ULPS feature is enabled, enter ULPS first. - * If ULPS during suspend is not enabled, no need - * to enable ULPS when turning off the clocks - * while blanking the panel. - */ - if (((mdss_dsi_ulps_feature_enabled(pdata)) && - (pdata->panel_info.blank_state != - MDSS_PANEL_BLANK_BLANK)) || - (pdata->panel_info.ulps_suspend_enabled)) - mdss_dsi_ulps_config(ctrl, 1); - + mdss_dsi_ulps_config(ctrl, 1); mdss_dsi_link_clk_stop(ctrl); } if (clk_type & DSI_BUS_CLKS) {