All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Crocker <bcrocker@redhat.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Christian Koenig <christian.koenig@amd.com>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/radeon: insist on 32-bit DMA for Cedar
Date: Thu, 22 Feb 2018 11:45:39 -0500	[thread overview]
Message-ID: <CALk+eRd-aJ--2cau1q9M5F7k013hDMeayzLXhkwEEi-Vzwmw+A@mail.gmail.com> (raw)
In-Reply-To: <CADnq5_N8Qp6JCRxGQk6NF5T3CD+jGtwox7K=qO1cLwp3C++jHg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4048 bytes --]

I considered that, but I'm only equipped to test on a few cards--the ones
IBM is interested in.
So this Cedar-specific change fixes the problem on the FirePro 2270; the
other cards seem
perfectly capable of handling 40+ bit DMA addresses on the Power8 platform.


On Thu, Feb 22, 2018 at 11:07 AM, Alex Deucher <alexdeucher@gmail.com>
wrote:

> On Thu, Feb 22, 2018 at 10:55 AM, Ben Crocker <bcrocker@redhat.com> wrote:
> > Alex, Christian, et al.
> >
> > Thanks for your rapid response!
> >
> > I can certainly make the change PPC-only (#ifdef CONFIG_PPC64...) and I
> > think
> > that's the safest way to go right now.  It makes the patch very specific
> to
> > Cedar
> > on PowerPC64, so it doesn't break anything that may have come to depend
> on
> > Russell's and Alistair's changes, and my timetable for getting a fix in
> is
> > very short.
>
> If you want to go this route, you might just set need_dma32
> unconditionally for PPC64.  The bus interface hw is pretty much the
> same across all asics in this time period.
>
> Alex
>
>
> >
> > -- Ben
> >
> >
> >
> > On Thu, Feb 22, 2018 at 2:25 AM, Christian König
> > <ckoenig.leichtzumerken@gmail.com> wrote:
> >>
> >> Am 22.02.2018 um 03:05 schrieb Alex Deucher:
> >>>
> >>> On Wed, Feb 21, 2018 at 6:41 PM, Ben Crocker <bcrocker@redhat.com>
> 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.
> >>>
> >>> Can we make this ppc only?  40 bit DMA works fine on x86.
> >>
> >>
> >> Yeah and at least when the dma_coherent allocator path is used it should
> >> work fine on PPC as well.
> >>
> >> So that is not really a driver bug, but a platform bug and we should
> think
> >> about reverting or at least disabling those two patches instead.
> >>
> >> Christian.
> >>
> >>>
> >>> Alex
> >>>
> >>>> Signed-off-by: Ben Crocker <bcrocker@redhat.com>
> >>>> ---
> >>>>   drivers/gpu/drm/radeon/radeon_device.c | 5 ++++-
> >>>>   1 file changed, 4 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/radeon/radeon_device.c
> >>>> b/drivers/gpu/drm/radeon/radeon_device.c
> >>>> index ffc10cadcf34..02538903830d 100644
> >>>> --- a/drivers/gpu/drm/radeon/radeon_device.c
> >>>> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> >>>> @@ -1395,7 +1395,10 @@ int radeon_device_init(struct radeon_device
> >>>> *rdev,
> >>>>          if (rdev->flags & RADEON_IS_AGP)
> >>>>                  rdev->need_dma32 = true;
> >>>>          if ((rdev->flags & RADEON_IS_PCI) &&
> >>>> -           (rdev->family <= CHIP_RS740))
> >>>> +           (rdev->family <= CHIP_RS740 || rdev->family ==
> CHIP_CEDAR))
> >>>> +               rdev->need_dma32 = true;
> >>>> +       if ((rdev->flags & RADEON_IS_PCIE) &&
> >>>> +           (rdev->family == CHIP_CEDAR))
> >>>>                  rdev->need_dma32 = true;
> >>>>
> >>>>          dma_bits = rdev->need_dma32 ? 32 : 40;
> >>>> --
> >>>> 2.13.6
> >>>>
> >>>> _______________________________________________
> >>>> dri-devel mailing list
> >>>> dri-devel@lists.freedesktop.org
> >>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> >>>
> >>> _______________________________________________
> >>> amd-gfx mailing list
> >>> amd-gfx@lists.freedesktop.org
> >>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> >>
> >>
> >
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>

[-- Attachment #1.2: Type: text/html, Size: 6389 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-02-22 16:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 23:41 [PATCH] drm/radeon: insist on 32-bit DMA for Cedar Ben Crocker
     [not found] ` <20180221234154.6877-1-bcrocker-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-02-22  2:05   ` Alex Deucher
     [not found]     ` <CADnq5_M8ZiV2b+LW5oKu0XSQOJvg9idvZ6eBOaHMJRPC2iMj3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-22  7:25       ` Christian König
     [not found]         ` <7d6a06dc-9e88-2427-ec6a-4f48b9aa8f6b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-22 15:55           ` Ben Crocker
     [not found]             ` <CALk+eRcPH+g-eBMKWyO4FrPwuc_VLnp_w89WYKNE51=iV5Y=wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-22 16:07               ` Alex Deucher
2018-02-22 16:45                 ` Ben Crocker [this message]
2018-02-22 16:48                   ` Alex Deucher
2018-02-22 21:57 ` [PATCH] drm/radeon: insist on 32-bit DMA for Cedar on PPC64/PPC64LE Ben Crocker
2018-02-22 17:04   ` Michel Dänzer
2018-02-22 17:37     ` Ben Crocker
     [not found]       ` <CALk+eRew=1nHZXRtXR430eFStOiQFUDgrp8VfsBAfcp8W9qAOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-22 17:56         ` Michel Dänzer
     [not found]           ` <CALk+eRc+EOry_G6Ovy0Z-pvE7jQWy5gSx+1kpHA4q3A0oEZs1w@mail.gmail.com>
     [not found]             ` <CALk+eRc+EOry_G6Ovy0Z-pvE7jQWy5gSx+1kpHA4q3A0oEZs1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-22 23:39               ` Ben Crocker
     [not found]                 ` <CALk+eReghDHuv23-62pD0PbdBt6p+g_XeE+_c2gRdkoaOQh+CQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-23  1:39                   ` Ben Crocker
     [not found]           ` <1bcf5b27-aa25-deb6-85e9-161dd038276b-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-02-23  7:45             ` Christian König
2018-02-23 16:02               ` Ben Crocker
2018-02-23 16:37                 ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALk+eRd-aJ--2cau1q9M5F7k013hDMeayzLXhkwEEi-Vzwmw+A@mail.gmail.com \
    --to=bcrocker@redhat.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.