From 9734213ed413da5ac791a984c8cecf1612fe4888 Mon Sep 17 00:00:00 2001 From: Srinivas Pandruvada Date: Wed, 15 Dec 2021 17:28:02 -0800 Subject: tools/power/x86/intel-speed-select: Update max frequency When BIOS disables turbo, the cpuinfo_max_freq will also be same as the power up base frequency. When SST-PP causes increase in base frequency the performance will be still limited to the old base frequency as the cpuinfo_max_freq will not be updated. In this case we need to update scaling_max frequency to the new base_frequency. This will result in setting updated max performance limit in the Pstate driver. So performance will not be limited to the old base frequency. Signed-off-by: Srinivas Pandruvada Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- tools/power/x86/intel-speed-select/isst-config.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/power') diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index bf9fd3549a1d..7967a04559e1 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -1599,6 +1599,7 @@ static void set_scaling_min_to_cpuinfo_max(int cpu) die_id != get_physical_die_id(i)) continue; + adjust_scaling_max_from_base_freq(i); set_cpufreq_scaling_min_max_from_cpuinfo(i, 1, 0); adjust_scaling_min_from_base_freq(i); } @@ -1615,6 +1616,7 @@ static void set_scaling_min_to_cpuinfo_min(int cpu) die_id != get_physical_die_id(i)) continue; + adjust_scaling_max_from_base_freq(i); set_cpufreq_scaling_min_max_from_cpuinfo(i, 0, 0); } } -- cgit v1.2.3-58-ga151