summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-11-08 06:18:42 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-05 12:58:39 -0400
commit985df87858f9ad4de4dcb7c1cb2c1c0dffe40ad2 (patch)
treec002ff6a79271ca2b3fb740aec09f88d0781decf
parentb6ea6468776a44a70f5ea2db2a3dc8f1180843e1 (diff)
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>
-rw-r--r--drivers/devfreq/governor_pod_scaling.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/devfreq/governor_pod_scaling.c b/drivers/devfreq/governor_pod_scaling.c
index 5f84ef3ec..3ffaeb78d 100644
--- a/drivers/devfreq/governor_pod_scaling.c
+++ b/drivers/devfreq/governor_pod_scaling.c
@@ -766,11 +766,6 @@ static int nvhost_pod_estimate_freq(struct devfreq *df,
766 /* Do not do unnecessary scaling */ 766 /* Do not do unnecessary scaling */
767 scaling_limit(df, &podgov->adjustment_frequency); 767 scaling_limit(df, &podgov->adjustment_frequency);
768 768
769 /* Round the frequency and check if we're already there */
770 if (freqlist_up(podgov, podgov->adjustment_frequency, 0) ==
771 dev_stat.current_frequency)
772 return GET_TARGET_FREQ_DONTSCALE;
773
774 trace_podgov_estimate_freq(df->dev.parent, 769 trace_podgov_estimate_freq(df->dev.parent,
775 df->previous_freq, 770 df->previous_freq,
776 podgov->adjustment_frequency); 771 podgov->adjustment_frequency);
@@ -806,7 +801,7 @@ static int nvhost_pod_estimate_freq(struct devfreq *df,
806 801
807 if (!(*freq) || 802 if (!(*freq) ||
808 (freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency)) 803 (freqlist_up(podgov, *freq, 0) == dev_stat.current_frequency))
809 return GET_TARGET_FREQ_DONTSCALE; 804 return 0;
810 805
811 podgov->last_scale = now; 806 podgov->last_scale = now;
812 807