tools/power/x86/intel-speed-select: Display AMX base frequency
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 23 Feb 2023 13:59:24 +0000 (05:59 -0800)
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 22 Mar 2023 20:41:17 +0000 (13:41 -0700)
AMX frequency is present in non TPMI platforms also. When platform
supports, the value is non zero. So, display AMX base frequency when
non zero, irrespective of platform API version.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
tools/power/x86/intel-speed-select/isst-core-mbox.c
tools/power/x86/intel-speed-select/isst-display.c

index 6eafef9..6951a9c 100644 (file)
@@ -383,10 +383,11 @@ static void _get_p1_info(struct isst_id *id, int config_index,
        ctdp_level->sse_p1 = resp & GENMASK(7, 0);
        ctdp_level->avx2_p1 = (resp & GENMASK(15, 8)) >> 8;
        ctdp_level->avx512_p1 = (resp & GENMASK(23, 16)) >> 16;
+       ctdp_level->amx_p1 = (resp & GENMASK(31, 24)) >> 24;
        debug_printf(
-               "cpu:%d ctdp:%d CONFIG_TDP_GET_P1_INFO resp:%x sse_p1:%d avx2_p1:%d avx512_p1:%d\n",
+               "cpu:%d ctdp:%d CONFIG_TDP_GET_P1_INFO resp:%x sse_p1:%d avx2_p1:%d avx512_p1:%d amx_p1:%d\n",
                id->cpu, config_index, resp, ctdp_level->sse_p1,
-               ctdp_level->avx2_p1, ctdp_level->avx512_p1);
+               ctdp_level->avx2_p1, ctdp_level->avx512_p1, ctdp_level->amx_p1);
 }
 
 static void _get_uncore_mem_freq(struct isst_id *id, int config_index,
index 218fb31..0e364b3 100644 (file)
@@ -424,7 +424,7 @@ void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level
                        format_and_print(outf, level + 2, header, value);
                }
 
-               if (api_version() > 1 && ctdp_level->amx_p1) {
+               if (ctdp_level->amx_p1) {
                        snprintf(header, sizeof(header), "base-frequency-amx(MHz)");
                        snprintf(value, sizeof(value), "%d",
                        ctdp_level->amx_p1 * isst_get_disp_freq_multiplier());