]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/power/x86/intel-speed-select: Update max frequency
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 16 Dec 2021 01:28:02 +0000 (17:28 -0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 24 Dec 2021 11:51:34 +0000 (12:51 +0100)
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 <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
tools/power/x86/intel-speed-select/isst-config.c

index bf9fd3549a1d5e837c73e24ae35f3ef13d918d69..7967a04559e1c86922575edeae020756347f4325 100644 (file)
@@ -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);
        }
 }