diff options
| author | Padmanabhan Komanduru <pkomandu@codeaurora.org> | 2017-03-20 19:36:56 +0530 |
|---|---|---|
| committer | Padmanabhan Komanduru <pkomandu@codeaurora.org> | 2017-03-20 19:38:15 +0530 |
| commit | cdde53cd0391afd5e68244ccca5fbe4c3641d7e6 (patch) | |
| tree | bba82659358ff5aad54c0c507828893a2cfc1256 /drivers/video/fbdev | |
| parent | 89bfd053bfb4afb40d86f58de52cb7b1433dccba (diff) | |
msm: mdss: handle force clock lane to HS option properly
The clock lane can be configured to be in HS mode always as
long as the DSI PLL is enabled. For command mode cases during
static screen, disable this setting before DSI PLL is disabled
and enable it back after DSI PLL is enabled and DSI lanes exit
ULPS state.
Change-Id: Ic98bb79cdafa72971b0dcdc6cfacfe1d8f246f5a
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi.c | 9 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi.h | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi_host.c | 3 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/msm_mdss_io_8974.c | 6 |
4 files changed, 9 insertions, 11 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c index 88eb794a5ff5..04352339bac7 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.c +++ b/drivers/video/fbdev/msm/mdss_dsi.c @@ -1464,15 +1464,6 @@ int mdss_dsi_on(struct mdss_panel_data *pdata) if (mipi->init_delay) usleep_range(mipi->init_delay, mipi->init_delay); - if (mipi->force_clk_lane_hs) { - u32 tmp; - - tmp = MIPI_INP((ctrl_pdata->ctrl_base) + 0xac); - tmp |= (1<<28); - MIPI_OUTP((ctrl_pdata->ctrl_base) + 0xac, tmp); - wmb(); - } - if (pdata->panel_info.type == MIPI_CMD_PANEL) mdss_dsi_clk_ctrl(ctrl_pdata, ctrl_pdata->dsi_clk_handle, MDSS_DSI_ALL_CLKS, MDSS_DSI_CLK_OFF); diff --git a/drivers/video/fbdev/msm/mdss_dsi.h b/drivers/video/fbdev/msm/mdss_dsi.h index bd9fd6c7d6c5..871c55dcdac4 100644 --- a/drivers/video/fbdev/msm/mdss_dsi.h +++ b/drivers/video/fbdev/msm/mdss_dsi.h @@ -697,6 +697,8 @@ void mdss_dsi_dsc_config(struct mdss_dsi_ctrl_pdata *ctrl, struct dsc_desc *dsc); void mdss_dsi_dfps_config_8996(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_set_burst_mode(struct mdss_dsi_ctrl_pdata *ctrl); +void mdss_dsi_cfg_lane_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, + u32 bits, int set); void mdss_dsi_set_reg(struct mdss_dsi_ctrl_pdata *ctrl, int off, u32 mask, u32 val); int mdss_dsi_phy_pll_reset_status(struct mdss_dsi_ctrl_pdata *ctrl); diff --git a/drivers/video/fbdev/msm/mdss_dsi_host.c b/drivers/video/fbdev/msm/mdss_dsi_host.c index 98c5eda02f5b..8d4e755ada65 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_host.c +++ b/drivers/video/fbdev/msm/mdss_dsi_host.c @@ -600,7 +600,7 @@ error: return rc; } -static void mdss_dsi_cfg_lane_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, +void mdss_dsi_cfg_lane_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, u32 bits, int set) { u32 data; @@ -611,6 +611,7 @@ static void mdss_dsi_cfg_lane_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, else data &= ~bits; MIPI_OUTP(ctrl->ctrl_base + 0x0ac, data); + wmb(); /* make sure write happens */ } diff --git a/drivers/video/fbdev/msm/msm_mdss_io_8974.c b/drivers/video/fbdev/msm/msm_mdss_io_8974.c index e6151b4c75a1..7f30b0d55042 100644 --- a/drivers/video/fbdev/msm/msm_mdss_io_8974.c +++ b/drivers/video/fbdev/msm/msm_mdss_io_8974.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 @@ -2256,6 +2256,8 @@ int mdss_dsi_pre_clkoff_cb(void *priv, pdata = &ctrl->panel_data; if ((clk & MDSS_DSI_LINK_CLK) && (new_state == MDSS_DSI_CLK_OFF)) { + if (pdata->panel_info.mipi.force_clk_lane_hs) + mdss_dsi_cfg_lane_ctrl(ctrl, BIT(28), 0); /* * If ULPS feature is enabled, enter ULPS first. * However, when blanking the panel, we should enter ULPS @@ -2371,6 +2373,8 @@ int mdss_dsi_post_clkon_cb(void *priv, goto error; } } + if (pdata->panel_info.mipi.force_clk_lane_hs) + mdss_dsi_cfg_lane_ctrl(ctrl, BIT(28), 1); } error: return rc; |
