mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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 <srinivas.pandruvada@linux.intel.com>
This commit is contained in:
parent
1d54b139f4
commit
2c00056f54
2 changed files with 21 additions and 3 deletions
|
@ -8,6 +8,8 @@
|
||||||
static int mbox_delay;
|
static int mbox_delay;
|
||||||
static int mbox_retries = 3;
|
static int mbox_retries = 3;
|
||||||
|
|
||||||
|
#define MAX_TRL_LEVELS_EMR 5
|
||||||
|
|
||||||
static int mbox_get_disp_freq_multiplier(void)
|
static int mbox_get_disp_freq_multiplier(void)
|
||||||
{
|
{
|
||||||
return DISP_FREQ_MULTIPLIER;
|
return DISP_FREQ_MULTIPLIER;
|
||||||
|
@ -15,11 +17,24 @@ static int mbox_get_disp_freq_multiplier(void)
|
||||||
|
|
||||||
static int mbox_get_trl_max_levels(void)
|
static int mbox_get_trl_max_levels(void)
|
||||||
{
|
{
|
||||||
|
if (is_emr_platform())
|
||||||
|
return MAX_TRL_LEVELS_EMR;
|
||||||
|
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *mbox_get_trl_level_name(int level)
|
static char *mbox_get_trl_level_name(int level)
|
||||||
{
|
{
|
||||||
|
if (is_emr_platform()) {
|
||||||
|
static char level_str[18];
|
||||||
|
|
||||||
|
if (level >= MAX_TRL_LEVELS_EMR)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
snprintf(level_str, sizeof(level_str), "level-%d", level);
|
||||||
|
return level_str;
|
||||||
|
}
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 0:
|
case 0:
|
||||||
return "sse";
|
return "sse";
|
||||||
|
|
|
@ -283,9 +283,9 @@ static void _isst_fact_display_information(struct isst_id *id, FILE *outf, int l
|
||||||
bucket_info[j].hp_cores);
|
bucket_info[j].hp_cores);
|
||||||
format_and_print(outf, base_level + 2, header, value);
|
format_and_print(outf, base_level + 2, header, value);
|
||||||
for (i = 0; i < trl_max_levels; i++) {
|
for (i = 0; i < trl_max_levels; i++) {
|
||||||
if (fact_avx != 0xFF && !(fact_avx & (1 << i)))
|
if (!bucket_info[j].hp_ratios[i] || (fact_avx != 0xFF && !(fact_avx & (1 << i))))
|
||||||
continue;
|
continue;
|
||||||
if (i == 0 && api_version() == 1)
|
if (i == 0 && api_version() == 1 && !is_emr_platform())
|
||||||
snprintf(header, sizeof(header),
|
snprintf(header, sizeof(header),
|
||||||
"high-priority-max-frequency(MHz)");
|
"high-priority-max-frequency(MHz)");
|
||||||
else
|
else
|
||||||
|
@ -301,8 +301,11 @@ static void _isst_fact_display_information(struct isst_id *id, FILE *outf, int l
|
||||||
format_and_print(outf, base_level + 1, header, NULL);
|
format_and_print(outf, base_level + 1, header, NULL);
|
||||||
|
|
||||||
for (j = 0; j < trl_max_levels; j++) {
|
for (j = 0; j < trl_max_levels; j++) {
|
||||||
|
if (!fact_info->lp_ratios[j])
|
||||||
|
continue;
|
||||||
|
|
||||||
/* No AVX level name for SSE to be consistent with previous formatting */
|
/* No AVX level name for SSE to be consistent with previous formatting */
|
||||||
if (j == 0 && api_version() == 1)
|
if (j == 0 && api_version() == 1 && !is_emr_platform())
|
||||||
snprintf(header, sizeof(header), "low-priority-max-frequency(MHz)");
|
snprintf(header, sizeof(header), "low-priority-max-frequency(MHz)");
|
||||||
else
|
else
|
||||||
snprintf(header, sizeof(header), "low-priority-max-%s-frequency(MHz)",
|
snprintf(header, sizeof(header), "low-priority-max-%s-frequency(MHz)",
|
||||||
|
|
Loading…
Reference in a new issue