Commit 7fc9fefd authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Andy Shevchenko

tools/power/x86/intel-speed-select: Improve CLX commands

CLX doesn't have capability to change the feature in the hardware, but
this acts as "--auto | -a" option. So even if user didn't specify the
option, use this as --auto | -a to set cpufreq scaling frequency limits.

Also remove perror with debug_printf as they don't bring any value.
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 070fdea1
...@@ -1162,7 +1162,7 @@ static void dump_clx_n_config_for_cpu(int cpu, void *arg1, void *arg2, ...@@ -1162,7 +1162,7 @@ static void dump_clx_n_config_for_cpu(int cpu, void *arg1, void *arg2,
ret = clx_n_config(cpu); ret = clx_n_config(cpu);
if (ret) { if (ret) {
perror("isst_get_process_ctdp"); debug_printf("clx_n_config failed");
} else { } else {
struct isst_pkg_ctdp_level_info *ctdp_level; struct isst_pkg_ctdp_level_info *ctdp_level;
struct isst_pbf_info *pbf_info; struct isst_pbf_info *pbf_info;
...@@ -1419,7 +1419,7 @@ static int set_clx_pbf_cpufreq_scaling_min_max(int cpu) ...@@ -1419,7 +1419,7 @@ static int set_clx_pbf_cpufreq_scaling_min_max(int cpu)
ret = clx_n_config(cpu); ret = clx_n_config(cpu);
if (ret) { if (ret) {
perror("set_clx_pbf_cpufreq_scaling_min_max"); debug_printf("cpufreq_scaling_min_max failed for CLX");
return ret; return ret;
} }
...@@ -1635,18 +1635,14 @@ static void set_pbf_for_cpu(int cpu, void *arg1, void *arg2, void *arg3, ...@@ -1635,18 +1635,14 @@ static void set_pbf_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
int status = *(int *)arg4; int status = *(int *)arg4;
if (is_clx_n_platform()) { if (is_clx_n_platform()) {
if (status) {
ret = 0; ret = 0;
if (auto_mode) if (status) {
set_clx_pbf_cpufreq_scaling_min_max(cpu); set_clx_pbf_cpufreq_scaling_min_max(cpu);
} else { } else {
ret = -1;
if (auto_mode) {
set_scaling_max_to_cpuinfo_max(cpu); set_scaling_max_to_cpuinfo_max(cpu);
set_scaling_min_to_cpuinfo_min(cpu); set_scaling_min_to_cpuinfo_min(cpu);
} }
}
goto disp_result; goto disp_result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment