aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/amd/pmf/auto-mode.c
diff options
context:
space:
mode:
authorMario Limonciello <[email protected]>2025-04-07 18:18:21 +0000
committerIlpo Järvinen <[email protected]>2025-04-11 09:58:33 +0000
commitfcf27a6a926fd9eeba39e9c3fde43c9298fe284e (patch)
tree066b5f7dc9f946d282e6db0612e4f8fc9f8af7b5 /drivers/platform/x86/amd/pmf/auto-mode.c
parentmlxbf-bootctl: use sysfs_emit_at() in secure_boot_fuse_state_show() (diff)
downloadkernel-fcf27a6a926fd9eeba39e9c3fde43c9298fe284e.tar.gz
kernel-fcf27a6a926fd9eeba39e9c3fde43c9298fe284e.zip
platform/x86: amd: pmf: Fix STT limits
On some platforms it has been observed that STT limits are not being applied properly causing poor performance as power limits are set too low. STT limits that are sent to the platform are supposed to be in Q8.8 format. Convert them before sending. Reported-by: Yijun Shen <[email protected]> Fixes: 7c45534afa443 ("platform/x86/amd/pmf: Add support for PMF Policy Binary") Cc: [email protected] Tested-by: Yijun Shen <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Acked-by: Shyam Sundar S K <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/platform/x86/amd/pmf/auto-mode.c')
-rw-r--r--drivers/platform/x86/amd/pmf/auto-mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/amd/pmf/auto-mode.c b/drivers/platform/x86/amd/pmf/auto-mode.c
index 02ff68be10d0..a184922bba8d 100644
--- a/drivers/platform/x86/amd/pmf/auto-mode.c
+++ b/drivers/platform/x86/amd/pmf/auto-mode.c
@@ -120,9 +120,9 @@ static void amd_pmf_set_automode(struct amd_pmf_dev *dev, int idx,
amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pwr_ctrl->sppt_apu_only, NULL);
amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, pwr_ctrl->stt_min, NULL);
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
- pwr_ctrl->stt_skin_temp[STT_TEMP_APU], NULL);
+ fixp_q88_fromint(pwr_ctrl->stt_skin_temp[STT_TEMP_APU]), NULL);
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
- pwr_ctrl->stt_skin_temp[STT_TEMP_HS2], NULL);
+ fixp_q88_fromint(pwr_ctrl->stt_skin_temp[STT_TEMP_HS2]), NULL);
if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX))
apmf_update_fan_idx(dev, config_store.mode_set[idx].fan_control.manual,