All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Benjamin Herrenschmidt
	<benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
Cc: xorg-driver-ati-go0+a7rfsptAfugRpC6u6w@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Cedric Cano
	<ccano-fDpYTK8McCyb96RL25iYa1aTQe2KTcn/@public.gmane.org>
Subject: Re: [PATCH 5/6] drm/radeon: Do an MMIO read on interrupts when not uisng MSIs
Date: Wed, 13 Jul 2011 10:48:50 -0400	[thread overview]
Message-ID: <CADnq5_OEMX0DyUV1RpALLFP_Lm89adMde_GE7Y__tUd_jqdkcg@mail.gmail.com> (raw)
In-Reply-To: <CADnq5_NRoaEio=Y=Ja2PN3gQC10-CjkKmKRgA74s1uH8APi=ZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wed, Jul 13, 2011 at 10:44 AM, Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt
> <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org> wrote:
>> When not using MSIs, there is no guarantee that DMA from the device
>> has been fully flushed to point where it's visible to the CPU when
>> taking an interrupt. To get this guarantee, we need to perform an
>> MMIO read from the device, which will flush all outstanding DMAs
>> from bridges between the device and the system.
>>
>> Signed-off-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
>
> Reviewed-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>

evergreen.c will need a similar fix.

Alex

>
>> ---
>>
>>  (resent adding dri-devel to the CC list to hit patchwork)
>>
>> drivers/gpu/drm/radeon/r600.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
>> index 7e5c801..25b2dab 100644
>> --- a/drivers/gpu/drm/radeon/r600.c
>> +++ b/drivers/gpu/drm/radeon/r600.c
>> @@ -3300,6 +3300,10 @@ int r600_irq_process(struct radeon_device *rdev)
>>        if (!rdev->ih.enabled || rdev->shutdown)
>>                return IRQ_NONE;
>>
>> +       /* No MSIs, need a dummy read to flush PCI DMAs */
>> +       if (!rdev->msi_enabled)
>> +               RREG32(IH_RB_WPTR);
>> +
>>        wptr = r600_get_ih_wptr(rdev);
>>        rptr = rdev->ih.rptr;
>>        DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
>>
>>
>>
>>
>

      parent reply	other threads:[~2011-07-13 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13  6:28 [PATCH 5/6] drm/radeon: Do an MMIO read on interrupts when not uisng MSIs Benjamin Herrenschmidt
2011-07-13 14:44 ` Alex Deucher
     [not found]   ` <CADnq5_NRoaEio=Y=Ja2PN3gQC10-CjkKmKRgA74s1uH8APi=ZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-13 14:48     ` Alex Deucher [this message]

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=CADnq5_OEMX0DyUV1RpALLFP_Lm89adMde_GE7Y__tUd_jqdkcg@mail.gmail.com \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org \
    --cc=ccano-fDpYTK8McCyb96RL25iYa1aTQe2KTcn/@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=xorg-driver-ati-go0+a7rfsptAfugRpC6u6w@public.gmane.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.