All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/i915/gtt: Move wmb inside ggtt_invalidate
@ 2018-05-07 16:52 Mika Kuoppala
  2018-05-07 16:52 ` [PATCH 2/5] drm/i915/gtt: Combine marking engines dirty with wmb Mika Kuoppala
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Mika Kuoppala @ 2018-05-07 16:52 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

We use a pattern of wmb() along with ggtt_invalidate.
Move the wmb out from call sites into the ggtt_invalidate
as it is part of invalidation.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index c879bfd9294f..2963d3d71729 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -110,6 +110,9 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma);
 
 static void gen6_ggtt_invalidate(struct drm_i915_private *dev_priv)
 {
+	/* Flush write combining buffer */
+	wmb();
+
 	/* Note that as an uncached mmio write, this should flush the
 	 * WCB of the writes into the GGTT before it triggers the invalidate.
 	 */
@@ -2418,8 +2421,6 @@ static void gen8_ggtt_insert_entries(struct i915_address_space *vm,
 	for_each_sgt_dma(addr, sgt_iter, vma->pages)
 		gen8_set_pte(gtt_entries++, pte_encode | addr);
 
-	wmb();
-
 	/* This next bit makes the above posting read even more important. We
 	 * want to flush the TLBs only after we're certain all the PTE updates
 	 * have finished.
@@ -2460,7 +2461,6 @@ static void gen6_ggtt_insert_entries(struct i915_address_space *vm,
 	dma_addr_t addr;
 	for_each_sgt_dma(addr, iter, vma->pages)
 		iowrite32(vm->pte_encode(addr, level, flags), &entries[i++]);
-	wmb();
 
 	/* This next bit makes the above posting read even more important. We
 	 * want to flush the TLBs only after we're certain all the PTE updates
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-05-07 22:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 16:52 [PATCH 1/5] drm/i915/gtt: Move wmb inside ggtt_invalidate Mika Kuoppala
2018-05-07 16:52 ` [PATCH 2/5] drm/i915/gtt: Combine marking engines dirty with wmb Mika Kuoppala
2018-05-07 19:36   ` Chris Wilson
2018-05-07 16:52 ` [PATCH 3/5] drm/i915/gtt: Don't track dirty in gen6_alloc_va_range Mika Kuoppala
2018-05-07 19:37   ` Chris Wilson
2018-05-07 16:52 ` [PATCH 4/5] drm/i915/gtt: Flush write combining buffer on insert entries Mika Kuoppala
2018-05-07 19:38   ` Chris Wilson
2018-05-07 16:52 ` [PATCH 5/5] drm/i915/gtt: Trust the uncached store to flush wcb Mika Kuoppala
2018-05-07 17:01 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/gtt: Move wmb inside ggtt_invalidate Patchwork
2018-05-07 17:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-07 17:19 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-07 18:59 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-07 21:59 ` [PATCH 1/5] " Chris Wilson

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.