[PATCH 12/14] drm/i915: Assert object lock is held when unbinding

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Jul 27 09:10:01 UTC 2021


Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_vma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index c6d1512634d5..907de1bc2294 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -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