mirror of
https://github.com/t2linux/linux-t2-patches.git
synced 2026-08-16 05:18:17 -07:00
Fix suspend on 15,1
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
From 5fdaec4725bea1bfb506efc314318c65b01aafc4 Mon Sep 17 00:00:00 2001
|
||||
From: Andre Eikmeyer <dev@deq.rocks>
|
||||
Date: Tue, 21 Jul 2026 15:53:47 +0200
|
||||
Subject: [PATCH] drm/amdgpu: reset VI ASIC on MacBookPro15,1
|
||||
|
||||
After S3, reloading amdgpu on MacBookPro15,1 systems with a Radeon Pro
|
||||
555X or 560X fails while loading the SMU firmware. The existing SMC
|
||||
register check does not request a reset because the registers do not
|
||||
reliably reflect the stale SMU state on these machines.
|
||||
|
||||
Frederick Morlock found that forcing a VI ASIC reset allows the driver to
|
||||
initialize again. This patch limits his workaround to the exact PCI
|
||||
device, Apple subsystem device and revision combinations used by these
|
||||
two GPUs, leaving other VI hardware unchanged.
|
||||
|
||||
Suggested-by: Frederick Morlock <me@freddy.us>
|
||||
Signed-off-by: Andre Eikmeyer <dev@deq.rocks>
|
||||
---
|
||||
drivers/gpu/drm/amd/amdgpu/vi.c | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
|
||||
index a256320b92f3..320c43143e5d 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
|
||||
@@ -1407,10 +1407,30 @@ static uint64_t vi_get_pcie_replay_count(struct amdgpu_device *adev)
|
||||
return (nak_r + nak_g);
|
||||
}
|
||||
|
||||
+struct vi_reset_quirk {
|
||||
+ u16 device;
|
||||
+ u16 subsystem_vendor;
|
||||
+ u16 subsystem_device;
|
||||
+ u8 revision;
|
||||
+};
|
||||
+
|
||||
+static const struct vi_reset_quirk vi_reset_quirks[] = {
|
||||
+ { 0x67ef, PCI_VENDOR_ID_APPLE, 0x0190, 0xe3 }, /* Radeon Pro 555X */
|
||||
+ { 0x67ef, PCI_VENDOR_ID_APPLE, 0x018f, 0xc2 }, /* Radeon Pro 560X */
|
||||
+};
|
||||
+
|
||||
static bool vi_need_reset_on_init(struct amdgpu_device *adev)
|
||||
{
|
||||
+ unsigned int i;
|
||||
u32 clock_cntl, pc;
|
||||
|
||||
+ for (i = 0; i < ARRAY_SIZE(vi_reset_quirks); i++)
|
||||
+ if (adev->pdev->device == vi_reset_quirks[i].device &&
|
||||
+ adev->pdev->subsystem_vendor == vi_reset_quirks[i].subsystem_vendor &&
|
||||
+ adev->pdev->subsystem_device == vi_reset_quirks[i].subsystem_device &&
|
||||
+ adev->pdev->revision == vi_reset_quirks[i].revision)
|
||||
+ return true;
|
||||
+
|
||||
if (adev->flags & AMD_IS_APU)
|
||||
return false;
|
||||
|
||||
--
|
||||
2.55.0
|
||||
|
||||
Reference in New Issue
Block a user