Commit 097a5222 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Andy Shevchenko

tools/power/x86/intel-speed-select: Change the order for clos disable

In turbo-freq or base-freq auto mode, for disable, first disable the feature and
then disable clos.
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 78e77b7d
...@@ -1384,14 +1384,10 @@ static void set_pbf_for_cpu(int cpu, void *arg1, void *arg2, void *arg3, ...@@ -1384,14 +1384,10 @@ static void set_pbf_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
goto disp_result; goto disp_result;
} }
if (auto_mode) { if (auto_mode && status) {
if (status) { ret = set_pbf_core_power(cpu);
ret = set_pbf_core_power(cpu); if (ret)
if (ret) goto disp_result;
goto disp_result;
} else {
isst_pm_qos_config(cpu, 0, 0);
}
} }
ret = isst_set_pbf_fact_status(cpu, 1, status); ret = isst_set_pbf_fact_status(cpu, 1, status);
...@@ -1408,6 +1404,9 @@ static void set_pbf_for_cpu(int cpu, void *arg1, void *arg2, void *arg3, ...@@ -1408,6 +1404,9 @@ static void set_pbf_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
} }
} }
if (auto_mode && !status)
isst_pm_qos_config(cpu, 0, 0);
disp_result: disp_result:
if (status) if (status)
isst_display_result(cpu, outf, "base-freq", "enable", isst_display_result(cpu, outf, "base-freq", "enable",
...@@ -1496,14 +1495,10 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3, ...@@ -1496,14 +1495,10 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
int ret; int ret;
int status = *(int *)arg4; int status = *(int *)arg4;
if (auto_mode) { if (auto_mode && status) {
if (status) { ret = isst_pm_qos_config(cpu, 1, 1);
ret = isst_pm_qos_config(cpu, 1, 1); if (ret)
if (ret) goto disp_results;
goto disp_results;
} else {
isst_pm_qos_config(cpu, 0, 0);
}
} }
ret = isst_set_pbf_fact_status(cpu, 0, status); ret = isst_set_pbf_fact_status(cpu, 0, status);
...@@ -1524,6 +1519,9 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3, ...@@ -1524,6 +1519,9 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
ret = isst_set_trl(cpu, fact_trl); ret = isst_set_trl(cpu, fact_trl);
if (ret && auto_mode) if (ret && auto_mode)
isst_pm_qos_config(cpu, 0, 0); isst_pm_qos_config(cpu, 0, 0);
} else {
if (auto_mode)
isst_pm_qos_config(cpu, 0, 0);
} }
disp_results: disp_results:
......
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