@@ -3053,6 +3053,20 @@
return 0;
}
+static bool cpufreq_policy_is_good_for_eas(struct cpufreq_policy *policy)
+{
+ /*
+ * For EAS compatibility, require that either schedutil is the policy
+ * governor or the policy is governed directly by the cpufreq driver.
+ *
+ * In the latter case, it is assumed that EAS can only be enabled by the
+ * cpufreq driver itself which will not enable EAS if it does not meet
+ * the EAS' expectations regarding performance scaling response.
+ */
+ return sugov_is_cpufreq_governor(policy) || (!policy->governor &&
+ policy->policy != CPUFREQ_POLICY_UNKNOWN);
+}
+
bool cpufreq_ready_for_eas(const struct cpumask *cpu_mask)
{
int i;
@@ -3069,7 +3083,7 @@
return false;
}
- policy_is_ready = sugov_is_cpufreq_governor(policy);
+ policy_is_ready = cpufreq_policy_is_good_for_eas(policy);
cpufreq_cpu_put(policy);
if (!policy_is_ready) {
pr_debug("rd %*pbl: schedutil is mandatory for EAS\n",