From c7920924ec33f00dd379d378f8bbaca62787ccbe Mon Sep 17 00:00:00 2001 From: Shivnandan Kumar Date: Thu, 14 Mar 2024 16:42:41 +0530 Subject: [PATCH] sched/walt: Honor scaling_min_freq/scaling_max_freq If scaling_min_freq/scaling_max_freq changes, then there can be scenarios where it is not honored promptly due to down_rate_delay_ns and up_rate_delay_ns. Remove this check as scaling_cur_freq should honor scaling_min_freq and scaling_max_freq. Change-Id: I9dcc7cc431ab0b56872fbd6ee4b21e5dc86284fc Signed-off-by: Shivnandan Kumar --- kernel/sched/walt/cpufreq_walt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/sched/walt/cpufreq_walt.c b/kernel/sched/walt/cpufreq_walt.c index aced22fd3b40..7e180e327092 100644 --- a/kernel/sched/walt/cpufreq_walt.c +++ b/kernel/sched/walt/cpufreq_walt.c @@ -5,7 +5,7 @@ * * Copyright (C) 2016, Intel Corporation * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -1228,9 +1228,8 @@ static void waltgov_limits(struct cpufreq_policy *policy) * to do any sort of additional validation here. */ final_freq = cpufreq_driver_resolve_freq(policy, freq); - - if (waltgov_update_next_freq(wg_policy, now, final_freq, - final_freq)) { + if (wg_policy->next_freq != final_freq) { + __waltgov_update_next_freq(wg_policy, now, final_freq, final_freq); waltgov_fast_switch(wg_policy, now, final_freq); } }