diff options
author | 2024-12-18 13:09:55 -0600 | |
---|---|---|
committer | 2024-12-20 09:12:07 -0700 | |
commit | acf71265e4c0289e23ee1b66fc0977478edea9a5 (patch) | |
tree | cf31f70d42328baa21ff41d53ba10805ea53bfcb /tools | |
parent | cpupower: Add support for showing energy performance preference (diff) | |
download | wireguard-linux-acf71265e4c0289e23ee1b66fc0977478edea9a5.tar.xz wireguard-linux-acf71265e4c0289e23ee1b66fc0977478edea9a5.zip |
cpupower: Don't fetch maximum latency when EPP is enabled
When EPP has been enabled the hardware will autonomously change
frequencies on it's own and thus there is no latency with changing
from the kernel.
Avoid doing the maximum latency check when EPP is found. This will
apply to both amd-pstate and intel-pstate drivers.
Link: https://lore.kernel.org/r/20241218191144.3440854-7-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/cpupower/utils/cpufreq-info.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/power/cpupower/utils/cpufreq-info.c b/tools/power/cpupower/utils/cpufreq-info.c index eb9cc0f10634..fc750e127404 100644 --- a/tools/power/cpupower/utils/cpufreq-info.c +++ b/tools/power/cpupower/utils/cpufreq-info.c @@ -445,6 +445,9 @@ static int get_latency(unsigned int cpu, unsigned int human) { unsigned long latency = cpufreq_get_transition_latency(cpu); + if (!get_epp(cpu, false)) + return -EINVAL; + printf(_(" maximum transition latency: ")); if (!latency || latency == UINT_MAX) { printf(_(" Cannot determine or is not supported.\n")); |