Skip to contentSkip to conversation

drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE

PATCH In review Alex Deucher 4 participants 4 messages Feb 22, 2018 – Feb 23, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): to=<[email protected]

#1 lore raw

PATCH 1/1 drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE

In radeon_device_init, set the need_dma32 flag for Cedar chips (e.g. FirePro 2270). This fixes, or at least works around, a bug on PowerPC exposed by last year's commits

8e3f1b1d8255105f31556aacf8aeb6071b00d469 (Russell Currey)

and

253fd51e2f533552ae35a0c661705da6c4842c1b (Alistair Popple)

which enabled the 64-bit DMA iommu bypass.

This caused the device to freeze, in some cases unrecoverably, and is the subject of several bug reports internal to Red Hat.

---
 drivers/gpu/drm/radeon/radeon_device.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/radeon/radeon_device.c +5 -0
index ffc10cadcf34..ba7435bcd208 100644
@@ -1397,6 +1397,11 @@ int radeon_device_init(struct radeon_device *rdev,
 	if ((rdev->flags & RADEON_IS_PCI) &&
 	    (rdev->family <= CHIP_RS740))
 		rdev->need_dma32 = true;
+#ifdef CONFIG_PPC64
+	if ((rdev->flags & (RADEON_IS_PCI | RADEON_IS_PCIE)) &&
+	    (rdev->family == CHIP_CEDAR))
+		rdev->need_dma32 = true;
+#endif
 
 	dma_bits = rdev->need_dma32 ? 32 : 40;
 	r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
Signature · 6 lines
2.13.6

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 20180222215101.3962-1-bcrocker-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#3 lore raw
Quoted 25 lines · Ben Crocker

In radeon_device_init, set the need_dma32 flag for Cedar chips (e.g. FirePro 2270). This fixes, or at least works around, a bug on PowerPC exposed by last year's commits

8e3f1b1d8255105f31556aacf8aeb6071b00d469 (Russell Currey)

and

253fd51e2f533552ae35a0c661705da6c4842c1b (Alistair Popple)

which enabled the 64-bit DMA iommu bypass.

This caused the device to freeze, in some cases unrecoverably, and is the subject of several bug reports internal to Red Hat.

---
 drivers/gpu/drm/radeon/radeon_device.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/radeon/radeon_device.c +0 -0
index ffc10cadcf34..ba7435bcd208 100644

drivers/gpu/drm/radeon/radeon_device.c int radeon_device_init(struct radeon_device *rdev, · line 1404

Quoted 8 lines
drivers/gpu/drm/radeon/radeon_device.c +5 -0
@@ -1397,6 +1397,11 @@ int radeon_device_init(struct radeon_device *rdev,
        if ((rdev->flags & RADEON_IS_PCI) &&
            (rdev->family <= CHIP_RS740))
                rdev->need_dma32 = true;
+#ifdef CONFIG_PPC64
+       if ((rdev->flags & (RADEON_IS_PCI | RADEON_IS_PCIE)) &&
+           (rdev->family == CHIP_CEDAR))
+               rdev->need_dma32 = true;
+#endif

You can drop the PCI and PCIE checks and just check the family.

Alex

Quoted 10 lines
drivers/gpu/drm/radeon/radeon_device.c +0 -1
        dma_bits = rdev->need_dma32 ? 32 : 40;
        r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
--

2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#4 lore raw

PATCH 1/1 drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE

In reply to a message not in the archive

In radeon_device_init, set the need_dma32 flag for Cedar chips (e.g. FirePro 2270). This fixes, or at least works around, a bug on PowerPC exposed by last year's commits

8e3f1b1d8255105f31556aacf8aeb6071b00d469 (Russell Currey)

and

253fd51e2f533552ae35a0c661705da6c4842c1b (Alistair Popple)

which enabled the 64-bit DMA iommu bypass.

This caused the device to freeze, in some cases unrecoverably, and is the subject of several bug reports internal to Red Hat.

---
 drivers/gpu/drm/radeon/radeon_device.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/radeon/radeon_device.c +4 -0
index ffc10cadcf34..32b577c776b9 100644
@@ -1397,6 +1397,10 @@ int radeon_device_init(struct radeon_device *rdev,
 	if ((rdev->flags & RADEON_IS_PCI) &&
 	    (rdev->family <= CHIP_RS740))
 		rdev->need_dma32 = true;
+#ifdef CONFIG_PPC64
+	if (rdev->family == CHIP_CEDAR)
+		rdev->need_dma32 = true;
+#endif
 
 	dma_bits = rdev->need_dma32 ? 32 : 40;
 	r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Applied
#5 lore raw
Quoted 8 lines · Ben Crocker

In radeon_device_init, set the need_dma32 flag for Cedar chips (e.g. FirePro 2270). This fixes, or at least works around, a bug on PowerPC exposed by last year's commits

8e3f1b1d8255105f31556aacf8aeb6071b00d469 (Russell Currey)

and

Quoted 8 lines

253fd51e2f533552ae35a0c661705da6c4842c1b (Alistair Popple)

which enabled the 64-bit DMA iommu bypass.

This caused the device to freeze, in some cases unrecoverably, and is the subject of several bug reports internal to Red Hat.

Applied. thanks!

Alex

Quoted 22 lines
---
 drivers/gpu/drm/radeon/radeon_device.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/radeon/radeon_device.c +4 -1
index ffc10cadcf34..32b577c776b9 100644
@@ -1397,6 +1397,10 @@ int radeon_device_init(struct radeon_device *rdev,
        if ((rdev->flags & RADEON_IS_PCI) &&
            (rdev->family <= CHIP_RS740))
                rdev->need_dma32 = true;
+#ifdef CONFIG_PPC64
+       if (rdev->family == CHIP_CEDAR)
+               rdev->need_dma32 = true;
+#endif
 
        dma_bits = rdev->need_dma32 ? 32 : 40;
        r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
--

2.13.6

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel