Due to i.MX8 clock issue, we need to get pll and pixel clock rates
before setting their rates when system resumes back from PM sleep mode,
otherwise, we'll fail to set the clock rates. So, this is a workaround
and it can be removed when the clock issue is properly fixed.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
pll_clock_rate = disp_clock_rate * 8;
}
+ /*
+ * To workaround setting clock rate failure issue
+ * when the system resumes back from PM sleep mode,
+ * we need to get the clock rates before setting
+ * their rates, otherwise, setting the clock rates
+ * will fail.
+ */
+ clk_get_rate(fg->clk_pll);
+ clk_get_rate(fg->clk_disp);
clk_set_rate(fg->clk_pll, pll_clock_rate);
clk_set_rate(fg->clk_disp, disp_clock_rate);
}