<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/platform/x86/amd/pmf, branch master</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2026-01-26T14:00:19+00:00</updated>
<entry>
<title>platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function</title>
<updated>2026-01-26T14:00:19+00:00</updated>
<author>
<name>Alexey Zagorodnikov</name>
<email>xglooom@gmail.com</email>
</author>
<published>2026-01-21T14:35:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8164a14b15008579801ba6ba3ae00d37ecc310e5'/>
<id>urn:sha1:8164a14b15008579801ba6ba3ae00d37ecc310e5</id>
<content type='text'>
Addresses a low power limits issue on HP ZBook Ultra G1a.

If vendor firmware capped APU power limits with 3rd-party AC adapters,
the user can disable the Smart PC function via the module parameter

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4868 [1]
Signed-off-by: Alexey Zagorodnikov &lt;xglooom@gmail.com&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Link: https://patch.msgid.link/20260121143519.12318-1-xglooom@gmail.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Introduce new interface to export NPU metrics</title>
<updated>2026-01-21T08:52:04+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2026-01-15T17:34:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=118222e20d16caf38264b850d7a386e5f063008c'/>
<id>urn:sha1:118222e20d16caf38264b850d7a386e5f063008c</id>
<content type='text'>
The PMF driver retrieves NPU metrics data from the PMFW. Introduce a new
interface to make NPU metrics accessible to other drivers like AMDXDNA
driver, which can access and utilize this information as needed.

Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Co-developed-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
[lizhi: save return value of is_npu_metrics_supported() and return it]
Signed-off-by: Lizhi Hou &lt;lizhi.hou@amd.com&gt;
Link: https://patch.msgid.link/20260115173448.403826-1-lizhi.hou@amd.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Prevent TEE errors after hibernate</title>
<updated>2026-01-21T08:51:56+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2026-01-16T04:11:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=48d229c7047128dd52eaf863881bb3e62b5896e5'/>
<id>urn:sha1:48d229c7047128dd52eaf863881bb3e62b5896e5</id>
<content type='text'>
After resuming from hibernate, TEE commands can time out and cause PSP
disables. Fix this by reinitializing the Trusted Application (TA) and
cancelling the pb workqueue in the hibernate callbacks to avoid these
errors.

ccp 0000:c4:00.2: tee: command 0x5 timed out, disabling PSP
amd-pmf AMDI0107:00: TEE enact cmd failed. err: ffff000e, ret:0
amd-pmf AMDI0107:00: TEE enact cmd failed. err: ffff000e, ret:0
amd-pmf AMDI0107:00: TEE enact cmd failed. err: ffff000e, ret:0

Fixes: ae82cef7d9c5 ("platform/x86/amd/pmf: Add support for PMF-TA interaction")
Reported-by: Lars Francke &lt;lars.francke@gmail.com&gt;
Closes: https://lore.kernel.org/platform-driver-x86/CAD-Ua_gfJnQSo8ucS_7ZwzuhoBRJ14zXP7s8b-zX3ZcxcyWePw@mail.gmail.com/
Tested-by: Yijun Shen &lt;Yijun.Shen@Dell.com&gt;
Co-developed-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
[ML: Add more tags]
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Link: https://patch.msgid.link/20260116041132.153674-2-superm1@kernel.org
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Use ring buffer to store custom BIOS input values</title>
<updated>2025-12-23T09:44:58+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2025-12-02T04:22:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2a2c085de1f3f54a6222fbef5b45f1d3c40e98e3'/>
<id>urn:sha1:2a2c085de1f3f54a6222fbef5b45f1d3c40e98e3</id>
<content type='text'>
Custom BIOS input values can be updated by multiple sources, such as power
mode changes and sensor events, each triggering a custom BIOS input event.
When these events occur in rapid succession, new data may overwrite
previous values before they are processed, resulting in lost updates.

To address this, introduce a fixed-size, power-of-two ring buffer to
capture every custom BIOS input event, storing both the pending request
and its associated input values. Access to the ring buffer is synchronized
using a mutex.

The previous use of memset() to clear the pending request structure after
each event is removed, as each BIOS input value is now copied into the
buffer as a snapshot. Consumers now process entries directly from the ring
buffer, making explicit clearing of the pending request structure
unnecessary.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Tested-by: Yijun Shen &lt;Yijun.Shen@Dell.com&gt;
Co-developed-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://patch.msgid.link/20251202042219.245173-1-Shyam-sundar.S-k@amd.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Use devm_mutex_init() for mutex initialization</title>
<updated>2025-11-27T11:59:13+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2025-11-19T08:58:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0b39ce8f71c92c72681d9a678298a9a59ff9b5d3'/>
<id>urn:sha1:0b39ce8f71c92c72681d9a678298a9a59ff9b5d3</id>
<content type='text'>
Replace mutex_init() with the devm_mutex_init(), to ensure proper mutex
cleanup during probe failure and driver removal.

Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://patch.msgid.link/20251119085813.546813-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Add BIOS_INPUTS_MAX macro to replace hardcoded array size</title>
<updated>2025-11-27T11:58:27+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2025-11-19T08:58:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2bd038de12e6e5168b64a0063ac8e6bd0a047133'/>
<id>urn:sha1:2bd038de12e6e5168b64a0063ac8e6bd0a047133</id>
<content type='text'>
Define a new macro BIOS_INPUTS_MAX, to represent the maximum number of
BIOS input values. Replace hardcoded array sizes in relevant structures
with this macro to improve readability and maintainability.

Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Tested-by: Yijun Shen &lt;Yijun.Shen@Dell.com&gt;
Co-developed-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://patch.msgid.link/20251119085813.546813-1-Shyam-sundar.S-k@amd.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Refactor repetitive BIOS output handling</title>
<updated>2025-11-27T09:37:21+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2025-11-27T09:10:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=278ff7048466349e32d85afd62a4fcaf398ac23e'/>
<id>urn:sha1:278ff7048466349e32d85afd62a4fcaf398ac23e</id>
<content type='text'>
Replace repetitive switch-case statements for PMF_POLICY_BIOS_OUTPUT_*
with a helper function and consolidated case handling. This reduces code
duplication and improves maintainability.

The 10 BIOS output policies (PMF_POLICY_BIOS_OUTPUT_1 through
PMF_POLICY_BIOS_OUTPUT_10) previously each had individual case statements
with identical logic. This patch introduces
amd_pmf_get_bios_output_idx() to map policy values to array indices,
consolidating the handling into a single case block with fallthrough.
Also, add a new function amd_pmf_update_bios_output() to simplify the code
handling.

This approach handles non-sequential policy enum values gracefully and
makes future additions easier to implement.

No functional changes.

Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://patch.msgid.link/20251127091038.2088387-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Replace magic table id with METRICS_TABLE_ID</title>
<updated>2025-11-21T15:18:12+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2025-11-20T10:52:10+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7ec374c6b8597dd23d8c2de1e4045452348cf9cd'/>
<id>urn:sha1:7ec374c6b8597dd23d8c2de1e4045452348cf9cd</id>
<content type='text'>
Add METRICS_TABLE_ID (7) and use it when requesting the metrics
transfer table instead of the hard-coded literal. This clarifies the
meaning of the argument to amd_pmf_send_cmd() and centralizes the table
ID definition for easier maintenance.

Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Co-developed-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://patch.msgid.link/20251120105210.3945710-4-Shyam-sundar.S-k@amd.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Use explicit SET_CMD/GET_CMD flags in amd_pmf_send_cmd()</title>
<updated>2025-11-21T15:18:10+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2025-11-20T10:52:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=83f0442a4012179c204d68c7f619755693ac5c2f'/>
<id>urn:sha1:83f0442a4012179c204d68c7f619755693ac5c2f</id>
<content type='text'>
Add SET_CMD and GET_CMD constants and replace boolean values passed as the
get/set argument to amd_pmf_send_cmd() with the new explicit flags. This
improves readability, avoids ambiguity around true/false and 0/1 usage.
There is no functional change.

Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Co-developed-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Patil Rajesh Reddy &lt;Patil.Reddy@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://patch.msgid.link/20251120105210.3945710-3-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>platform/x86/amd/pmf: Rename IPU metrics fields to NPU for consistency</title>
<updated>2025-11-21T15:17:15+00:00</updated>
<author>
<name>Shyam Sundar S K</name>
<email>Shyam-sundar.S-k@amd.com</email>
</author>
<published>2025-11-20T10:52:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=bc3c0a3231b78589896f283d971a003761b100e5'/>
<id>urn:sha1:bc3c0a3231b78589896f283d971a003761b100e5</id>
<content type='text'>
Update smu_pmf_metrics_v2 to use NPU terminology instead of IPU. This
aligns the driver with current firmware/hardware naming and fixes the
mismatch. There is no functional change and no impact to the struct layout
and only field names are updated.

Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by:
Link: https://patch.msgid.link/20251120105210.3945710-2-Shyam-sundar.S-k@amd.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
</feed>
