| 0887817e | 07-May-2025 |
Runhua He <[email protected]> |
platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL)
MECHREVO Wujie 14XA (GX4HRXL) wakes up immediately after s2idle entry. This happens regardless of whether the lapt
platform/x86/amd/pmc: Declare quirk_spurious_8042 for MECHREVO Wujie 14XA (GX4HRXL)
MECHREVO Wujie 14XA (GX4HRXL) wakes up immediately after s2idle entry. This happens regardless of whether the laptop is plugged into AC power, or whether any peripheral is plugged into the laptop.
Similar to commit a55bdad5dfd1 ("platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13"), the MECHREVO Wujie 14XA wakes up almost instantly after s2idle suspend entry (IRQ1 is the keyboard):
2025-04-18 17:23:57,588 DEBUG: PM: Triggering wakeup from IRQ 9 2025-04-18 17:23:57,588 DEBUG: PM: Triggering wakeup from IRQ 1
Add this model to the spurious_8042 quirk to workaround this.
This patch does not affect the wake-up function of the built-in keyboard. Because the firmware of this machine adds an insurance for keyboard wake-up events, as it always triggers an additional IRQ 9 to wake up the system.
Suggested-by: Mingcong Bai <[email protected]> Suggested-by: Xinhui Yang <[email protected]> Suggested-by: Rong Zhang <[email protected]> Fixes: a55bdad5dfd1 ("platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4166 Cc: Mario Limonciello <[email protected]> Link: https://zhuanldan.zhihu.com/p/730538041 Tested-by: Yemu Lu <[email protected]> Signed-off-by: Runhua He <[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]>
show more ...
|
| 6ad1b2dc | 05-Mar-2025 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Use managed APIs for mutex
Adopt managed devm_* APIs for handling mutex creation and deletion, facilitating automatic resource cleanup.
Co-developed-by: Sanket Goswami <Sanket
platform/x86/amd/pmc: Use managed APIs for mutex
Adopt managed devm_* APIs for handling mutex creation and deletion, facilitating automatic resource cleanup.
Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[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]>
show more ...
|
| e3f1fe98 | 05-Mar-2025 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Move macros and structures to the PMC header file
To improve the code organization and readability, move the macros and structures from the AMD PMC driver to the PMC header fil
platform/x86/amd/pmc: Move macros and structures to the PMC header file
To improve the code organization and readability, move the macros and structures from the AMD PMC driver to the PMC header file.
Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[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]>
show more ...
|
| 382fe403 | 08-Nov-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Add STB support for AMD Desktop variants
Previously, AMD's Ryzen Desktop SoCs did not include support for STB. However, to accommodate this recent change, PMFW has implemented
platform/x86/amd/pmc: Add STB support for AMD Desktop variants
Previously, AMD's Ryzen Desktop SoCs did not include support for STB. However, to accommodate this recent change, PMFW has implemented a new message port pair mechanism for handling messages, arguments, and responses, specifically designed for distinguishing from Mobile SoCs. Therefore, it is necessary to update the driver to properly handle this incoming change.
Add a new function amd_stb_update_args() to simply the arguments that needs to be passed between S2D supported Mobile SoCs vs Desktop SoCs.
Reviewed-by: Mario Limonciello <[email protected]> Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[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]>
show more ...
|
| e22fbf27 | 08-Nov-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Update IP information structure for newer SoCs
The latest AMD processors include additional IP blocks that must be turned off before transitioning to low power. PMFW provides a
platform/x86/amd/pmc: Update IP information structure for newer SoCs
The latest AMD processors include additional IP blocks that must be turned off before transitioning to low power. PMFW provides an interface to retrieve debug information from each IP block, which is useful for diagnosing issues if the system fails to enter or exit low power states, or for profiling which IP block takes more time. Add support for using this information within the driver.
Reviewed-by: Mario Limonciello <[email protected]> Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ij: grouped active_ips, ips_ptr, and num_ips next to each other.] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| 0b4c20ff | 08-Nov-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Use ARRAY_SIZE() to fill num_ips information
Instead of manually specifying num_ips, use ARRAY_SIZE() to set this value based on the actual number of elements in the array.
Re
platform/x86/amd/pmc: Use ARRAY_SIZE() to fill num_ips information
Instead of manually specifying num_ips, use ARRAY_SIZE() to set this value based on the actual number of elements in the array.
Reviewed-by: Ilpo Jarvinen <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Signed-off-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]>
show more ...
|
| 3279f7a6 | 08-Nov-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Isolate STB code changes to a new file
Since S2D (Spill to DRAM) uses different message port offsets compared to PMC message offsets for communication with PMFW, relocate the S
platform/x86/amd/pmc: Isolate STB code changes to a new file
Since S2D (Spill to DRAM) uses different message port offsets compared to PMC message offsets for communication with PMFW, relocate the S2D macros from pmc.c to a new file, mp1_stb.c, for better code organization.
Following this change, it is logical to introduce a new structure, "struct stb_arg," to pass the message, argument, and response offset details to PMFW via the amd_pmc_send_cmd() call. Additionally, move the s2d_msg_id member from amd_pmc_dev into the new structure.
Reviewed-by: Mario Limonciello <[email protected]> Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[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]>
show more ...
|
| 2851f4f8 | 08-Nov-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Define enum for S2D/PMC msg_port and add helper function
To distinguish between the PMC message port and the S2D (Spill to DRAM) message port, replace the use of 0 and 1 with a
platform/x86/amd/pmc: Define enum for S2D/PMC msg_port and add helper function
To distinguish between the PMC message port and the S2D (Spill to DRAM) message port, replace the use of 0 and 1 with an enum.
To avoid printing the S2D or PMC port multiple times in debug print, add new routine to retrieve the message port information, which can be used to print the right msg_port getting used.
Reviewed-by: Mario Limonciello <[email protected]> Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[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]>
show more ...
|
| 00a8d002 | 08-Nov-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Update function names to align with new STB file
With STB now in a separate file, update the function names to match the correct naming schema by removing the _pmc_ prefix wher
platform/x86/amd/pmc: Update function names to align with new STB file
With STB now in a separate file, update the function names to match the correct naming schema by removing the _pmc_ prefix where needed.
Reviewed-by: Mario Limonciello <[email protected]> Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[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]>
show more ...
|
| 0e914063 | 08-Nov-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Move STB functionality to a new file for better code organization
As the SoC evolves with each generation, the dynamics between the PMC and STB layers within the PMC driver are
platform/x86/amd/pmc: Move STB functionality to a new file for better code organization
As the SoC evolves with each generation, the dynamics between the PMC and STB layers within the PMC driver are becoming increasingly complex, making it challenging to manage both in a single file and maintain code readability.
Additionally, during silicon bringup, the PMC functionality is often enabled first, with STB functionality added later. This can lead to missed updates in the driver, potentially causing issues.
To address these challenges, it's beneficial to move all STB-related changes to a separate file. This approach will better accommodate newer SoCs, provide improved flexibility for desktop variants, and facilitate the collection of additional debug information through STB mechanisms.
Also the additional checks for entering s2d_init have been moved from the PMC probe to amd_pmc_s2d_init(). This adjustment makes more sense following the transfer of code to the separate mp1_stb.c file.
Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[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]>
show more ...
|
| ba7b6633 | 22-Aug-2024 |
Shyam Sundar S K <[email protected]> |
platform/x86/amd/pmc: Fix SMU command submission path on new AMD platform
The commit 426463d94d45 ("platform/x86/amd/pmc: Send OS_HINT command for new AMD platform") was introduced to enable sending
platform/x86/amd/pmc: Fix SMU command submission path on new AMD platform
The commit 426463d94d45 ("platform/x86/amd/pmc: Send OS_HINT command for new AMD platform") was introduced to enable sending mailbox commands to PMFW on newer platforms. However, it was later discovered that the commit did not configure the correct message port ID (i.e., S2D or PMC). Without this configuration, all command submissions to PMFW are treated as invalid, leading to command failures.
To address this issue, the CPU ID association for the new platform needs to be added in amd_pmc_get_ip_info(). This ensures that the correct SMU port IDs are selected.
Fixes: 426463d94d45 ("platform/x86/amd/pmc: Send OS_HINT command for new AMD platform") Co-developed-by: Sanket Goswami <[email protected]> Signed-off-by: Sanket Goswami <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Reviewed-by: Mario Limonciello <[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]>
show more ...
|