summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_bo.c
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2023-09-08 12:17:12 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:41:07 +0300
commitd00e9cc28e1e42108618e7a146969a26679170a2 (patch)
tree8a2c8a9e74ab0ad9dec8308f164e8e624ef94f6a /drivers/gpu/drm/xe/xe_bo.c
parent08a4f00e62bc96eabf7d876933f84600a3dc5e69 (diff)
downloadlinux-d00e9cc28e1e42108618e7a146969a26679170a2.tar.xz
drm/xe/vm: Simplify and document xe_vm_lock()
The xe_vm_lock() function was unnecessarily using ttm_eu_reserve_buffers(). Simplify and document the interface. v4: - Improve on xe_vm_lock() documentation (Matthew Brost) v5: - Rebase conflict. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-3-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo.c')
-rw-r--r--drivers/gpu/drm/xe/xe_bo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index ee8e3c940cf4..c33a20420022 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1759,7 +1759,6 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
struct xe_device *xe = to_xe_device(dev);
struct xe_file *xef = to_xe_file(file);
struct drm_xe_gem_create *args = data;
- struct ww_acquire_ctx ww;
struct xe_vm *vm = NULL;
struct xe_bo *bo;
unsigned int bo_flags = XE_BO_CREATE_USER_BIT;
@@ -1812,7 +1811,7 @@ int xe_gem_create_ioctl(struct drm_device *dev, void *data,
vm = xe_vm_lookup(xef, args->vm_id);
if (XE_IOCTL_DBG(xe, !vm))
return -ENOENT;
- err = xe_vm_lock(vm, &ww, 0, true);
+ err = xe_vm_lock(vm, true);
if (err) {
xe_vm_put(vm);
return err;
@@ -1840,7 +1839,7 @@ out_put:
xe_bo_put(bo);
out_vm:
if (vm) {
- xe_vm_unlock(vm, &ww);
+ xe_vm_unlock(vm);
xe_vm_put(vm);
}
return err;