]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: Avoid unnecessary frequency updates due to mismatch
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 4 May 2022 08:21:35 +0000 (13:51 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 May 2022 18:56:21 +0000 (20:56 +0200)
commitddb8abb596023105a56d8f834d11461e8266c164
treea605e4d6436833eb0dc7c621e6eb0e47f171019a
parent5cc4fd9a7abd6b65f1e95b0ffab85eee2642c2ac
cpufreq: Avoid unnecessary frequency updates due to mismatch

For some platforms, the frequency returned by hardware may be slightly
different from what is provided in the frequency table. For example,
hardware may return 499 MHz instead of 500 MHz. In such cases it is
better to avoid getting into unnecessary frequency updates, as we may
end up switching policy->cur between the two and sending unnecessary
pre/post update notifications, etc.

This patch has chosen allows the hardware frequency and table frequency
to deviate by 1 MHz for now, we may want to increase it a bit later on
if someone still complains.

Reported-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Jia-wei Chang <jia-wei.chang@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c