Skip to content

Commit 2c00056

Browse files
committed
tools/power/x86/intel-speed-select: Change TRL display for Emerald Rapids
Emerald Rapids doesn't specify TRL (Turbo Ratio Limits) based instruction types. Instead it specifies 5 TRL levels, which can be anyone of the instruction types. Increase TRL levels to 5 for Emerald Rapids. Also change display to show by level number. Show only non zero level values. Signed-off-by: Srinivas Pandruvada <[email protected]>
1 parent 1d54b13 commit 2c00056

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

tools/power/x86/intel-speed-select/isst-core-mbox.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,33 @@
88
static int mbox_delay;
99
static int mbox_retries = 3;
1010

11+
#define MAX_TRL_LEVELS_EMR 5
12+
1113
static int mbox_get_disp_freq_multiplier(void)
1214
{
1315
return DISP_FREQ_MULTIPLIER;
1416
}
1517

1618
static int mbox_get_trl_max_levels(void)
1719
{
20+
if (is_emr_platform())
21+
return MAX_TRL_LEVELS_EMR;
22+
1823
return 3;
1924
}
2025

2126
static char *mbox_get_trl_level_name(int level)
2227
{
28+
if (is_emr_platform()) {
29+
static char level_str[18];
30+
31+
if (level >= MAX_TRL_LEVELS_EMR)
32+
return NULL;
33+
34+
snprintf(level_str, sizeof(level_str), "level-%d", level);
35+
return level_str;
36+
}
37+
2338
switch (level) {
2439
case 0:
2540
return "sse";

tools/power/x86/intel-speed-select/isst-display.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ static void _isst_fact_display_information(struct isst_id *id, FILE *outf, int l
283283
bucket_info[j].hp_cores);
284284
format_and_print(outf, base_level + 2, header, value);
285285
for (i = 0; i < trl_max_levels; i++) {
286-
if (fact_avx != 0xFF && !(fact_avx & (1 << i)))
286+
if (!bucket_info[j].hp_ratios[i] || (fact_avx != 0xFF && !(fact_avx & (1 << i))))
287287
continue;
288-
if (i == 0 && api_version() == 1)
288+
if (i == 0 && api_version() == 1 && !is_emr_platform())
289289
snprintf(header, sizeof(header),
290290
"high-priority-max-frequency(MHz)");
291291
else
@@ -301,8 +301,11 @@ static void _isst_fact_display_information(struct isst_id *id, FILE *outf, int l
301301
format_and_print(outf, base_level + 1, header, NULL);
302302

303303
for (j = 0; j < trl_max_levels; j++) {
304+
if (!fact_info->lp_ratios[j])
305+
continue;
306+
304307
/* No AVX level name for SSE to be consistent with previous formatting */
305-
if (j == 0 && api_version() == 1)
308+
if (j == 0 && api_version() == 1 && !is_emr_platform())
306309
snprintf(header, sizeof(header), "low-priority-max-frequency(MHz)");
307310
else
308311
snprintf(header, sizeof(header), "low-priority-max-%s-frequency(MHz)",

0 commit comments

Comments
 (0)