drm/i915: Provide a fastpath for waiting on vma bindings
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / i915_vma.c
index bc64f77..cd12047 100644 (file)
@@ -1167,6 +1167,12 @@ void i915_vma_revoke_mmap(struct i915_vma *vma)
                list_del(&vma->obj->userfault_link);
 }
 
+static int
+__i915_request_await_bind(struct i915_request *rq, struct i915_vma *vma)
+{
+       return __i915_request_await_exclusive(rq, &vma->active);
+}
+
 int __i915_vma_move_to_active(struct i915_vma *vma, struct i915_request *rq)
 {
        int err;
@@ -1174,8 +1180,7 @@ int __i915_vma_move_to_active(struct i915_vma *vma, struct i915_request *rq)
        GEM_BUG_ON(!i915_vma_is_pinned(vma));
 
        /* Wait for the vma to be bound before we start! */
-       err = i915_request_await_active(rq, &vma->active,
-                                       I915_ACTIVE_AWAIT_EXCL);
+       err = __i915_request_await_bind(rq, vma);
        if (err)
                return err;