[RFC PATCH 8/8] drm/xe: Enable ULLS migration jobs when opening LR VM
Matthew Brost
matthew.brost at intel.com
Mon Aug 12 02:47:17 UTC 2024
Call xe_migration_lr_vm_get upon opening LR VM and
xe_migration_lr_vm_put upon close.
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_vm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index dab2a3b2e17f..a1b19ec796a1 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -1508,6 +1508,11 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
if (number_tiles > 1)
vm->composite_fence_ctx = dma_fence_context_alloc(1);
+ if (flags & XE_VM_FLAG_LR_MODE) {
+ for_each_tile(tile, xe, id)
+ xe_migrate_lr_vm_get(tile->migrate);
+ }
+
mutex_lock(&xe->usm.lock);
if (flags & XE_VM_FLAG_FAULT_MODE)
xe->usm.num_vm_in_fault_mode++;
@@ -1627,6 +1632,11 @@ void xe_vm_close_and_put(struct xe_vm *vm)
up_write(&vm->lock);
+ if (vm->flags & XE_VM_FLAG_LR_MODE) {
+ for_each_tile(tile, xe, id)
+ xe_migrate_lr_vm_put(tile->migrate);
+ }
+
mutex_lock(&xe->usm.lock);
if (vm->flags & XE_VM_FLAG_FAULT_MODE)
xe->usm.num_vm_in_fault_mode--;
--
2.34.1
More information about the Intel-xe
mailing list