aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/x86/intel-speed-select/isst-display.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2020-03-05 14:45:31 -0800
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-03-20 14:46:22 +0200
commitfe6fb2165ade451d7a354787a8e4f00fa5bd3e44 (patch)
tree7bca77f741aa84612b9d71381ca4f467128db69e /tools/power/x86/intel-speed-select/isst-display.c
parenttools/power/x86/intel-speed-select: Kernel interface error handling (diff)
downloadlinux-dev-fe6fb2165ade451d7a354787a8e4f00fa5bd3e44.tar.xz
linux-dev-fe6fb2165ade451d7a354787a8e4f00fa5bd3e44.zip
tools/power/x86/intel-speed-select: Improve core-power result and error display
This change adds improved error display and handling for commands related to core-power feature. The changes include: - Replace perror with helpful error message - Use ordered priority for SKX based platform by default as the proportional priority is not supported - Don't show weight and epp in help and also give error when user tries to set them in SKX based platforms - Range check for epp and weights and display error Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'tools/power/x86/intel-speed-select/isst-display.c')
-rw-r--r--tools/power/x86/intel-speed-select/isst-display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-display.c b/tools/power/x86/intel-speed-select/isst-display.c
index bf9422336fab..ed51d8b79c41 100644
--- a/tools/power/x86/intel-speed-select/isst-display.c
+++ b/tools/power/x86/intel-speed-select/isst-display.c
@@ -599,7 +599,10 @@ void isst_clos_display_information(int cpu, FILE *outf, int clos,
format_and_print(outf, 5, header, value);
snprintf(header, sizeof(header), "clos-max");
- snprintf(value, sizeof(value), "%d MHz", clos_config->clos_max * DISP_FREQ_MULTIPLIER);
+ if (clos_config->clos_max == 0xff)
+ snprintf(value, sizeof(value), "Max Turbo frequency");
+ else
+ snprintf(value, sizeof(value), "%d MHz", clos_config->clos_max * DISP_FREQ_MULTIPLIER);
format_and_print(outf, 5, header, value);
snprintf(header, sizeof(header), "clos-desired");