Skip to contentSkip to conversation

PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken

PATCH In review Kai-Heng Feng 3 participants 3 messages Jul 28, 2020 – Jul 29, 2020 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken

We are seeing AMD Radeon Pro W5700 doesn't work when IOMMU is enabled:

[    3.375841] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=63:00.0 address=0x42b5b01a0]
[    3.375845] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=63:00.0 address=0x42b5b01c0]

The error also makes graphics driver fail to probe the device.

It appears to be the same issue as commit 5e89cd303e3a ("PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken") addresses, and indeed the same ATS quirk can workaround the issue.

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

---
 drivers/pci/quirks.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/quirks.c +4 -1
index 812bfc32ecb8..052efeb9f053 100644
@@ -5192,7 +5192,8 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);
  */
 static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)
 {
-	if (pdev->device == 0x7340 && pdev->revision != 0xc5)
+	if ((pdev->device == 0x7312 && pdev->revision != 0x00) ||
+	    (pdev->device == 0x7340 && pdev->revision != 0xc5))
 		return;
 
 	pci_info(pdev, "disabling ATS\n");
@@ -5203,6 +5204,8 @@ static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_amd_harvest_no_ats);
 /* AMD Iceland dGPU */
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x6900, quirk_amd_harvest_no_ats);
+/* AMD Navi10 dGPU */
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7312, quirk_amd_harvest_no_ats);
 /* AMD Navi14 dGPU */
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7340, quirk_amd_harvest_no_ats);
 #endif /* CONFIG_PCI_ATS */
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw

[AMD Public Use]

Quoted 29 lines

-----Original Message-----
From: Kai-Heng Feng <[email protected]>
Sent: Tuesday, July 28, 2020 6:46 AM
To: [email protected]
Cc: Kai-Heng Feng <[email protected]>; Deucher, Alexander <[email protected]>; open list:PCI SUBSYSTEM <linux- [email protected]>; open list <[email protected]>
Subject: [PATCH] PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken

We are seeing AMD Radeon Pro W5700 doesn't work when IOMMU is enabled:

[    3.375841] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT
device=63:00.0 address=0x42b5b01a0]
[    3.375845] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT

device=63:00.0 address=0x42b5b01c0]

The error also makes graphics driver fail to probe the device.

It appears to be the same issue as commit 5e89cd303e3a ("PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken") addresses, and indeed the same ATS quirk can workaround the issue.

Bugzilla:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
illa.kernel.org%2Fshow_bug.cgi%3Fid%3D208725&amp;data=02%7C01%7Cal exander.deucher%40amd.com%7Cbb49d8e71c29459d631a08d832e36d56%7 C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637315299664339358& amp;sdata=SUAXEIoIJfgTm54FmgwUCMUI%2Bk2qWNcvSpvpU09Ak5k%3D& amp;reserved=0

Quoted 2 lines

This was fixed in the vbios, but apparently that didn't make it out to everyone.

Quoted 33 lines
---
 drivers/pci/quirks.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/quirks.c index renamed from drivers/pci/quirks.c +0 -0

812bfc32ecb8..052efeb9f053 100644

drivers/pci/quirks.c +2 -1
@@ -5192,7 +5192,8 @@
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422,
 quirk_no_ext_tags);
  */
 static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)  {
-	if (pdev->device == 0x7340 && pdev->revision != 0xc5)
+	if ((pdev->device == 0x7312 && pdev->revision != 0x00) ||
+	    (pdev->device == 0x7340 && pdev->revision != 0xc5))
 		return;
 
drivers/pci/quirks.c +3 -0
 	pci_info(pdev, "disabling ATS\n");
@@ -5203,6 +5204,8 @@ static void quirk_amd_harvest_no_ats(struct
 pci_dev *pdev)  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4,
 quirk_amd_harvest_no_ats);
 /* AMD Iceland dGPU */
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x6900,
 quirk_amd_harvest_no_ats);
+/* AMD Navi10 dGPU */
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7312,
+quirk_amd_harvest_no_ats);
 /* AMD Navi14 dGPU */
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7340,

quirk_amd_harvest_no_ats); #endif /* CONFIG_PCI_ATS */ --
2.17.1

#2 lore raw
In reply to Kai-Heng Feng
Quoted 6 lines · Kai-Heng Feng

We are seeing AMD Radeon Pro W5700 doesn't work when IOMMU is enabled:

[    3.375841] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=63:00.0 address=0x42b5b01a0]
[    3.375845] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=63:00.0 address=0x42b5b01c0]

The error also makes graphics driver fail to probe the device.

Quoted 7 lines

It appears to be the same issue as commit 5e89cd303e3a ("PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken") addresses, and indeed the same ATS quirk can workaround the issue.

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

Applied with Alex's ack to pci/virtualization for v5.9, thanks!

I also added a stable tag since we did that for 5e89cd303e3a. Let me know if you *don't* want that.

Quoted 30 lines
---
 drivers/pci/quirks.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/quirks.c +4 -1
index 812bfc32ecb8..052efeb9f053 100644
@@ -5192,7 +5192,8 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);
  */
 static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)
 {
-	if (pdev->device == 0x7340 && pdev->revision != 0xc5)
+	if ((pdev->device == 0x7312 && pdev->revision != 0x00) ||
+	    (pdev->device == 0x7340 && pdev->revision != 0xc5))
 		return;
 
 	pci_info(pdev, "disabling ATS\n");
@@ -5203,6 +5204,8 @@ static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_amd_harvest_no_ats);
 /* AMD Iceland dGPU */
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x6900, quirk_amd_harvest_no_ats);
+/* AMD Navi10 dGPU */
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7312, quirk_amd_harvest_no_ats);
 /* AMD Navi14 dGPU */
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7340, quirk_amd_harvest_no_ats);
 #endif /* CONFIG_PCI_ATS */
Signature · 1 line
2.17.1