https://bugzilla.kernel.org/show_bug.cgi?id=218557

Marcus Bergo (marcusbe...@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcusbe...@gmail.com

--- Comment #13 from Marcus Bergo (marcusbe...@gmail.com) ---
I've developed a fix for this issue that addresses the CPU frequency limitation
on AMD platforms after suspend/resume.

After investigating the problem, I found that the root cause is related to
commit b5539eb5ee70 ("ACPI: EC: Fix acpi_ec_dispatch_gpe()"). This commit
restored the behavior of clearing the GPE in acpi_ec_dispatch_gpe() function to
prevent GPE storms during suspend-to-idle. While this fix is necessary for most
platforms, it causes problems specifically on certain AMD platforms by
interfering with the EC's ability to properly restore power management settings
after resume.

My patch implements a targeted workaround that:

1. Adds DMI-based detection for the affected AMD platforms (Lenovo P15v Gen 3,
P16v Gen 1, HP EliteBook 845 G10)
2. Adds a function to check if we're in suspend-to-idle mode
3. Modifies the acpi_ec_dispatch_gpe() function to handle AMD platforms
specially:
   - For affected AMD platforms during suspend-to-idle, it advances the
transaction without clearing the GPE status bit
   - For all other platforms, it maintains the existing behavior of clearing
the GPE status bit

I've tested this fix on a Lenovo P16v Gen 1 with AMD Ryzen 7 PRO 7840HS and
confirmed that:
- Without the patch, the CPU frequency is limited to 544MHz after the
suspend/unplug/resume sequence
- With the patch applied, the CPU properly scales up to its maximum frequency
(5.1GHz) after the same sequence
- No regressions were observed in other EC functionality
- Multiple suspend/resume cycles with different power states were tested
without issues

I've submitted this patch to the Linux kernel mailing list for review and
inclusion in the mainline kernel. The patch is designed to be a minimal and
targeted fix that addresses the specific issue without affecting the behavior
on non-AMD platforms.

I'll update this ticket once there's feedback from the kernel maintainers.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to