tools/power/x86/intel-speed-select: Set TRL MSR in 100 MHz units

When SST-TF is disabled in auto mode, the performance is getting
limited.

This is caused by wrong programming of Turbo Ratio Limit (TRL) MSR.

This MSR always accepts the frequency ratio in 100 MHz unit. When the
TPMI is sending TRL in 1 MHz unit, change to 100 MHz, before updating
TRL MSR.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
This commit is contained in:
Srinivas Pandruvada 2024-07-06 01:17:55 -04:00
parent cf25477c52
commit fd77d7fde0

View File

@ -283,6 +283,8 @@ int isst_set_trl(struct isst_id *id, unsigned long long trl)
return 0;
}
#define MSR_TRL_FREQ_MULTIPLIER 100
int isst_set_trl_from_current_tdp(struct isst_id *id, unsigned long long trl)
{
unsigned long long msr_trl;
@ -310,6 +312,10 @@ int isst_set_trl_from_current_tdp(struct isst_id *id, unsigned long long trl)
for (i = 0; i < 8; ++i) {
unsigned long long _trl = trl[i];
/* MSR is always in 100 MHz unit */
if (isst_get_disp_freq_multiplier() == 1)
_trl /= MSR_TRL_FREQ_MULTIPLIER;
msr_trl |= (_trl << (i * 8));
}
}