aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Pandruvada <[email protected]>2022-05-09 19:34:21 -0700
committerHans de Goede <[email protected]>2022-05-12 15:35:30 +0200
commit2da6391dfc2aa4c5ef97fe94d2173e87a7bfb534 (patch)
tree6f7bc41e23f3c5525a70f72d98beac0c46ebc64b
parent34604d28916710070390036118fcd21217b0f597 (diff)
tools/power/x86/intel-speed-select: Display error on turbo mode disabled
For Intel SST turbo-freq feature to be enabled, the turbo mode on the platform must be enabled also. If turbo mode is disabled, display error while enabling turbo-freq feature. Signed-off-by: Srinivas Pandruvada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r--tools/power/x86/intel-speed-select/isst-config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index 060390e88e37..9d35614995ee 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -1892,6 +1892,12 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
int ret;
int status = *(int *)arg4;
+ if (status && no_turbo()) {
+ isst_display_error_info_message(1, "Turbo mode is disabled", 0, 0);
+ ret = -1;
+ goto disp_results;
+ }
+
ret = isst_get_ctdp_levels(cpu, &pkg_dev);
if (ret) {
isst_display_error_info_message(1, "Failed to get number of levels", 0, 0);