All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: xorg-driver-ati@lists.x.org, dri-devel@lists.freedesktop.org,
	Cedric Cano <ccano@interfaceconcept.com>
Subject: [PATCH 4/6] drm/radeon: Add a rmb() in IH processing
Date: Wed, 13 Jul 2011 16:28:19 +1000	[thread overview]
Message-ID: <1310538499.4968.94.camel@pasglop> (raw)

We should have a read memory barrier between reading the WPTR from
memory and reading ring entries based on that value (ie, we need to
ensure both loads are done in order by the CPU).

It could be argued that the MMIO reads in r600_ack_irq() might be
enough to get that barrier but I prefer keeping an explicit one just
in case.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 
(resent adding dri-devel to the CC list to hit patchwork)

drivers/gpu/drm/radeon/r600.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 3c86b15..7e5c801 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -3312,6 +3312,9 @@ int r600_irq_process(struct radeon_device *rdev)
 	}
 
 restart_ih:
+	/* Order reading of wptr vs. reading of IH ring data */
+	wmb();
+
 	/* display interrupts */
 	r600_irq_ack(rdev);

             reply	other threads:[~2011-07-13  6:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13  6:28 Benjamin Herrenschmidt [this message]
2011-07-13 14:43 ` [PATCH 4/6] drm/radeon: Add a rmb() in IH processing Alex Deucher
2011-07-13 14:48   ` Alex Deucher
     [not found]     ` <CADnq5_PooKO9NyKQz4euuykVpcZ7TXMqPXUAxKxX_LoKkrqj4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-13 21:42       ` Benjamin Herrenschmidt
2011-07-14  2:22         ` Alex Deucher
2011-07-15  4:19 ` Matt Turner
2011-07-15  4:43   ` Benjamin Herrenschmidt

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=1310538499.4968.94.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=alexdeucher@gmail.com \
    --cc=ccano@interfaceconcept.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=xorg-driver-ati@lists.x.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.