Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1698273 > unrolled thread
| Started by | Dietmar Eggemann <dietmar.eggemann@arm.com> |
|---|---|
| First post | 2017-07-27 21:40 +0200 |
| Last post | 2017-07-28 10:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 04/10] cpufreq: dt: invoke frequency-invariance setter function Dietmar Eggemann <dietmar.eggemann@arm.com> - 2017-07-27 21:40 +0200
Re: [PATCH v3 04/10] cpufreq: dt: invoke frequency-invariance setter function Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-28 10:30 +0200
| From | Dietmar Eggemann <dietmar.eggemann@arm.com> |
|---|---|
| Date | 2017-07-27 21:40 +0200 |
| Subject | [PATCH v3 04/10] cpufreq: dt: invoke frequency-invariance setter function |
| Message-ID | <u7WNB-1TC-33@gated-at.bofh.it> |
Call the frequency-invariance setter function arch_set_freq_scale()
if the new frequency has been successfully set which is indicated by
dev_pm_opp_set_rate() returning 0.
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
---
drivers/cpufreq/cpufreq-dt.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index fef3c2160691..cbac8a7dbc50 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -43,9 +43,17 @@ static struct freq_attr *cpufreq_dt_attr[] = {
static int set_target(struct cpufreq_policy *policy, unsigned int index)
{
struct private_data *priv = policy->driver_data;
+ unsigned long freq = policy->freq_table[index].frequency;
+ int ret;
+
+ ret = dev_pm_opp_set_rate(priv->cpu_dev, freq * 1000);
- return dev_pm_opp_set_rate(priv->cpu_dev,
- policy->freq_table[index].frequency * 1000);
+ if (!ret) {
+ arch_set_freq_scale(policy->related_cpus, freq,
+ policy->cpuinfo.max_freq);
+ }
+
+ return ret;
}
/*
--
2.11.0
[toc] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-07-28 10:30 +0200 |
| Subject | Re: [PATCH v3 04/10] cpufreq: dt: invoke frequency-invariance setter function |
| Message-ID | <u88OK-1fB-5@gated-at.bofh.it> |
| In reply to | #1698273 |
On 27-07-17, 20:33, Dietmar Eggemann wrote:
> Call the frequency-invariance setter function arch_set_freq_scale()
> if the new frequency has been successfully set which is indicated by
> dev_pm_opp_set_rate() returning 0.
>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
> ---
> drivers/cpufreq/cpufreq-dt.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
> index fef3c2160691..cbac8a7dbc50 100644
> --- a/drivers/cpufreq/cpufreq-dt.c
> +++ b/drivers/cpufreq/cpufreq-dt.c
> @@ -43,9 +43,17 @@ static struct freq_attr *cpufreq_dt_attr[] = {
> static int set_target(struct cpufreq_policy *policy, unsigned int index)
> {
> struct private_data *priv = policy->driver_data;
> + unsigned long freq = policy->freq_table[index].frequency;
> + int ret;
> +
> + ret = dev_pm_opp_set_rate(priv->cpu_dev, freq * 1000);
>
> - return dev_pm_opp_set_rate(priv->cpu_dev,
> - policy->freq_table[index].frequency * 1000);
> + if (!ret) {
> + arch_set_freq_scale(policy->related_cpus, freq,
> + policy->cpuinfo.max_freq);
> + }
> +
> + return ret;
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web