Skip to content

Commit 5fdc8b8

Browse files
Shyam Sundar S Kij-intel
authored andcommitted
platform/x86/amd/pmf: Add support to get sbios requests in PMF driver
Update the APMF function index 2 for family 1Ah, that gets the information of SBIOS requests (like the pending requests from BIOS, custom notifications, updation of power limits etc). Co-developed-by: Patil Rajesh Reddy <[email protected]> Signed-off-by: Patil Rajesh Reddy <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 233f78e commit 5fdc8b8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

drivers/platform/x86/amd/pmf/acpi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ int apmf_get_auto_mode_def(struct amd_pmf_dev *pdev, struct apmf_auto_mode *data
166166
return apmf_if_call_store_buffer(pdev, APMF_FUNC_AUTO_MODE, data, sizeof(*data));
167167
}
168168

169+
int apmf_get_sbios_requests_v2(struct amd_pmf_dev *pdev, struct apmf_sbios_req_v2 *req)
170+
{
171+
return apmf_if_call_store_buffer(pdev, APMF_FUNC_SBIOS_REQUESTS, req, sizeof(*req));
172+
}
173+
169174
int apmf_get_sbios_requests(struct amd_pmf_dev *pdev, struct apmf_sbios_req *req)
170175
{
171176
return apmf_if_call_store_buffer(pdev, APMF_FUNC_SBIOS_REQUESTS,

drivers/platform/x86/amd/pmf/pmf.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ struct apmf_sbios_req {
120120
u8 skin_temp_hs2;
121121
} __packed;
122122

123+
struct apmf_sbios_req_v2 {
124+
u16 size;
125+
u32 pending_req;
126+
u8 rsd;
127+
u32 ppt_pmf;
128+
u32 ppt_pmf_apu_only;
129+
u32 stt_min_limit;
130+
u8 skin_temp_apu;
131+
u8 skin_temp_hs2;
132+
u32 custom_policy[10];
133+
} __packed;
134+
123135
struct apmf_fan_idx {
124136
u16 size;
125137
u8 fan_ctl_mode;
@@ -621,6 +633,7 @@ void amd_pmf_init_auto_mode(struct amd_pmf_dev *dev);
621633
void amd_pmf_deinit_auto_mode(struct amd_pmf_dev *dev);
622634
void amd_pmf_trans_automode(struct amd_pmf_dev *dev, int socket_power, ktime_t time_elapsed_ms);
623635
int apmf_get_sbios_requests(struct amd_pmf_dev *pdev, struct apmf_sbios_req *req);
636+
int apmf_get_sbios_requests_v2(struct amd_pmf_dev *pdev, struct apmf_sbios_req_v2 *req);
624637

625638
void amd_pmf_update_2_cql(struct amd_pmf_dev *dev, bool is_cql_event);
626639
int amd_pmf_reset_amt(struct amd_pmf_dev *dev);

0 commit comments

Comments
 (0)