From: Mario Limonciello mario.limonciello@amd.com
[ Upstream commit 4ff3aeb664f7dfe824ba91ffb0b203397a8d431e ]
The Lenovo Yoga 6 13ACL6 82ND has a similar BIOS problem as other Lenovo laptops from that vintage that causes a rather long resume from suspend.
Add it to the quirk list that manipulates the scratch register to avoid the issue.
Reported-by: Adam Berglund adam.f.berglund@hotmail.com Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4434 Tested-by: Adam Berglund adam.f.berglund@hotmail.com Signed-off-by: Mario Limonciello mario.limonciello@amd.com Reviewed-by: Hans de Goede hansg@kernel.org Link: https://lore.kernel.org/r/20250718172307.1928744-1-superm1@kernel.org Reviewed-by: Ilpo Järvinen ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen ilpo.jarvinen@linux.intel.com Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
**YES**
This commit should be backported to stable kernel trees. Here's my extensive analysis:
## Backport Justification
1. **Fixes a real user-impacting bug**: The commit addresses a BIOS firmware bug that causes "rather long resume from suspend" on the Lenovo Yoga 6 13ALC6 laptop. This is a significant usability issue that affects users of this specific hardware model during suspend/resume operations.
2. **Minimal and contained change**: The patch simply adds 8 lines to an existing DMI quirk table (lines 193-201 in the diff). It adds one new entry: ```c { .ident = "Lenovo Yoga 6 13ALC6", .driver_data = &quirk_s2idle_bug, .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), DMI_MATCH(DMI_PRODUCT_NAME, "82ND"), } }, ```
3. **Follows established pattern**: The fix uses the exact same mechanism (`quirk_s2idle_bug`) that's already applied to 20+ other Lenovo laptops in the same file. The workaround manipulates a scratch register (FCH_PM_SCRATCH) to skip a problematic SMI handler during suspend-to-idle resume, as documented in the comment at lines 241-248.
4. **No architectural changes**: This is purely a device-specific quirk addition to an existing quirk framework. No new functionality is introduced, no APIs are changed, and no kernel subsystem architecture is modified.
5. **Low regression risk**: The change only affects systems that match the specific DMI strings (LENOVO board vendor + 82ND product name). It cannot affect any other hardware.
6. **Tested by reporter**: The commit message indicates "Tested-by: Adam Berglund" who was also the reporter of the issue, confirming the fix works on the affected hardware.
7. **Follows stable tree rules**: This is exactly the type of commit that stable trees want: - Fixes a real bug (long resume times) - Minimal change (8 lines) - Hardware-specific fix with no broader impact - Already tested on affected hardware
The issue being fixed is documented at https://gitlab.freedesktop.org/drm/amd/-/issues/4434, and the workaround applies the same proven fix that's been working for numerous other Lenovo models with similar BIOS issues related to suspend-to-idle resume performance when IOMMU is enabled for NVMe devices.
drivers/platform/x86/amd/pmc/pmc-quirks.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c index 131f10b68308..ded4c84f5ed1 100644 --- a/drivers/platform/x86/amd/pmc/pmc-quirks.c +++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c @@ -190,6 +190,15 @@ static const struct dmi_system_id fwbug_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "82XQ"), } }, + /* https://gitlab.freedesktop.org/drm/amd/-/issues/4434 */ + { + .ident = "Lenovo Yoga 6 13ALC6", + .driver_data = &quirk_s2idle_bug, + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "82ND"), + } + }, /* https://gitlab.freedesktop.org/drm/amd/-/issues/2684 */ { .ident = "HP Laptop 15s-eq2xxx",