From 406b0261c82377dc32e176641fdb2d322fdb1308 Mon Sep 17 00:00:00 2001 From: Manuel Diewald Date: Tue, 20 May 2025 15:25:09 +0200 Subject: [PATCH] UBUNTU: SAUCE: Revert "Revert "cpufreq: amd-pstate: Fix the inconsistency in max frequency units"" BugLink: https://bugs.launchpad.net/bugs/2109609 This reverts commit d76c1093e3fcc1a50d7eeee4f7537cfc7882e7a8 which is commit 07caf754f696cbb7037e4c0c5da5fdbbbba13364 upstream (linux-6.6.y). The regression that the original revert addresses only affects kernels older than 6.9.y that do not include commit ("5547c0ebfc2e cpufreq: amd-pstate: Unify computation of {max,min,nominal,lowest_nonlinear}_freq"). However, this commit was picked up in a stable update [1] for noble that includes v6.9.6, so noble is not affected by this regression. Unfortunately we later picked up the revert commit addressing the issue found in older kernels via another stable update [2] for noble including v6.6.37. Revert the revert from 6.6.y again so that correct frequencies are reported. [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2074091 [2] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2076435 Signed-off-by: Manuel Diewald Acked-by: Stefan Bader Acked-by: Edoardo Canepa Acked-by: Edoardo Canepa Signed-off-by: Mehmet Basaran --- drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 6f51c5e09795..56277f4f70b5 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -718,7 +718,7 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state) if (state) policy->cpuinfo.max_freq = cpudata->max_freq; else - policy->cpuinfo.max_freq = cpudata->nominal_freq; + policy->cpuinfo.max_freq = cpudata->nominal_freq * 1000; policy->max = policy->cpuinfo.max_freq;