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:
Govindaraj Rajagopal
2021-09-02 14:36:42 +05:30
부모 00630500c4
커밋 03471f2f11
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@@ -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;
}