mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
cpufreq: Use CPUFREQ_RELATION_E in DVFS governors
Let the governors schedutil, conservative and ondemand to work, if possible on efficient frequencies only. Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
1f39fa0dcc
commit
b894d20e68
4 changed files with 18 additions and 10 deletions
|
@ -283,6 +283,10 @@ static inline void cpufreq_stats_record_transition(struct cpufreq_policy *policy
|
|||
/* relation flags */
|
||||
#define CPUFREQ_RELATION_E BIT(2) /* Get if possible an efficient frequency */
|
||||
|
||||
#define CPUFREQ_RELATION_LE (CPUFREQ_RELATION_L | CPUFREQ_RELATION_E)
|
||||
#define CPUFREQ_RELATION_HE (CPUFREQ_RELATION_H | CPUFREQ_RELATION_E)
|
||||
#define CPUFREQ_RELATION_CE (CPUFREQ_RELATION_C | CPUFREQ_RELATION_E)
|
||||
|
||||
struct freq_attr {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct cpufreq_policy *, char *);
|
||||
|
@ -636,9 +640,11 @@ struct cpufreq_governor *cpufreq_fallback_governor(void);
|
|||
static inline void cpufreq_policy_apply_limits(struct cpufreq_policy *policy)
|
||||
{
|
||||
if (policy->max < policy->cur)
|
||||
__cpufreq_driver_target(policy, policy->max, CPUFREQ_RELATION_H);
|
||||
__cpufreq_driver_target(policy, policy->max,
|
||||
CPUFREQ_RELATION_HE);
|
||||
else if (policy->min > policy->cur)
|
||||
__cpufreq_driver_target(policy, policy->min, CPUFREQ_RELATION_L);
|
||||
__cpufreq_driver_target(policy, policy->min,
|
||||
CPUFREQ_RELATION_LE);
|
||||
}
|
||||
|
||||
/* Governor attribute set */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue