From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Antheas Kapenekakis" <lkml@antheas.dev>,
"Mario Limonciello (AMD)" <superm1@kernel.org>,
"Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sasha Levin" <sashal@kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 6.17] platform/x86/amd/pmc: Add support for Van Gogh SoC
Date: Mon, 24 Nov 2025 03:06:25 -0500 [thread overview]
Message-ID: <20251124080644.3871678-11-sashal@kernel.org> (raw)
In-Reply-To: <20251124080644.3871678-1-sashal@kernel.org>
From: Antheas Kapenekakis <lkml@antheas.dev>
[ Upstream commit db4a3f0fbedb0398f77b9047e8b8bb2b49f355bb ]
The ROG Xbox Ally (non-X) SoC features a similar architecture to the
Steam Deck. While the Steam Deck supports S3 (s2idle causes a crash),
this support was dropped by the Xbox Ally which only S0ix suspend.
Since the handler is missing here, this causes the device to not suspend
and the AMD GPU driver to crash while trying to resume afterwards due to
a power hang.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4659
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://patch.msgid.link/20251024152152.3981721-2-lkml@antheas.dev
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:
### Comprehensive Analysis
1. **Commit Message Analysis**
- **Issue:** Devices using the AMD Van Gogh SoC (specifically
mentioned is the "ROG Xbox Ally") fail to suspend properly. The
system suffers a "power hang" and the AMD GPU driver crashes upon
resume attempts.
- **Cause:** The `amd_pmc` platform driver lacks the necessary
identifiers and handlers for this specific SoC model.
- **Context:** This is a bug fix for broken hardware functionality
(suspend/resume), despite the subject line saying "Add support".
- **External References:** Links to a specific bug report on GitLab
(#4659).
2. **Code Changes & Technical Deep Dive**
- **The Bug Mechanism:** The current stable driver is missing the
PCI Device ID `0x1645` (Van Gogh). Consequently, `pci_match_id()`
in `amd_pmc_probe` fails, and the driver never loads. Even if
forced, `amd_pmc_get_os_hint()` would return `-EINVAL`, causing
`amd_pmc_s2idle_prepare()` to fail or send incorrect messages to
the System Management Unit (SMU).
- **The Fix:**
- Adds `AMD_CPU_ID_VG` (0x1645) to `pmc.h`.
- Adds the ID to `pmc_pci_ids[]` table, allowing the driver to
bind.
- Adds cases to `amd_pmc_get_ip_info` and `amd_pmc_get_os_hint`
to treat Van Gogh identically to Renoir (RN) and Yellow Carp
(YC) SoCs.
- **Scope:** The changes are extremely localized (approx. 5 lines of
code added). It uses existing, proven code paths.
3. **Stable Kernel Rules Compliance**
- **Criterion:** "It must NOT introduce new features".
- **Exception:** **NEW DEVICE IDs**. The stable rules explicitly
allow "Adding PCI IDs... to existing drivers" to enable hardware
support. This commit falls squarely into this category.
- **Criterion:** "It must fix a real bug".
- **Met:** Yes, it fixes a system crash/hang on suspend.
- **Criterion:** "It must be obviously correct".
- **Met:** Yes, it simply maps a new ID to existing logic verified
on similar hardware.
4. **Risk vs. Benefit**
- **Benefit:** High. Fixes a critical usability issue (unable to
suspend/resume) and prevents kernel crashes for users of popular
handheld gaming devices.
- **Risk:** Extremely Low. The change is guarded by the specific CPU
ID. It does not alter logic for any currently supported hardware.
- **Dependencies:** None. The driver structure and constants
(`soc15_ip_blk`, `MSG_OS_HINT_RN`) are already present in stable
trees (e.g., 6.1, 6.6).
5. **Conclusion**
This is a textbook candidate for stable backporting. It addresses a
hardware-specific crash by adding a missing PCI ID and routing it
through existing driver logic, which is a permitted exception to the
"no new features" rule.
**YES**
drivers/platform/x86/amd/pmc/pmc.c | 3 +++
drivers/platform/x86/amd/pmc/pmc.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index bd318fd02ccf4..cae3fcafd4d7b 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -106,6 +106,7 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev)
switch (dev->cpu_id) {
case AMD_CPU_ID_PCO:
case AMD_CPU_ID_RN:
+ case AMD_CPU_ID_VG:
case AMD_CPU_ID_YC:
case AMD_CPU_ID_CB:
dev->num_ips = 12;
@@ -517,6 +518,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
case AMD_CPU_ID_PCO:
return MSG_OS_HINT_PCO;
case AMD_CPU_ID_RN:
+ case AMD_CPU_ID_VG:
case AMD_CPU_ID_YC:
case AMD_CPU_ID_CB:
case AMD_CPU_ID_PS:
@@ -717,6 +719,7 @@ static const struct pci_device_id pmc_pci_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SHP) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_VG) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
{ }
diff --git a/drivers/platform/x86/amd/pmc/pmc.h b/drivers/platform/x86/amd/pmc/pmc.h
index 62f3e51020fdf..fe3f53eb59558 100644
--- a/drivers/platform/x86/amd/pmc/pmc.h
+++ b/drivers/platform/x86/amd/pmc/pmc.h
@@ -156,6 +156,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev);
#define AMD_CPU_ID_RN 0x1630
#define AMD_CPU_ID_PCO AMD_CPU_ID_RV
#define AMD_CPU_ID_CZN AMD_CPU_ID_RN
+#define AMD_CPU_ID_VG 0x1645
#define AMD_CPU_ID_YC 0x14B5
#define AMD_CPU_ID_CB 0x14D8
#define AMD_CPU_ID_PS 0x14E8
--
2.51.0
next prev parent reply other threads:[~2025-11-24 8:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 8:06 [PATCH AUTOSEL 6.17-5.10] platform/x86: huawei-wmi: add keys for HONOR models Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] sched_ext: Fix possible deadlock in the deferred_irq_workfn() Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.15] HID: elecom: Add support for ELECOM M-XT3URBK (018F) Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: intel-uncore-freq: Add additional client processors Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.6] platform/x86/amd/pmc: Add spurious_8042 to Xbox Ally Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.10] pinctrl: qcom: msm: Fix deadlock in pinmux configuration Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.10] samples: work around glibc redefining some of our defines wrong Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.6] HID: hid-input: Extend Elan ignore battery quirk to USB Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] HID: lenovo: fixup Lenovo Yoga Slim 7x Keyboard rdesc Sasha Levin
2025-11-24 8:06 ` Sasha Levin [this message]
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] sched_ext: Use IRQ_WORK_INIT_HARD() to initialize rq->scx.kick_cpus_irq_work Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86/intel/hid: Add Nova Lake support Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: hp-wmi: mark Victus 16-r0 and 16-s0 for victus_s fan and thermal profile support Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.4] platform/x86: acer-wmi: Ignore backlight event Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: hp-wmi: Add Omen MAX 16-ah0xx fan support and thermal profile Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.6] platform/x86/amd: pmc: Add Lenovo Legion Go 2 to pmc quirk list Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.6] nvme: fix admin request_queue lifetime Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.1] LoongArch: Mask all interrupts during kexec/kdump Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.1] HID: apple: Add SONiX AK870 PRO to non_apple_keyboards quirk list Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.4] bfs: Reconstruct file type when loading from disk Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251124080644.3871678-11-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Shyam-sundar.S-k@amd.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=lkml@antheas.dev \
--cc=patches@lists.linux.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=superm1@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox