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>
This commit is contained in:
Srinivas Pandruvada
2020-03-05 14:45:31 -08:00
committed by Andy Shevchenko
parent 95f8e56945
commit fe6fb2165a
3 changed files with 62 additions and 40 deletions

View File

@@ -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");