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

Commit f22a034b authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: schedutil: fix CPU util when WALT is enabled"

parents fa10563f 8f8f9811
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -390,17 +390,17 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu)
{
	struct rq *rq = cpu_rq(sg_cpu->cpu);
	unsigned long max = arch_scale_cpu_capacity(sg_cpu->cpu);
#ifdef CONFIG_SCHED_WALT
	unsigned long util;

	sg_cpu->max = max;
	sg_cpu->bw_dl = cpu_bw_dl(rq);

	return cpu_util_freq(sg_cpu->cpu, &sg_cpu->walt_load);
#else
	unsigned long util = cpu_util_freq(sg_cpu->cpu, NULL) + cpu_util_rt(rq);
#ifdef CONFIG_SCHED_WALT
	util = cpu_util_freq(sg_cpu->cpu, &sg_cpu->walt_load);

	sg_cpu->max = max;
	sg_cpu->bw_dl = cpu_bw_dl(rq);
	return uclamp_util(rq, util);
#else
	util = cpu_util_freq(sg_cpu->cpu, NULL) + cpu_util_rt(rq);

	return schedutil_cpu_util(sg_cpu->cpu, util, max, FREQUENCY_UTIL, NULL);
#endif