aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests/i915_request.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-08-19 12:20:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-08-19 15:25:56 +0100
commit70d6894d1456de95a3b8b3c80f6d0714fc04fcec (patch)
tree41e67b84a29a119afbaac733cf4431ef28de1695 /drivers/gpu/drm/i915/selftests/i915_request.c
parentdrm/i915: Only emit the 'send bug report' once for a GPU hang (diff)
downloadlinux-dev-70d6894d1456de95a3b8b3c80f6d0714fc04fcec.tar.xz
linux-dev-70d6894d1456de95a3b8b3c80f6d0714fc04fcec.zip
drm/i915: Serialize against vma moves
Make sure that when submitting requests, we always serialize against potential vma moves and clflushes. Time for a i915_request_await_vma() interface! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190819112033.30638-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_request.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_request.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index 3937d43c2961..170e4afa9ccb 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -876,7 +876,9 @@ static int live_all_engines(void *arg)
request[id]->batch = batch;
i915_vma_lock(batch);
- err = i915_vma_move_to_active(batch, request[id], 0);
+ err = i915_request_await_object(request[id], batch->obj, 0);
+ if (err == 0)
+ err = i915_vma_move_to_active(batch, request[id], 0);
i915_vma_unlock(batch);
GEM_BUG_ON(err);