video: driver: set clk_rate to zero before clk_disable
Video driver clk scaling is through mmrm. So without informing to mmrm if we disable_clk, then mmrm will hold stale peak_current values and that will lead to incorrect calculations at mmrm side. So always request to set lowest clk corner to mmrm before calling clk_disable_unprepare() api. Change-Id: I3e54249430ec4e886afb42f5af6863c7e40686c4 Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
@@ -1560,6 +1560,8 @@ void __disable_unprepare_clks(struct msm_vidc_core *core)
|
||||
__func__, cl->name);
|
||||
|
||||
clk_disable_unprepare(cl->clk);
|
||||
if (cl->has_scaling)
|
||||
__set_clk_rate(core, cl, 0);
|
||||
cl->prev = 0;
|
||||
}
|
||||
}
|
||||
@@ -1647,6 +1649,8 @@ fail_clk_enable:
|
||||
d_vpr_e("Clock: %s disable and unprepare\n",
|
||||
cl->name);
|
||||
clk_disable_unprepare(cl->clk);
|
||||
if (cl->has_scaling)
|
||||
__set_clk_rate(core, cl, 0);
|
||||
cl->prev = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user