All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/6] drm/radeon: Add a rmb() in IH processing
@ 2011-07-13  6:28 Benjamin Herrenschmidt
  2011-07-13 14:43 ` Alex Deucher
  2011-07-15  4:19 ` Matt Turner
  0 siblings, 2 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2011-07-13  6:28 UTC (permalink / raw)
  To: Alex Deucher; +Cc: xorg-driver-ati, dri-devel, Cedric Cano

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);

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

end of thread, other threads:[~2011-07-15  4:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13  6:28 [PATCH 4/6] drm/radeon: Add a rmb() in IH processing Benjamin Herrenschmidt
2011-07-13 14:43 ` 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

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.