提交 c59df5dc 编写于 作者: P Prarit Bhargava 提交者: Caspar Zhang

tools/power/x86/intel-speed-select: Simplify output for turbo-freq and base-freq

task #29499913

commit dece22a2d5e37cf7c4cda9a7d5f036c9b3fdaccb upstream

The current output of 'intel-speed-select -c 53 perf-profile info -l 0'
shows

        speed-select-turbo-freq-support:1
        speed-select-base-freq-support:1
        speed-select-base-freq-enabled:0
        speed-select-turbo-freq-enabled:0

Simplify the output to single lines displaying status of disabled,
enabled, and unsupported.
Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: David Arcari <darcari@redhat.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NErwei Deng <erwei@linux.alibaba.com>
Reviewed-by: NArtie Ding <artie.ding@linux.alibaba.com>
上级 f9606605
......@@ -297,23 +297,25 @@ void isst_ctdp_display_information(int cpu, FILE *outf, int tdp_level,
format_and_print(outf, base_level + 4, header, value);
snprintf(header, sizeof(header),
"speed-select-turbo-freq-support");
snprintf(value, sizeof(value), "%d", ctdp_level->fact_support);
"speed-select-turbo-freq");
if (ctdp_level->fact_support) {
if (ctdp_level->fact_enabled)
snprintf(value, sizeof(value), "enabled");
else
snprintf(value, sizeof(value), "disabled");
} else
snprintf(value, sizeof(value), "unsupported");
format_and_print(outf, base_level + 4, header, value);
snprintf(header, sizeof(header),
"speed-select-base-freq-support");
snprintf(value, sizeof(value), "%d", ctdp_level->pbf_support);
format_and_print(outf, base_level + 4, header, value);
snprintf(header, sizeof(header),
"speed-select-base-freq-enabled");
snprintf(value, sizeof(value), "%d", ctdp_level->pbf_enabled);
format_and_print(outf, base_level + 4, header, value);
snprintf(header, sizeof(header),
"speed-select-turbo-freq-enabled");
snprintf(value, sizeof(value), "%d", ctdp_level->fact_enabled);
"speed-select-base-freq");
if (ctdp_level->pbf_support) {
if (ctdp_level->pbf_enabled)
snprintf(value, sizeof(value), "enabled");
else
snprintf(value, sizeof(value), "disabled");
} else
snprintf(value, sizeof(value), "unsupported");
format_and_print(outf, base_level + 4, header, value);
snprintf(header, sizeof(header), "thermal-design-power(W)");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册