]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpufreq: apple-soc: Set fallback transition latency to APPLE_DVFS_TRANSITION_TIMEOUT
authorNick Chan <towinchenmi@gmail.com>
Wed, 18 Dec 2024 18:25:08 +0000 (02:25 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 23 Dec 2024 10:56:47 +0000 (16:26 +0530)
The driver already assumes transitions will not take longer than
APPLE_DVFS_TRANSITION_TIMEOUT in apple_soc_cpufreq_set_target(), so it
makes little sense to set CPUFREQ_ETERNAL as the transition latency
when the transistion latency is not given by the opp-table.

Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/apple-soc-cpufreq.c

index 94e57f055a5ffa0cd6bcfde6e4d427706762d680..879ddec9e557d00d96eb1250fb04ccfb7d1b8966 100644 (file)
@@ -291,7 +291,7 @@ static int apple_soc_cpufreq_init(struct cpufreq_policy *policy)
 
        transition_latency = dev_pm_opp_get_max_transition_latency(cpu_dev);
        if (!transition_latency)
-               transition_latency = CPUFREQ_ETERNAL;
+               transition_latency = APPLE_DVFS_TRANSITION_TIMEOUT * NSEC_PER_USEC;
 
        policy->cpuinfo.transition_latency = transition_latency;
        policy->dvfs_possible_from_any_cpu = true;