mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
devfreq: remove FREQ_DONTSCALE return if same freq
In nvhost_pod_estimate_freq(), we return GET_TARGET_FREQ_DONTSCALE if new frequency is same as current frequency And based on this return value, update_devfreq() will just return without actually calling target() function But it is possible that target() function has freq clipping of its own, and skipping target() itself will break this Hence in case we find new frequency same as current frequency, do not return GET_TARGET_FREQ_DONTSCALE Instead just return 0 Note that we still return GET_TARGET_FREQ_DONTSCALE if governor itself is disabled, and this is required in perf measurement cases Bug 200245796 Change-Id: I55a3a344982c5b5441ba011cd0dd254947e89e5c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1251841 (cherry picked from linux-4.9 commit c6417ac88eb43501b8bf6d5351059ac2dadaf2c0) Reviewed-on: https://git-master.nvidia.com/r/1770145 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Timo Alho <talho@nvidia.com> Tested-by: Timo Alho <talho@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
ed2d152576
commit
8a5e6773ed
@@ -766,11 +766,6 @@ static int nvhost_pod_estimate_freq(struct devfreq *df,
|
|||||||
/* Do not do unnecessary scaling */
|
/* Do not do unnecessary scaling */
|
||||||
scaling_limit(df, &podgov->adjustment_frequency);
|
scaling_limit(df, &podgov->adjustment_frequency);
|
||||||
|
|
||||||
/* Round the frequency and check if we're already there */
|
|
||||||
if (freqlist_up(podgov, podgov->adjustment_frequency, 0) ==
|
|
||||||
dev_stat.current_frequency)
|
|
||||||
return GET_TARGET_FREQ_DONTSCALE;
|
|
||||||
|
|
||||||
trace_podgov_estimate_freq(df->dev.parent,
|
trace_podgov_estimate_freq(df->dev.parent,
|
||||||
df->previous_freq,
|
df->previous_freq,
|
||||||
podgov->adjustment_frequency);
|
podgov->adjustment_frequency);
|
||||||
@@ -806,7 +801,7 @@ static int nvhost_pod_estimate_freq(struct devfreq *df,
|
|||||||
|
|
||||||
if (!(*freq) ||
|
if (!(*freq) ||
|
||||||
(freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency))
|
(freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency))
|
||||||
return GET_TARGET_FREQ_DONTSCALE;
|
return 0;
|
||||||
|
|
||||||
podgov->last_scale = now;
|
podgov->last_scale = now;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user