mirror of
https://github.com/armbian/build.git
synced 2026-09-08 23:59:54 +08:00
- rewritten/attribution preserved - rewrite .config with new t2 stuff +recover SOUND/SND/SND_SOC
60 lines
2.0 KiB
Diff
60 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Andre Eikmeyer <dev@deq.rocks>
|
|
Date: Tue, 21 Jul 2026 15:53:47 +0200
|
|
Subject: 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 111111111111..222222222222 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;
|
|
|
|
--
|
|
Armbian
|
|
|