All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v3] Do we need to posting-read after ggtt insert-page?
Date: Fri, 23 Aug 2019 15:14:09 +0100	[thread overview]
Message-ID: <20190823141409.2216-1-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20190823132700.25286-3-chris@chris-wilson.co.uk>

See gem_set_tiling_vs_pwrite/vs_blit
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 2680b388dc33..a08cbbf16bac 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -127,6 +127,15 @@ static void gen6_ggtt_invalidate(struct i915_ggtt *ggtt)
 	 * WCB of the writes into the GGTT before it triggers the invalidate.
 	 */
 	intel_uncore_write_fw(uncore, GFX_FLSH_CNTL_GEN6, GFX_FLSH_CNTL_EN);
+
+	/*
+	 * Make sure the internal GAM fifo has been cleared of all GTT
+	 * writes before exiting stop_machine(). This guarantees that
+	 * any aperture accesses waiting to start in another process
+	 * cannot back up behind the GTT writes causing a hang.
+	 * The register can be any arbitrary GAM register.
+	 */
+	intel_uncore_posting_read_fw(uncore, GFX_FLSH_CNTL_GEN6);
 }
 
 static void guc_ggtt_invalidate(struct i915_ggtt *ggtt)
@@ -2271,20 +2280,6 @@ static void gen8_ggtt_clear_range(struct i915_address_space *vm,
 		gen8_set_pte(&gtt_base[i], scratch_pte);
 }
 
-static void bxt_vtd_ggtt_wa(struct i915_address_space *vm)
-{
-	struct drm_i915_private *dev_priv = vm->i915;
-
-	/*
-	 * Make sure the internal GAM fifo has been cleared of all GTT
-	 * writes before exiting stop_machine(). This guarantees that
-	 * any aperture accesses waiting to start in another process
-	 * cannot back up behind the GTT writes causing a hang.
-	 * The register can be any arbitrary GAM register.
-	 */
-	POSTING_READ(GFX_FLSH_CNTL_GEN6);
-}
-
 struct insert_page {
 	struct i915_address_space *vm;
 	dma_addr_t addr;
@@ -2297,7 +2292,6 @@ static int bxt_vtd_ggtt_insert_page__cb(void *_arg)
 	struct insert_page *arg = _arg;
 
 	gen8_ggtt_insert_page(arg->vm, arg->addr, arg->offset, arg->level, 0);
-	bxt_vtd_ggtt_wa(arg->vm);
 
 	return 0;
 }
@@ -2325,7 +2319,6 @@ static int bxt_vtd_ggtt_insert_entries__cb(void *_arg)
 	struct insert_entries *arg = _arg;
 
 	gen8_ggtt_insert_entries(arg->vm, arg->vma, arg->level, arg->flags);
-	bxt_vtd_ggtt_wa(arg->vm);
 
 	return 0;
 }
@@ -2351,7 +2344,6 @@ static int bxt_vtd_ggtt_clear_range__cb(void *_arg)
 	struct clear_range *arg = _arg;
 
 	gen8_ggtt_clear_range(arg->vm, arg->start, arg->length);
-	bxt_vtd_ggtt_wa(arg->vm);
 
 	return 0;
 }
-- 
2.23.0

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

  reply	other threads:[~2019-08-23 14:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 13:26 vm->mutex Chris Wilson
2019-08-23 13:26 ` [PATCH 01/15] drm/i915: Hold irq-off for the entire fake lock period Chris Wilson
2019-08-23 13:26 ` [PATCH 02/15] drm/i915/gtt: Preallocate Braswell top-level page directory Chris Wilson
2019-08-23 14:14   ` Chris Wilson [this message]
2019-08-23 14:14     ` [PATCH v3] Do we need to posting-read after ggtt insert-page? Chris Wilson
2019-08-23 14:14   ` [PATCH v3] drm/i915/gtt: Preallocate Braswell top-level page directory Chris Wilson
2019-08-23 13:26 ` [PATCH 03/15] drm/i915/selftests: Teach igt_gpu_fill_dw() to take intel_context Chris Wilson
2019-08-23 16:45   ` [PATCH] " Chris Wilson
2019-08-23 13:26 ` [PATCH 04/15] dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling) Chris Wilson
2019-08-23 13:26 ` [PATCH 05/15] drm/i915: Make shrink/unshrink be atomic Chris Wilson
2019-08-23 13:26 ` [PATCH 06/15] drm/i915: Mark up obj->pin_global as being atomic Chris Wilson
2019-08-23 16:00   ` Mika Kuoppala
2019-08-23 16:03     ` Chris Wilson
2019-08-23 13:26 ` [PATCH 07/15] drm/i915: Only track bound elements of the GTT Chris Wilson
2019-08-23 13:26 ` [PATCH 08/15] drm/i915: Make i915_vma.flags atomic_t for mutex reduction Chris Wilson
2019-08-23 13:26 ` [PATCH 09/15] drm/i915: Mark up address spaces that may need to allocate Chris Wilson
2019-08-23 13:26 ` [PATCH 10/15] drm/i915: Pull i915_vma_pin under the vm->mutex Chris Wilson
2019-08-23 13:26 ` [PATCH 11/15] drm/i915: Push the i915_active.retire into a worker Chris Wilson
2019-08-23 13:26 ` [PATCH 12/15] drm/i915: Coordinate i915_active with its own mutex Chris Wilson
2019-08-23 13:26 ` [PATCH 13/15] drm/i915: Move idle barrier cleanup into engine-pm Chris Wilson
2019-08-23 13:26 ` [PATCH 14/15] drm/i915: Drop struct_mutex from around i915_retire_requests() Chris Wilson
2019-08-23 13:27 ` [PATCH 15/15] drm/i915: Serialise the fill BLT with the vma pinning Chris Wilson
2019-08-23 16:48 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/15] drm/i915: Hold irq-off for the entire fake lock period (rev3) Patchwork
2019-08-23 17:43 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-08-23 20:06 ` ✗ Fi.CI.BAT: failure for series starting with [01/15] drm/i915: Hold irq-off for the entire fake lock period (rev4) Patchwork

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=20190823141409.2216-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@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.