[PATCH 12/16] drm/i915: Assert object lock is held when unbinding
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Tue Jul 27 13:46:42 UTC 2021
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
drivers/gpu/drm/i915/i915_vma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index ad3ae6a89a18..49691d4d375d 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -347,7 +347,7 @@ int i915_vma_wait_for_bind(struct i915_vma *vma)
struct dma_fence *fence = i915_gem_object_get_moving_fence(vma->obj);
int err = 0;
- assert_vma_held(vma);
+ assert_object_held_shared(vma->obj);
if (fence) {
err = dma_fence_wait(fence, true);
@@ -1525,8 +1525,6 @@ __i915_request_await_bind(struct i915_request *rq, struct i915_vma *vma)
static int __i915_vma_move_to_active(struct i915_vma *vma, struct i915_request *rq)
{
- int err;
-
GEM_BUG_ON(!i915_vma_is_pinned(vma));
/* Wait for the vma to be bound before we start! */
@@ -1663,6 +1661,8 @@ int i915_vma_unbind(struct i915_vma *vma)
intel_wakeref_t wakeref = 0;
int err;
+ assert_vma_held(vma);
+
/* Optimistic wait before taking the mutex */
err = i915_vma_sync(vma);
if (err)
--
2.31.0
More information about the Intel-gfx-trybot
mailing list