Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

authored by

Srinivas Pandruvada and committed by
Andy Shevchenko
14a8aa49 e5e32572

+4 -1
+4 -1
tools/power/x86/intel-speed-select/isst-config.c
··· 42 42 static int cmd_help; 43 43 static int force_online_offline; 44 44 static int auto_mode; 45 + static int fact_enable_fail; 45 46 46 47 /* clos related */ 47 48 static int current_clos = -1; ··· 1528 1527 disp_results: 1529 1528 if (status) { 1530 1529 isst_display_result(cpu, outf, "turbo-freq", "enable", ret); 1530 + if (ret) 1531 + fact_enable_fail = ret; 1531 1532 } else { 1532 1533 /* Since we modified TRL during Fact enable, restore it */ 1533 1534 isst_set_trl_from_current_tdp(cpu, fact_trl); ··· 1571 1568 NULL, &enable); 1572 1569 isst_ctdp_display_information_end(outf); 1573 1570 1574 - if (enable && auto_mode) { 1571 + if (!fact_enable_fail && enable && auto_mode) { 1575 1572 /* 1576 1573 * When we adjust CLOS param, we have to set for siblings also. 1577 1574 * So for the each user specified CPU, also add the sibling