cpufreq: Allow configuring default minimum frequencies in Kconfig
This adds config options that set the default minimum frequency for the little, big, and prime CPU clusters. Signed-off-by: Danny Lin <danny@kdrag0n.dev> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
committed by
UtsavBalar1231
parent
df8efb156b
commit
0aaecd3249
@@ -250,6 +250,33 @@ config CPU_FREQ_GOV_INTERACTIVE
|
||||
|
||||
If in doubt, say N.
|
||||
|
||||
config CPU_FREQ_DEFAULT_LITTLE_MIN
|
||||
int "Default minimum frequency for the little cluster"
|
||||
default 0
|
||||
help
|
||||
This sets the default minimum frequency (in kHz) for the little CPU
|
||||
cluster.
|
||||
|
||||
If in doubt, say 0 to use the hardware's minimum frequency.
|
||||
|
||||
config CPU_FREQ_DEFAULT_BIG_MIN
|
||||
int "Default minimum frequency for the big cluster"
|
||||
default 0
|
||||
help
|
||||
This sets the default minimum frequency (in kHz) for the big CPU
|
||||
cluster.
|
||||
|
||||
If in doubt, say 0 to use the hardware's minimum frequency.
|
||||
|
||||
config CPU_FREQ_DEFAULT_PRIME_MIN
|
||||
int "Default minimum frequency for the prime cluster"
|
||||
default 0
|
||||
help
|
||||
This sets the default minimum frequency (in kHz) for the prime CPU
|
||||
cluster.
|
||||
|
||||
If in doubt, say 0 to use the hardware's minimum frequency.
|
||||
|
||||
comment "CPU frequency scaling drivers"
|
||||
|
||||
config CPUFREQ_DT
|
||||
|
||||
@@ -58,6 +58,19 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
|
||||
policy->min = policy->cpuinfo.min_freq = min_freq;
|
||||
policy->max = policy->cpuinfo.max_freq = max_freq;
|
||||
|
||||
#if CONFIG_CPU_FREQ_DEFAULT_LITTLE_MIN
|
||||
if (cpumask_test_cpu(policy->cpu, cpu_lp_mask))
|
||||
policy->min = CONFIG_CPU_FREQ_DEFAULT_LITTLE_MIN;
|
||||
#endif
|
||||
#if CONFIG_CPU_FREQ_DEFAULT_BIG_MIN
|
||||
if (cpumask_test_cpu(policy->cpu, cpu_perf_mask))
|
||||
policy->min = CONFIG_CPU_FREQ_DEFAULT_BIG_MIN;
|
||||
#endif
|
||||
#if CONFIG_CPU_FREQ_DEFAULT_PRIME_MIN
|
||||
if (cpumask_test_cpu(policy->cpu, cpu_perfp_mask))
|
||||
policy->min = CONFIG_CPU_FREQ_DEFAULT_PRIME_MIN;
|
||||
#endif
|
||||
|
||||
if (max_freq > cpuinfo_max_freq_cached)
|
||||
cpuinfo_max_freq_cached = max_freq;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user