From: Xiaoguang Chen Date: Fri, 8 Nov 2013 05:23:52 +0000 (+0800) Subject: cpufreq: conservative: set requested_freq to policy max when it is over policy max X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6d7bcb1464a89181ddc4b4584ad6e0c7566ae31b;p=linux-beck.git cpufreq: conservative: set requested_freq to policy max when it is over policy max When requested_freq is over policy->max, set it to policy->max. This can help to speed up decreasing frequency. Signed-off-by: Xiaoguang Chen Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 218460fcd2e4..25a70d06c5bf 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -68,6 +68,9 @@ static void cs_check_cpu(int cpu, unsigned int load) dbs_info->requested_freq += get_freq_target(cs_tuners, policy); + if (dbs_info->requested_freq > policy->max) + dbs_info->requested_freq = policy->max; + __cpufreq_driver_target(policy, dbs_info->requested_freq, CPUFREQ_RELATION_H); return;