msm: mdss: dsi: ensure clocks are off when setting their source

When DSI panel in unblanked, the driver configures the sources for all
the DSI branch clocks based on the current HW configuration. This
assumes that the clocks would be off when the panel is unblanked. This
may not be true when transitioning to ON state from any of the panel low
power states (LP1 or LP2). This can lead to warnings when trying to set
the clock source while the clock is enabled. Fix this by ensuring that
the clock source is configured only if the panel is not on.

Change-Id: I97f40eaedad203c5aaa0c645105bea2ff962e81d
CRs-Fixed: 975819
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
This commit is contained in:
Abhinav Kumar 2016-02-19 12:30:45 -08:00 committed by David Keitel
parent 5521dbfb90
commit 560e95724f

View file

@ -1302,14 +1302,14 @@ int mdss_dsi_on(struct mdss_panel_data *pdata)
goto end;
}
ret = mdss_dsi_set_clk_src(ctrl_pdata);
if (ret) {
pr_err("%s: failed to set clk src. rc=%d\n", __func__, ret);
if (mdss_panel_is_power_on(cur_power_state)) {
pr_debug("%s: dsi_on from panel low power state\n", __func__);
goto end;
}
if (mdss_panel_is_power_on(cur_power_state)) {
pr_debug("%s: dsi_on from panel low power state\n", __func__);
ret = mdss_dsi_set_clk_src(ctrl_pdata);
if (ret) {
pr_err("%s: failed to set clk src. rc=%d\n", __func__, ret);
goto end;
}