mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 16:01:44 -04:00
platform/x86/amd/pmf: Add support for adjusting PMF PPT and PPT APU thresholds
The most recent PMF Trusted Application includes enhanced features that allow for modifications to PMF thermal parameters such as PPT and PPT APU. This update introduces the necessary driver support to utilize these capabilities. Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Tested-by: Yijun Shen <Yijun.Shen@Dell.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20250901110140.2519072-2-Shyam-sundar.S-k@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
committed by
Ilpo Järvinen
parent
c4f8b11bac
commit
f10ea2df9e
@@ -93,6 +93,8 @@ struct cookie_header {
|
||||
#define PMF_POLICY_BIOS_OUTPUT_1 10
|
||||
#define PMF_POLICY_BIOS_OUTPUT_2 11
|
||||
#define PMF_POLICY_P3T 38
|
||||
#define PMF_POLICY_PMF_PPT 54
|
||||
#define PMF_POLICY_PMF_PPT_APU_ONLY 55
|
||||
#define PMF_POLICY_BIOS_OUTPUT_3 57
|
||||
#define PMF_POLICY_BIOS_OUTPUT_4 58
|
||||
#define PMF_POLICY_BIOS_OUTPUT_5 59
|
||||
@@ -677,6 +679,8 @@ struct pmf_action_table {
|
||||
u32 stt_skintemp_apu; /* in C */
|
||||
u32 stt_skintemp_hs2; /* in C */
|
||||
u32 p3t_limit; /* in mW */
|
||||
u32 pmf_ppt; /* in mW */
|
||||
u32 pmf_ppt_apu_only; /* in mW */
|
||||
};
|
||||
|
||||
/* Input conditions */
|
||||
|
||||
@@ -147,6 +147,22 @@ static void amd_pmf_apply_policies(struct amd_pmf_dev *dev, struct ta_pmf_enact_
|
||||
}
|
||||
break;
|
||||
|
||||
case PMF_POLICY_PMF_PPT:
|
||||
if (dev->prev_data->pmf_ppt != val) {
|
||||
amd_pmf_send_cmd(dev, SET_PMF_PPT, false, val, NULL);
|
||||
dev_dbg(dev->dev, "update PMF PPT: %u\n", val);
|
||||
dev->prev_data->pmf_ppt = val;
|
||||
}
|
||||
break;
|
||||
|
||||
case PMF_POLICY_PMF_PPT_APU_ONLY:
|
||||
if (dev->prev_data->pmf_ppt_apu_only != val) {
|
||||
amd_pmf_send_cmd(dev, SET_PMF_PPT_APU_ONLY, false, val, NULL);
|
||||
dev_dbg(dev->dev, "update PMF PPT APU ONLY: %u\n", val);
|
||||
dev->prev_data->pmf_ppt_apu_only = val;
|
||||
}
|
||||
break;
|
||||
|
||||
case PMF_POLICY_SYSTEM_STATE:
|
||||
switch (val) {
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user