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>
This commit is contained in:
Thomas Hellström
2023-09-08 11:17:12 +02:00
committed by Rodrigo Vivi
parent 08a4f00e62
commit d00e9cc28e
8 changed files with 41 additions and 50 deletions

View File

@@ -396,14 +396,13 @@ static int migrate_test_run_device(struct xe_device *xe)
for_each_tile(tile, xe, id) {
struct xe_migrate *m = tile->migrate;
struct ww_acquire_ctx ww;
kunit_info(test, "Testing tile id %d.\n", id);
xe_vm_lock(m->q->vm, &ww, 0, true);
xe_vm_lock(m->q->vm, true);
xe_device_mem_access_get(xe);
xe_migrate_sanity_test(m, test);
xe_device_mem_access_put(xe);
xe_vm_unlock(m->q->vm, &ww);
xe_vm_unlock(m->q->vm);
}
return 0;