diff options
author | Octav Zlatior <octav.zlatior@theobroma-systems.com> | 2015-05-27 18:02:27 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2015-07-30 18:53:01 +0200 |
commit | d9619b4709496273d3b1f73ea72ead643c744374 (patch) | |
tree | a38f7d949f6a46436d2559a372bc89014b6c5a35 /drivers/cpufreq/cpufreq_governor.c | |
parent | b3bc3244ea87a85a097830529811858f00c6bfa5 (diff) |
cpufreq: adds custom sampling-rate support in dt
This allows the setting of a sampling-rate property for a cpu in the
device-tree; if set, this will override the defaut sampling rate
calculation
Signed-off-by: Octav Zlatior <octav.zlatior@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_governor.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 1b44496b2d2b..53d06df86310 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -303,11 +303,16 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy, if (latency == 0) latency = 1; + sampling_rate = policy->cpuinfo.sampling_rate; + + if (sampling_rate == 0) + sampling_rate = latency * LATENCY_MULTIPLIER; + /* Bring kernel and HW constraints together */ dbs_data->min_sampling_rate = max(dbs_data->min_sampling_rate, MIN_LATENCY_MULTIPLIER * latency); set_sampling_rate(dbs_data, max(dbs_data->min_sampling_rate, - latency * LATENCY_MULTIPLIER)); + sampling_rate)); if ((cdata->governor == GOV_CONSERVATIVE) && (!policy->governor->initialized)) { |