]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/selftests: Fixup a couple of missing serialisation with vma
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 21 Aug 2019 19:38:51 +0000 (20:38 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 21 Aug 2019 21:21:57 +0000 (22:21 +0100)
In commit 12db8c6f6bc5 ("drm/i915: Serialize against vma moves")
I managed to miss a couple of i915_vma_move_to_active() that had not
serialised against an async vma pinning. Add the missing
i915_request_await.

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/20190821193851.18232-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_request.c
drivers/gpu/drm/i915/selftests/igt_spinner.c

index 170e4afa9ccb392273a4437395ea8a5e022b88cf..b3688543ed7d043d2c899c3c6a38b37e9f95caac 100644 (file)
@@ -994,7 +994,9 @@ static int live_sequential_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, false);
+               if (err == 0)
+                       err = i915_vma_move_to_active(batch, request[id], 0);
                i915_vma_unlock(batch);
                GEM_BUG_ON(err);
 
index 41acf209ffdbdb9aca77da77275a64a41a454793..11f04ad48e6889175678290c47105c3350c927d6 100644 (file)
@@ -78,7 +78,10 @@ static int move_to_active(struct i915_vma *vma,
        int err;
 
        i915_vma_lock(vma);
-       err = i915_vma_move_to_active(vma, rq, flags);
+       err = i915_request_await_object(rq, vma->obj,
+                                       flags & EXEC_OBJECT_WRITE);
+       if (err == 0)
+               err = i915_vma_move_to_active(vma, rq, flags);
        i915_vma_unlock(vma);
 
        return err;