Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27ed3cd2 authored by Stratos Karafotis's avatar Stratos Karafotis Committed by Rafael J. Wysocki
Browse files

cpufreq: conservative: Fix the logic in frequency decrease checking



When we evaluate the CPU load for frequency decrease we have to compare
the load against down_threshold. There is no need to subtract 10 points
from down_threshold.

Instead, we have to use the default down_threshold or user's selection
unmodified.

Signed-off-by: default avatarStratos Karafotis <stratosk@semaphore.gr>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 7af1c056
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -86,12 +86,8 @@ static void cs_check_cpu(int cpu, unsigned int load)
		return;
	dbs_info->down_skip = 0;

	/*
	 * The optimal frequency is the frequency that is the lowest that can
	 * support the current CPU usage without triggering the up policy. To be
	 * safe, we focus 10 points under the threshold.
	 */
	if (load < (cs_tuners->down_threshold - 10)) {
	/* Check for frequency decrease */
	if (load < cs_tuners->down_threshold) {
		/*
		 * if we cannot reduce the frequency anymore, break out early
		 */