msm: dcvs: update dcvs if the governor limits change.
We had seen issues where dcvs goes out of sync with the actual
freq the cpu is running at. The root cause was if the userspace
changes the limits on the governor, the governor ends up changing
the frequency without notifying dcvs.
Provide an api for the governor to call dcvs when a frequency change
happens.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
(cherry picked from commit 68c970e38fcb700d851301dbacc56da9387294c6)
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit a7d720e513cfae2d3f9c03c25f2ce2f10c2e9de7)
Change-Id: I3f321df0270e997531d1a4cf3ee2251f86aef0bc
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
diff --git a/arch/arm/mach-msm/msm_dcvs.c b/arch/arm/mach-msm/msm_dcvs.c
index f761bf9..2181337 100644
--- a/arch/arm/mach-msm/msm_dcvs.c
+++ b/arch/arm/mach-msm/msm_dcvs.c
@@ -635,6 +635,17 @@
}
EXPORT_SYMBOL(msm_dcvs_register_core);
+void msm_dcvs_update_limits(struct msm_dcvs_freq *drv)
+{
+ struct dcvs_core *core;
+
+ if (!drv || !drv->core_name || !drv->get_frequency)
+ return;
+
+ core = msm_dcvs_get_core(drv->core_name, false);
+ core->actual_freq = drv->get_frequency(drv);
+}
+
int msm_dcvs_freq_sink_register(struct msm_dcvs_freq *drv)
{
int ret = -EINVAL;