diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2020-03-05 14:45:31 -0800 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-03-20 14:46:22 +0200 |
commit | fe6fb2165ade451d7a354787a8e4f00fa5bd3e44 (patch) | |
tree | 7bca77f741aa84612b9d71381ca4f467128db69e /tools/power/x86/intel-speed-select/isst-core.c | |
parent | 95f8e5694580cbf80599c6a5874cf4fba8b17141 (diff) | |
download | linux-fe6fb2165ade451d7a354787a8e4f00fa5bd3e44.tar.bz2 |
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-core.c')
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-core.c b/tools/power/x86/intel-speed-select/isst-core.c index 89b3068a2685..67c9b1139631 100644 --- a/tools/power/x86/intel-speed-select/isst-core.c +++ b/tools/power/x86/intel-speed-select/isst-core.c @@ -917,17 +917,19 @@ int isst_pm_qos_config(int cpu, int enable_clos, int priority_type) } ret = isst_write_pm_config(cpu, 0); if (ret) - perror("isst_write_pm_config\n"); + isst_display_error_info_message(0, "WRITE_PM_CONFIG command failed, ignoring error\n", 0, 0); } else { ret = isst_write_pm_config(cpu, 1); if (ret) - perror("isst_write_pm_config\n"); + isst_display_error_info_message(0, "WRITE_PM_CONFIG command failed, ignoring error\n", 0, 0); } ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PM_QOS_CONFIG, 0, 0, &resp); - if (ret) + if (ret) { + isst_display_error_info_message(1, "CLOS_PM_QOS_CONFIG command failed", 0, 0); return ret; + } debug_printf("cpu:%d CLOS_PM_QOS_CONFIG resp:%x\n", cpu, resp); @@ -939,7 +941,7 @@ int isst_pm_qos_config(int cpu, int enable_clos, int priority_type) req = req & ~BIT(1); if (priority_type > 1) - fprintf(stderr, "Invalid priority type: Changing type to ordered\n"); + isst_display_error_info_message(1, "Invalid priority type: Changing type to ordered", 0, 0); if (priority_type) req = req | BIT(2); |