public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 01/28] drm/i915/selftests: Add the usual batch vma managements to st_workarounds
@ 2019-08-26  7:21 Chris Wilson
  2019-08-26  7:21 ` [PATCH 02/28] drm/i915/selftests: Remove accidental serialization between gpu_fill Chris Wilson
                   ` (29 more replies)
  0 siblings, 30 replies; 43+ messages in thread
From: Chris Wilson @ 2019-08-26  7:21 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

To properly handle asynchronous migration of batch objects, we need to
couple the fences on the incoming batch into the request and should not
assume that they always start idle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_workarounds.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/selftest_workarounds.c b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
index d06d68ac2a3b..999a98f00494 100644
--- a/drivers/gpu/drm/i915/gt/selftest_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/selftest_workarounds.c
@@ -565,6 +565,14 @@ static int check_dirty_whitelist(struct i915_gem_context *ctx,
 				goto err_request;
 		}
 
+		i915_vma_lock(batch);
+		err = i915_request_await_object(rq, batch->obj, false);
+		if (err == 0)
+			err = i915_vma_move_to_active(batch, rq, 0);
+		i915_vma_unlock(batch);
+		if (err)
+			goto err_request;
+
 		err = engine->emit_bb_start(rq,
 					    batch->node.start, PAGE_SIZE,
 					    0);
@@ -850,6 +858,14 @@ static int scrub_whitelisted_registers(struct i915_gem_context *ctx,
 			goto err_request;
 	}
 
+	i915_vma_lock(batch);
+	err = i915_request_await_object(rq, batch->obj, false);
+	if (err == 0)
+		err = i915_vma_move_to_active(batch, rq, 0);
+	i915_vma_unlock(batch);
+	if (err)
+		goto err_request;
+
 	/* Perform the writes from an unprivileged "user" batch */
 	err = engine->emit_bb_start(rq, batch->node.start, 0, 0);
 
-- 
2.23.0

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

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

end of thread, other threads:[~2019-08-28 17:01 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-26  7:21 [PATCH 01/28] drm/i915/selftests: Add the usual batch vma managements to st_workarounds Chris Wilson
2019-08-26  7:21 ` [PATCH 02/28] drm/i915/selftests: Remove accidental serialization between gpu_fill Chris Wilson
2019-08-27 15:54   ` Matthew Auld
2019-08-26  7:21 ` [PATCH 03/28] drm/i915/selftests: Try to recycle context allocations Chris Wilson
2019-08-27 16:11   ` Matthew Auld
2019-08-26  7:21 ` [PATCH 04/28] drm/i915/gtt: Downgrade Baytrail back to aliasing-ppgtt Chris Wilson
2019-08-26  7:21 ` [PATCH 05/28] drm/i915/gtt: Downgrade Cherryview " Chris Wilson
2019-08-26  7:21 ` [PATCH 06/28] drm/i915: Protect our local workers against I915_FENCE_TIMEOUT Chris Wilson
2019-08-28 17:01   ` Matthew Auld
2019-08-26  7:21 ` [PATCH 07/28] drm/i915: Force PD reload on any PD update Chris Wilson
2019-08-26  7:21 ` [PATCH 08/28] drm/i915: Replace obj->pin_global with obj->frontbuffer Chris Wilson
2019-08-26  7:21 ` [PATCH 09/28] dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling) Chris Wilson
2019-08-26  7:21 ` [PATCH 10/28] drm/mm: Pack allocated/scanned boolean into a bitfield Chris Wilson
2019-08-27  7:12   ` kbuild test robot
2019-08-26  7:21 ` [PATCH 11/28] drm/i915: Make shrink/unshrink be atomic Chris Wilson
2019-08-26  7:21 ` [PATCH 12/28] drm/i915: Only track bound elements of the GTT Chris Wilson
2019-08-26  7:21 ` [PATCH 13/28] drm/i915: Make i915_vma.flags atomic_t for mutex reduction Chris Wilson
2019-08-26  7:21 ` [PATCH 14/28] drm/i915: Mark up address spaces that may need to allocate Chris Wilson
2019-08-26  7:21 ` [PATCH 15/28] drm/i915: Pull i915_vma_pin under the vm->mutex Chris Wilson
2019-08-26  7:21 ` [PATCH 16/28] drm/i915: Push the i915_active.retire into a worker Chris Wilson
2019-08-26  7:21 ` [PATCH 17/28] drm/i915: Coordinate i915_active with its own mutex Chris Wilson
2019-08-26  7:21 ` [PATCH 18/28] drm/i915: Move idle barrier cleanup into engine-pm Chris Wilson
2019-08-26  7:21 ` [PATCH 19/28] drm/i915: Drop struct_mutex from around i915_retire_requests() Chris Wilson
2019-08-26  7:21 ` [PATCH 20/28] drm/i915: Merge wait_for_timelines with retire_request Chris Wilson
2019-08-26  7:21 ` [PATCH 21/28] drm/i915: Serialise the fill BLT with the vma pinning Chris Wilson
2019-08-26  7:21 ` [PATCH 22/28] drm/i915/execlists: Always request completion before marking an error Chris Wilson
2019-08-26  7:21 ` [PATCH 23/28] drm/i915: Only enqueue already completed requests Chris Wilson
2019-08-26  7:21 ` [PATCH 24/28] drm/i915/execlists: Force preemption Chris Wilson
2019-08-26  7:21 ` [PATCH 25/28] drm/i915: Mark up "sentinel" requests Chris Wilson
2019-08-26  7:21 ` [PATCH 26/28] drm/i915/execlists: Cancel banned contexts on schedule-out Chris Wilson
2019-08-26  7:21 ` [PATCH 27/28] drm/i915: Cancel non-persistent contexts on close Chris Wilson
2019-08-26 13:39   ` Bloomfield, Jon
2019-08-26 16:50     ` Chris Wilson
2019-08-26  7:21 ` [PATCH 28/28] drm/i915: Replace hangcheck by heartbeats Chris Wilson
2019-08-26 14:08   ` Bloomfield, Jon
2019-08-26 16:56     ` Chris Wilson
2019-08-26 17:51       ` Bloomfield, Jon
2019-08-26 17:57         ` Chris Wilson
2019-08-26  7:34 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/28] drm/i915/selftests: Add the usual batch vma managements to st_workarounds Patchwork
2019-08-26  7:57 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-08-26  9:35   ` Chris Wilson
2019-08-26 13:33   ` Chris Wilson
2019-08-27  9:19 ` [PATCH 01/28] " Matthew Auld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox