stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree
@ 2018-04-22  8:19 gregkh
  2018-04-24 19:30 ` Ben Crocker
  0 siblings, 1 reply; 4+ messages in thread
From: gregkh @ 2018-04-22  8:19 UTC (permalink / raw)
  To: bcrocker, alexander.deucher; +Cc: stable


The patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From bcb0b981c5571744ac446a6c906aa05a28d21446 Mon Sep 17 00:00:00 2001
From: Ben Crocker <bcrocker@redhat.com>
Date: Thu, 22 Feb 2018 17:52:19 -0500
Subject: [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 <bcrocker@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 7f40c6f7c4dd..e415d2c097a7 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1366,6 +1366,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));

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree
  2018-04-22  8:19 FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree gregkh
@ 2018-04-24 19:30 ` Ben Crocker
  2018-04-24 20:48   ` Deucher, Alexander
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Crocker @ 2018-04-24 19:30 UTC (permalink / raw)
  To: gregkh; +Cc: alexander.deucher, stable

(Third try, after turning on Plain Text mode in Gmail; apologies if
you got this more than once)

Hi Greg,

Thanks for the note.  I think this is a case of the same change having
been checked in on different branches.  I downloaded the linux-4.16.3
tarball, unpacked it, and examined radeon_device.c; the correct change
is there in radeon_device_init (the four lines beginning "#ifdef
CONFIG_PPC64").

Looking at the whole git log, I see two instances of exactly the same
patch:

commit bcb0b981c5571744ac446a6c906aa05a28d21446
Author: Ben Crocker <bcrocker@redhat.com>
Date:   Thu Feb 22 17:52:19 2018 -0500

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

and

commit 2c83029cda55a5e7665c7c6326909427d6a01350
Author: Ben Crocker <bcrocker@redhat.com>
Date:   Thu Feb 22 17:52:19 2018 -0500

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

A colleague of mine here at Red Hat thinks that no further action is
necessary; please let me know what you think.

  Thanks,
  Ben


On Sun, Apr 22, 2018 at 4:19 AM,  <gregkh@linuxfoundation.org> wrote:
>
> The patch below does not apply to the 4.16-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> From bcb0b981c5571744ac446a6c906aa05a28d21446 Mon Sep 17 00:00:00 2001
> From: Ben Crocker <bcrocker@redhat.com>
> Date: Thu, 22 Feb 2018 17:52:19 -0500
> Subject: [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 <bcrocker@redhat.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
>
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 7f40c6f7c4dd..e415d2c097a7 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -1366,6 +1366,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));
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree
  2018-04-24 19:30 ` Ben Crocker
@ 2018-04-24 20:48   ` Deucher, Alexander
  2018-04-25  5:58     ` gregkh
  0 siblings, 1 reply; 4+ messages in thread
From: Deucher, Alexander @ 2018-04-24 20:48 UTC (permalink / raw)
  To: Ben Crocker, gregkh@linuxfoundation.org; +Cc: stable@vger.kernel.org

> -----Original Message-----
> From: Ben Crocker [mailto:bcrocker@redhat.com]
> Sent: Tuesday, April 24, 2018 3:30 PM
> To: gregkh@linuxfoundation.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>;
> stable@vger.kernel.org
> Subject: Re: FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for
> Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree
> 
> (Third try, after turning on Plain Text mode in Gmail; apologies if you got this
> more than once)
> 
> Hi Greg,
> 
> Thanks for the note.  I think this is a case of the same change having been
> checked in on different branches.  I downloaded the linux-4.16.3 tarball,
> unpacked it, and examined radeon_device.c; the correct change is there in
> radeon_device_init (the four lines beginning "#ifdef CONFIG_PPC64").
> 
> Looking at the whole git log, I see two instances of exactly the same
> patch:
> 
> commit bcb0b981c5571744ac446a6c906aa05a28d21446
> Author: Ben Crocker <bcrocker@redhat.com>
> Date:   Thu Feb 22 17:52:19 2018 -0500
> 
>     drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
> 
> and
> 
> commit 2c83029cda55a5e7665c7c6326909427d6a01350
> Author: Ben Crocker <bcrocker@redhat.com>
> Date:   Thu Feb 22 17:52:19 2018 -0500
> 
>     drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
> 
> A colleague of mine here at Red Hat thinks that no further action is
> necessary; please let me know what you think.

No further action is required.  The patch was committed to drm-next for the next kernel and also ended up in drm-fixes for the current one at the time.

Alex

> 
>   Thanks,
>   Ben
> 
> 
> On Sun, Apr 22, 2018 at 4:19 AM,  <gregkh@linuxfoundation.org> wrote:
> >
> > The patch below does not apply to the 4.16-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git
> > commit id to <stable@vger.kernel.org>.
> >
> > thanks,
> >
> > greg k-h
> >
> > ------------------ original commit in Linus's tree ------------------
> >
> > From bcb0b981c5571744ac446a6c906aa05a28d21446 Mon Sep 17 00:00:00
> 2001
> > From: Ben Crocker <bcrocker@redhat.com>
> > Date: Thu, 22 Feb 2018 17:52:19 -0500
> > Subject: [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 <bcrocker@redhat.com>
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > Cc: stable@vger.kernel.org
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_device.c
> > b/drivers/gpu/drm/radeon/radeon_device.c
> > index 7f40c6f7c4dd..e415d2c097a7 100644
> > --- a/drivers/gpu/drm/radeon/radeon_device.c
> > +++ b/drivers/gpu/drm/radeon/radeon_device.c
> > @@ -1366,6 +1366,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));
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree
  2018-04-24 20:48   ` Deucher, Alexander
@ 2018-04-25  5:58     ` gregkh
  0 siblings, 0 replies; 4+ messages in thread
From: gregkh @ 2018-04-25  5:58 UTC (permalink / raw)
  To: Deucher, Alexander; +Cc: Ben Crocker, stable@vger.kernel.org

On Tue, Apr 24, 2018 at 08:48:42PM +0000, Deucher, Alexander wrote:
> > -----Original Message-----
> > From: Ben Crocker [mailto:bcrocker@redhat.com]
> > Sent: Tuesday, April 24, 2018 3:30 PM
> > To: gregkh@linuxfoundation.org
> > Cc: Deucher, Alexander <Alexander.Deucher@amd.com>;
> > stable@vger.kernel.org
> > Subject: Re: FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for
> > Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree
> > 
> > (Third try, after turning on Plain Text mode in Gmail; apologies if you got this
> > more than once)
> > 
> > Hi Greg,
> > 
> > Thanks for the note.  I think this is a case of the same change having been
> > checked in on different branches.  I downloaded the linux-4.16.3 tarball,
> > unpacked it, and examined radeon_device.c; the correct change is there in
> > radeon_device_init (the four lines beginning "#ifdef CONFIG_PPC64").
> > 
> > Looking at the whole git log, I see two instances of exactly the same
> > patch:
> > 
> > commit bcb0b981c5571744ac446a6c906aa05a28d21446
> > Author: Ben Crocker <bcrocker@redhat.com>
> > Date:   Thu Feb 22 17:52:19 2018 -0500
> > 
> >     drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
> > 
> > and
> > 
> > commit 2c83029cda55a5e7665c7c6326909427d6a01350
> > Author: Ben Crocker <bcrocker@redhat.com>
> > Date:   Thu Feb 22 17:52:19 2018 -0500
> > 
> >     drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE
> > 
> > A colleague of mine here at Red Hat thinks that no further action is
> > necessary; please let me know what you think.
> 
> No further action is required.  The patch was committed to drm-next
> for the next kernel and also ended up in drm-fixes for the current one
> at the time.

And it's annoying as hell.

I already argued a lot with the i915 maintainers about this in the past,
but for them, at least they have the crazy "cherry-picked from..." tag
in there showing how they are cherry picking from a _FUTURE_ commit,
which gives me a hint as to the lunacy that is happening so I can
properly detect it when it hits the tree for the second time.

But for these patches I have no clue.

Which is why all stable DRM driver patches are at the absolute bottom of
my priority queue and I dread seeing them ever show up as I don't know
what mess is going to happen whenever I try to apply them.

If you are going to do this more often in the future, at least give me a
fighting chance to detect it is happening.  Otherwise you will get a lot
of these "FAILED" emails happening, along with me just starting to
ignore radeon stable patches, like I do for i915, until they pile up and
I have nothing else better to do that day.

What a mess...

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-25  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-22  8:19 FAILED: patch "[PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE" failed to apply to 4.16-stable tree gregkh
2018-04-24 19:30 ` Ben Crocker
2018-04-24 20:48   ` Deucher, Alexander
2018-04-25  5:58     ` gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).