sched: walt: use scale_cpu for energy evals

Currently, when adjusting the max util with respect to current cluster
frequency, we use capacity_orig_of as the multiplier. This is incorrect,
because capacity_orig_of will change depending on the current max freq.

Change-Id: Ifb38c46a8dc68d18458f6b683f0e8e66857a0644
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:
Shaleen Agrawal 2021-07-14 13:36:47 -07:00 committed by Rishabh Bhatnagar
parent 8ce4bfae2f
commit f2c3618a64

View File

@ -517,7 +517,7 @@ static inline unsigned long walt_em_cpu_energy(struct em_perf_domain *pd,
max_util = max_util + (max_util >> 2); /* account for TARGET_LOAD usually 80 */
max_util = max(max_util,
(arch_scale_freq_capacity(cpu) * capacity_orig_of(cpu)) >>
(arch_scale_freq_capacity(cpu) * scale_cpu) >>
SCHED_CAPACITY_SHIFT);
/*