mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
cpufreq: Adjust target frequency according to cpu threshold
Change-Id: Idd86ef55aad09860a6dc726c7285ee39b0845a38 Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -1983,6 +1983,9 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
|
||||
if (cpufreq_disabled())
|
||||
return -ENODEV;
|
||||
|
||||
#ifdef CONFIG_ARM_ROCKCHIP_CPUFREQ
|
||||
target_freq = rockchip_cpufreq_adjust_target(policy->cpu, target_freq);
|
||||
#endif
|
||||
/* Make sure that target_freq is within supported range */
|
||||
target_freq = clamp_val(target_freq, policy->min, policy->max);
|
||||
|
||||
|
||||
@@ -978,4 +978,13 @@ unsigned int cpufreq_generic_get(unsigned int cpu);
|
||||
int cpufreq_generic_init(struct cpufreq_policy *policy,
|
||||
struct cpufreq_frequency_table *table,
|
||||
unsigned int transition_latency);
|
||||
#ifdef CONFIG_ARM_ROCKCHIP_CPUFREQ
|
||||
unsigned int rockchip_cpufreq_adjust_target(int cpu, unsigned int freq);
|
||||
#else
|
||||
static inline unsigned int rockchip_cpufreq_adjust_target(int cpu,
|
||||
unsigned int freq)
|
||||
{
|
||||
return freq;
|
||||
}
|
||||
#endif
|
||||
#endif /* _LINUX_CPUFREQ_H */
|
||||
|
||||
Reference in New Issue
Block a user