Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
Hi Ben, I mentioned the HD 5450 purely as a matter of archeological interest. Ok, in that case looking at the lspci -tv output doesn't tell us anything new. I suspected, but couldn't prove, that the problem might have something to do with the bridge (IBM POWER8 Host Bridge (PHB3)). In that case you would see the problem with the caicos as well. Or are there issues random enough that there could actually be some problem with the caicos as well and we haven't noticed it so far? See it is really really odd that this should only happen with the cedar. On the other hand if it works for now, I don't see much issue having this workaround. Regards, Christian. Am 23.02.2018 um 17:02 schrieb Ben Crocker: Hi Christian, Michel, Alex, et al., I mentioned the HD 5450 purely as a matter of archeological interest. Back to the FirePro 2270 and Embedded Radeon E6465: I've attached text from both "lspci -tv" and "lspci -v." Actually I'm attaching a couple of different "lspci -v" outputs, one with the FirePro 2270 in place and one with the E6465 in (the same) place. I suspected, but couldn't prove, that the problem might have something to do with the bridge (IBM POWER8 Host Bridge (PHB3)). But I want to reiterate: * Cedar GPU -> problem (before patch, that is); * Caicos GPU in the same slot -> no problem -- Ben P.S. Alex, thanks for applying the patch so expeditiously! On Fri, Feb 23, 2018 at 2:45 AM, Christian König> wrote: Am 22.02.2018 um 18:56 schrieb Michel Dänzer: On 2018-02-22 06:37 PM, Ben Crocker wrote: One of my colleagues did discover a "Radeon HG 5450 PCI" from February 2010 which did, apparently, have a Cedar GPU and very definitely had a (plain old) PCI connector. There must be a PCIe-to-PCI bridge on that board. The GPU itself is always PCIe, and treated accordingly by the driver. Ben, just an educated guess but is this one the one which is failing to work correctly? Cause the PCIe bus interface is pretty much identical over all generations of the last decade or so. Only the newest Vega10 generation is a bit different. So I strongly thing that this isn't related to the device being a Cedar at all, but rather that you have a bridge above it which doesn't correctly handle 64bit transfers. Can you please send and "lspci -t" of both the working and the problematic devices? Thanks, Christian. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
Hi Christian, Michel, Alex, et al., I mentioned the HD 5450 purely as a matter of archeological interest. Back to the FirePro 2270 and Embedded Radeon E6465: I've attached text from both "lspci -tv" and "lspci -v." Actually I'm attaching a couple of different "lspci -v" outputs, one with the FirePro 2270 in place and one with the E6465 in (the same) place. I suspected, but couldn't prove, that the problem might have something to do with the bridge (IBM POWER8 Host Bridge (PHB3)). But I want to reiterate: - Cedar GPU -> problem (before patch, that is); - Caicos GPU in the same slot -> no problem -- Ben P.S. Alex, thanks for applying the patch so expeditiously! On Fri, Feb 23, 2018 at 2:45 AM, Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 22.02.2018 um 18:56 schrieb Michel Dänzer: > >> On 2018-02-22 06:37 PM, Ben Crocker wrote: >> >>> One of my colleagues did discover a "Radeon HG 5450 PCI" from February >>> 2010 which did, apparently, have a Cedar GPU and very definitely had a >>> (plain old) PCI connector. >>> >> There must be a PCIe-to-PCI bridge on that board. The GPU itself is >> always PCIe, and treated accordingly by the driver. >> > > Ben, just an educated guess but is this one the one which is failing to > work correctly? > > Cause the PCIe bus interface is pretty much identical over all generations > of the last decade or so. Only the newest Vega10 generation is a bit > different. > > So I strongly thing that this isn't related to the device being a Cedar at > all, but rather that you have a bridge above it which doesn't correctly > handle 64bit transfers. > > Can you please send and "lspci -t" of both the working and the problematic > devices? > > Thanks, > Christian. > -+-[0045:00]---00.0-[01]00.0 Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller +-[0044:00]---00.0-[01]-- +-[0040:00]---00.0-[01]-- +-[0005:00]---00.0-[01-0f]00.0-[02-0f]--+-01.0-[03]00.0 Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller | +-08.0-[04]00.0 IBM PCI-E IPR SAS Adapter (ASIC) | +-09.0-[05]--+-00.0 Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe | |+-00.1 Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe | |+-00.2 Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe | |\-00.3 Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe | +-10.0-[06-0a]-- | \-11.0-[0b-0f]-- +-[0004:00]---00.0-[01]--+-00.0 Advanced Micro Devices, Inc. [AMD/ATI] Cedar GL [FirePro 2270] |\-00.1 Advanced Micro Devices, Inc. [AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] +-[0001:00]---00.0-[01-0d]00.0-[02-0d]--+-01.0-[03-07]-- | +-08.0-[08]00.0 IBM PCI-E IPR SAS Adapter (ASIC) | \-09.0-[09-0d]-- \-[:00]---00.0-[01]-- :00:00.0 PCI bridge: IBM POWER8 Host Bridge (PHB3) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0, NUMA node 0 Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 I/O behind bridge: None Memory behind bridge: None Prefetchable memory behind bridge: None Capabilities: [40] Power Management version 3 Capabilities: [48] Express Root Port (Slot-), MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [148] #19 Kernel modules: shpchp 0001:00:00.0 PCI bridge: IBM POWER8 Host Bridge (PHB3) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0, NUMA node 0 Bus: primary=00, secondary=01, subordinate=0d, sec-latency=0 I/O behind bridge: None Memory behind bridge: 8000-ffef [size=2047M] Prefetchable memory behind bridge: 2100-21fd [size=1016G] Capabilities: [40] Power Management version 3 Capabilities: [48] Express Root Port (Slot-), MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [148] #19 Kernel modules: shpchp 0001:01:00.0 PCI bridge: PLX Technology, Inc. PEX 8732 32-lane, 8-Port PCI Express Gen 3 (8.0 GT/s) Switch (rev ca) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0, IRQ 493, NUMA node 0 Memory at 3fe08280 (32-bit, non-prefetchable) [size=256K] Bus: primary=01, secondary=02, subordinate=0d, sec-latency=0 I/O behind bridge: None Memory behind bridge: 8000-ffef [size=2047M] Prefetchable memory behind bridge: 2100-21fd [size=1016G] Capabilities: [40]
Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
Am 22.02.2018 um 18:56 schrieb Michel Dänzer: On 2018-02-22 06:37 PM, Ben Crocker wrote: One of my colleagues did discover a "Radeon HG 5450 PCI" from February 2010 which did, apparently, have a Cedar GPU and very definitely had a (plain old) PCI connector. There must be a PCIe-to-PCI bridge on that board. The GPU itself is always PCIe, and treated accordingly by the driver. Ben, just an educated guess but is this one the one which is failing to work correctly? Cause the PCIe bus interface is pretty much identical over all generations of the last decade or so. Only the newest Vega10 generation is a bit different. So I strongly thing that this isn't related to the device being a Cedar at all, but rather that you have a bridge above it which doesn't correctly handle 64bit transfers. Can you please send and "lspci -t" of both the working and the problematic devices? Thanks, Christian. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
On Thu, Feb 22, 2018 at 5:52 PM, Ben Crockerwrote: > 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. > > Signed-off-by: Ben Crocker Applied. thanks! Alex > --- > drivers/gpu/drm/radeon/radeon_device.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/radeon/radeon_device.c > b/drivers/gpu/drm/radeon/radeon_device.c > index ffc10cadcf34..32b577c776b9 100644 > --- a/drivers/gpu/drm/radeon/radeon_device.c > +++ b/drivers/gpu/drm/radeon/radeon_device.c > @@ -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 > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
On 2018-02-22 06:37 PM, Ben Crocker wrote: > One of my colleagues did discover a "Radeon HG 5450 PCI" from February > 2010 which did, apparently, have a Cedar GPU and very definitely had a > (plain old) PCI connector. There must be a PCIe-to-PCI bridge on that board. The GPU itself is always PCIe, and treated accordingly by the driver. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] 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. Signed-off-by: Ben Crocker--- drivers/gpu/drm/radeon/radeon_device.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index ffc10cadcf34..32b577c776b9 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -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 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
One of my colleagues did discover a "Radeon HG 5450 PCI" from February 2010 which did, apparently, have a Cedar GPU and very definitely had a (plain old) PCI connector. But I take your point, and will just drop the PCI/PCIE check. On Thu, Feb 22, 2018 at 12:04 PM, Michel Dänzerwrote: > On 2018-02-22 10:57 PM, Ben Crocker wrote: > > 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. > > > > Signed-off-by: Ben Crocker > > --- > > drivers/gpu/drm/radeon/radeon_device.c | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/radeon/radeon_device.c > b/drivers/gpu/drm/radeon/radeon_device.c > > index ffc10cadcf34..ba7435bcd208 100644 > > --- a/drivers/gpu/drm/radeon/radeon_device.c > > +++ b/drivers/gpu/drm/radeon/radeon_device.c > > @@ -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)) && > > Cedar is (like all Radeons from the last decade) always PCIe, so this > flags check is redundant FWIW. > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer > ___ > amd-gfx mailing list > amd-...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
On 2018-02-22 10:57 PM, Ben Crocker wrote: > 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. > > Signed-off-by: Ben Crocker> --- > drivers/gpu/drm/radeon/radeon_device.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/radeon/radeon_device.c > b/drivers/gpu/drm/radeon/radeon_device.c > index ffc10cadcf34..ba7435bcd208 100644 > --- a/drivers/gpu/drm/radeon/radeon_device.c > +++ b/drivers/gpu/drm/radeon/radeon_device.c > @@ -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)) && Cedar is (like all Radeons from the last decade) always PCIe, so this flags check is redundant FWIW. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] 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. Signed-off-by: Ben Crocker--- drivers/gpu/drm/radeon/radeon_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index ffc10cadcf34..ba7435bcd208 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -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)); -- 2.13.6 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
On Thu, Feb 22, 2018 at 4:51 PM, Ben Crockerwrote: > 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. > > Signed-off-by: Ben Crocker > --- > drivers/gpu/drm/radeon/radeon_device.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/radeon/radeon_device.c > b/drivers/gpu/drm/radeon/radeon_device.c > index ffc10cadcf34..ba7435bcd208 100644 > --- a/drivers/gpu/drm/radeon/radeon_device.c > +++ b/drivers/gpu/drm/radeon/radeon_device.c > @@ -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 > > 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 > amd-...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] 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. Signed-off-by: Ben Crocker--- drivers/gpu/drm/radeon/radeon_device.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index ffc10cadcf34..ba7435bcd208 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -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)); -- 2.13.6 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel