diff options
author | Bo Yan <byan@nvidia.com> | 2018-07-04 12:37:18 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-05 03:39:52 -0400 |
commit | c10b75a28a5a81a36dffbb9b4f837623100161ae (patch) | |
tree | 8cf368dc2f90327b4e80d09965312166f16e6dc8 | |
parent | d024dd478fe6a0a8b1b849911028b05ac50cd209 (diff) |
Revert "cpufreq: disable pm_qos for K4.14 kernel"
It also retains the initialization of qmin and qmax in
tegra210 version of cpu_freq_notify.
This reverts commit 5f9419731a52562bb34cdbe6ad98ae84cb7c522b.
bug 200423735
Change-Id: I480f9e8fde491652f6116bb03064f5cfc3d25b46
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770757
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Vince Hsu <vinceh@nvidia.com>
Tested-by: Vince Hsu <vinceh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/cpufreq/tegra194_cpufreq.c | 6 | ||||
-rw-r--r-- | drivers/cpufreq/tegra210-cpufreq.c | 7 | ||||
-rw-r--r-- | drivers/cpufreq/tegra_cpufreq.c | 8 |
3 files changed, 2 insertions, 19 deletions
diff --git a/drivers/cpufreq/tegra194_cpufreq.c b/drivers/cpufreq/tegra194_cpufreq.c index c2a5075ae..2cfb89ef9 100644 --- a/drivers/cpufreq/tegra194_cpufreq.c +++ b/drivers/cpufreq/tegra194_cpufreq.c | |||
@@ -825,10 +825,8 @@ static int tegra_boundaries_policy_notifier(struct notifier_block *nb, | |||
825 | if (event != CPUFREQ_ADJUST) | 825 | if (event != CPUFREQ_ADJUST) |
826 | return NOTIFY_OK; | 826 | return NOTIFY_OK; |
827 | 827 | ||
828 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
829 | qmin = pm_qos_read_min_bound(PM_QOS_CPU_FREQ_BOUNDS); | 828 | qmin = pm_qos_read_min_bound(PM_QOS_CPU_FREQ_BOUNDS); |
830 | qmax = pm_qos_read_max_bound(PM_QOS_CPU_FREQ_BOUNDS); | 829 | qmax = pm_qos_read_max_bound(PM_QOS_CPU_FREQ_BOUNDS); |
831 | #endif | ||
832 | 830 | ||
833 | /* | 831 | /* |
834 | * Clamp pmqos to stay within sysfs upper boundary | 832 | * Clamp pmqos to stay within sysfs upper boundary |
@@ -858,14 +856,10 @@ static struct notifier_block tegra_boundaries_cpufreq_nb = { | |||
858 | 856 | ||
859 | static void __init pm_qos_register_notifier(void) | 857 | static void __init pm_qos_register_notifier(void) |
860 | { | 858 | { |
861 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
862 | pm_qos_add_min_notifier(PM_QOS_CPU_FREQ_BOUNDS, | 859 | pm_qos_add_min_notifier(PM_QOS_CPU_FREQ_BOUNDS, |
863 | &cpu_freq_nb); | 860 | &cpu_freq_nb); |
864 | pm_qos_add_max_notifier(PM_QOS_CPU_FREQ_BOUNDS, | 861 | pm_qos_add_max_notifier(PM_QOS_CPU_FREQ_BOUNDS, |
865 | &cpu_freq_nb); | 862 | &cpu_freq_nb); |
866 | #else | ||
867 | pr_info("pm_qos for cpufreq yet to be implemented %p\n", &cpu_freq_nb); | ||
868 | #endif | ||
869 | } | 863 | } |
870 | 864 | ||
871 | static void free_resources(void) | 865 | static void free_resources(void) |
diff --git a/drivers/cpufreq/tegra210-cpufreq.c b/drivers/cpufreq/tegra210-cpufreq.c index 6725fd8ff..6616d4c17 100644 --- a/drivers/cpufreq/tegra210-cpufreq.c +++ b/drivers/cpufreq/tegra210-cpufreq.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This software is licensed under the terms of the GNU General Public | 4 | * This software is licensed under the terms of the GNU General Public |
5 | * License version 2, as published by the Free Software Foundation, and | 5 | * License version 2, as published by the Free Software Foundation, and |
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/cpufreq.h> | 24 | #include <linux/cpufreq.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/pm_qos.h> | 26 | #include <linux/pm_qos.h> |
27 | #include <linux/version.h> | ||
28 | 27 | ||
29 | #include <linux/platform/tegra/emc_bwmgr.h> | 28 | #include <linux/platform/tegra/emc_bwmgr.h> |
30 | #include <linux/platform/tegra/cpu-tegra.h> | 29 | #include <linux/platform/tegra/cpu-tegra.h> |
@@ -67,10 +66,8 @@ static int cpu_freq_notify(struct notifier_block *b, | |||
67 | { | 66 | { |
68 | u32 qmin = 0, qmax = UINT_MAX, cpu; | 67 | u32 qmin = 0, qmax = UINT_MAX, cpu; |
69 | 68 | ||
70 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
71 | qmin = (u32)pm_qos_read_min_bound(PM_QOS_CPU_FREQ_BOUNDS); | 69 | qmin = (u32)pm_qos_read_min_bound(PM_QOS_CPU_FREQ_BOUNDS); |
72 | qmax = (u32)pm_qos_read_max_bound(PM_QOS_CPU_FREQ_BOUNDS); | 70 | qmax = (u32)pm_qos_read_max_bound(PM_QOS_CPU_FREQ_BOUNDS); |
73 | #endif | ||
74 | 71 | ||
75 | pr_debug("PM QoS %s %lu\n", | 72 | pr_debug("PM QoS %s %lu\n", |
76 | b == &tfreq_priv->min_freq_notifier ? "min" : "max", l); | 73 | b == &tfreq_priv->min_freq_notifier ? "min" : "max", l); |
@@ -95,12 +92,10 @@ static void pm_qos_register_notifier(void) | |||
95 | tfreq_priv->max_freq_notifier.notifier_call = | 92 | tfreq_priv->max_freq_notifier.notifier_call = |
96 | cpu_freq_notify; | 93 | cpu_freq_notify; |
97 | 94 | ||
98 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
99 | pm_qos_add_min_notifier(PM_QOS_CPU_FREQ_BOUNDS, | 95 | pm_qos_add_min_notifier(PM_QOS_CPU_FREQ_BOUNDS, |
100 | &tfreq_priv->min_freq_notifier); | 96 | &tfreq_priv->min_freq_notifier); |
101 | pm_qos_add_max_notifier(PM_QOS_CPU_FREQ_BOUNDS, | 97 | pm_qos_add_max_notifier(PM_QOS_CPU_FREQ_BOUNDS, |
102 | &tfreq_priv->max_freq_notifier); | 98 | &tfreq_priv->max_freq_notifier); |
103 | #endif | ||
104 | } | 99 | } |
105 | 100 | ||
106 | struct device_node *of_get_scaling_node(const char *name) | 101 | struct device_node *of_get_scaling_node(const char *name) |
diff --git a/drivers/cpufreq/tegra_cpufreq.c b/drivers/cpufreq/tegra_cpufreq.c index d4d7dc600..135f2f181 100644 --- a/drivers/cpufreq/tegra_cpufreq.c +++ b/drivers/cpufreq/tegra_cpufreq.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This software is licensed under the terms of the GNU General Public | 4 | * This software is licensed under the terms of the GNU General Public |
5 | * License version 2, as published by the Free Software Foundation, and | 5 | * License version 2, as published by the Free Software Foundation, and |
@@ -982,10 +982,8 @@ static int tegra_boundaries_policy_notifier(struct notifier_block *nb, | |||
982 | if (event != CPUFREQ_ADJUST) | 982 | if (event != CPUFREQ_ADJUST) |
983 | return NOTIFY_OK; | 983 | return NOTIFY_OK; |
984 | 984 | ||
985 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
986 | qmin = pm_qos_read_min_bound(PM_QOS_CPU_FREQ_BOUNDS); | 985 | qmin = pm_qos_read_min_bound(PM_QOS_CPU_FREQ_BOUNDS); |
987 | qmax = pm_qos_read_max_bound(PM_QOS_CPU_FREQ_BOUNDS); | 986 | qmax = pm_qos_read_max_bound(PM_QOS_CPU_FREQ_BOUNDS); |
988 | #endif | ||
989 | 987 | ||
990 | /* | 988 | /* |
991 | * Clamp pmqos to stay within sysfs upper boundary | 989 | * Clamp pmqos to stay within sysfs upper boundary |
@@ -1057,14 +1055,10 @@ static struct notifier_block tegra_cpu_pm_nb = { | |||
1057 | 1055 | ||
1058 | static void pm_qos_register_notifier(void) | 1056 | static void pm_qos_register_notifier(void) |
1059 | { | 1057 | { |
1060 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
1061 | pm_qos_add_min_notifier(PM_QOS_CPU_FREQ_BOUNDS, | 1058 | pm_qos_add_min_notifier(PM_QOS_CPU_FREQ_BOUNDS, |
1062 | &cluster_freq_nb); | 1059 | &cluster_freq_nb); |
1063 | pm_qos_add_max_notifier(PM_QOS_CPU_FREQ_BOUNDS, | 1060 | pm_qos_add_max_notifier(PM_QOS_CPU_FREQ_BOUNDS, |
1064 | &cluster_freq_nb); | 1061 | &cluster_freq_nb); |
1065 | #else | ||
1066 | pr_info("pm_qos for cpufreq yet to be done: %p\n", &cluster_freq_nb); | ||
1067 | #endif | ||
1068 | } | 1062 | } |
1069 | 1063 | ||
1070 | /* Free lut space shared beteen CPU and BPMP */ | 1064 | /* Free lut space shared beteen CPU and BPMP */ |