cpufreq: schedutil: Avoid processing certain notifications
Prevent processing notifications from scheduler for pl if pl is
not enabled.
Change-Id: I091ee107af21fe94177e0bd051f8ee546f3a1678
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index bc55f3f..3f3d78b 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -318,6 +318,9 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
unsigned int next_f;
bool busy;
+ if (!sg_policy->tunables->pl && flags & SCHED_CPUFREQ_PL)
+ return;
+
sugov_set_iowait_boost(sg_cpu, time, flags);
sg_cpu->last_update = time;
@@ -396,6 +399,9 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,
unsigned long util, max, hs_util;
unsigned int next_f;
+ if (!sg_policy->tunables->pl && flags & SCHED_CPUFREQ_PL)
+ return;
+
sugov_get_util(&util, &max, sg_cpu->cpu);
flags &= ~SCHED_CPUFREQ_RT_DL;