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>
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;
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));
}
}