diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2024-07-06 01:17:55 -0400 |
---|---|---|
committer | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2024-07-07 00:36:47 -0700 |
commit | fd77d7fde0818bcc70b63f99c306e5a0f0d3f1a2 (patch) | |
tree | b50c073a79c8146328d8ece01ff6c3928fb13b9e /tools | |
parent | cf25477c52123fd18373ea43336e44185f4744c0 (diff) |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-core.c b/tools/power/x86/intel-speed-select/isst-core.c index 05efffbca3b7..e05561d00458 100644 --- a/tools/power/x86/intel-speed-select/isst-core.c +++ b/tools/power/x86/intel-speed-select/isst-core.c @@ -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)); } } |