Skip to content

Commit fd77d7f

Browse files
committed
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 <[email protected]>
1 parent cf25477 commit fd77d7f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ int isst_set_trl(struct isst_id *id, unsigned long long trl)
283283
return 0;
284284
}
285285

286+
#define MSR_TRL_FREQ_MULTIPLIER 100
287+
286288
int isst_set_trl_from_current_tdp(struct isst_id *id, unsigned long long trl)
287289
{
288290
unsigned long long msr_trl;
@@ -310,6 +312,10 @@ int isst_set_trl_from_current_tdp(struct isst_id *id, unsigned long long trl)
310312
for (i = 0; i < 8; ++i) {
311313
unsigned long long _trl = trl[i];
312314

315+
/* MSR is always in 100 MHz unit */
316+
if (isst_get_disp_freq_multiplier() == 1)
317+
_trl /= MSR_TRL_FREQ_MULTIPLIER;
318+
313319
msr_trl |= (_trl << (i * 8));
314320
}
315321
}

0 commit comments

Comments
 (0)