summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h')
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h b/drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h
index 642cdb559f17..ee6e4c52e80e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h
@@ -26,6 +26,17 @@ static inline void i915_gem_vm_bind_unlock(struct i915_address_space *vm)
mutex_unlock(&vm->vm_bind_lock);
}
+static inline int i915_gem_vm_priv_lock(struct i915_address_space *vm,
+ struct i915_gem_ww_ctx *ww)
+{
+ return i915_gem_object_lock(vm->root_obj, ww);
+}
+
+static inline void i915_gem_vm_priv_unlock(struct i915_address_space *vm)
+{
+ i915_gem_object_unlock(vm->root_obj);
+}
+
struct i915_vma *
i915_gem_vm_bind_lookup_vma(struct i915_address_space *vm, u64 va);
void i915_gem_vm_bind_remove(struct i915_vma *vma, bool release_obj);