Commit 14a8aa49 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Andy Shevchenko

tools/power/x86/intel-speed-select: Fix display for turbo-freq auto mode

When mailbox command for the turbo-freq enable fails, then don't display
result for auto-mode. When turbo-freq enable fails, there is no point
to set CPU priorities.
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent e5e32572
...@@ -42,6 +42,7 @@ static int out_format_json; ...@@ -42,6 +42,7 @@ static int out_format_json;
static int cmd_help; static int cmd_help;
static int force_online_offline; static int force_online_offline;
static int auto_mode; static int auto_mode;
static int fact_enable_fail;
/* clos related */ /* clos related */
static int current_clos = -1; static int current_clos = -1;
...@@ -1527,6 +1528,8 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3, ...@@ -1527,6 +1528,8 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
disp_results: disp_results:
if (status) { if (status) {
isst_display_result(cpu, outf, "turbo-freq", "enable", ret); isst_display_result(cpu, outf, "turbo-freq", "enable", ret);
if (ret)
fact_enable_fail = ret;
} else { } else {
/* Since we modified TRL during Fact enable, restore it */ /* Since we modified TRL during Fact enable, restore it */
isst_set_trl_from_current_tdp(cpu, fact_trl); isst_set_trl_from_current_tdp(cpu, fact_trl);
...@@ -1568,7 +1571,7 @@ static void set_fact_enable(int arg) ...@@ -1568,7 +1571,7 @@ static void set_fact_enable(int arg)
NULL, &enable); NULL, &enable);
isst_ctdp_display_information_end(outf); isst_ctdp_display_information_end(outf);
if (enable && auto_mode) { if (!fact_enable_fail && enable && auto_mode) {
/* /*
* When we adjust CLOS param, we have to set for siblings also. * When we adjust CLOS param, we have to set for siblings also.
* So for the each user specified CPU, also add the sibling * So for the each user specified CPU, also add the sibling
......
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