aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brost <[email protected]>2023-07-10 07:41:21 -0700
committerRodrigo Vivi <[email protected]>2023-12-21 11:35:17 -0500
commit54c9fb7e64fd3f0da1570e3d1c5446605e83210e (patch)
treed37f8c0e47ac6bd0c8f322791f8a6df6009d3450
parent55d8ac9631aaa8ae3794341c52009f635a0d3188 (diff)
drm/xe: Use internal VM flags in xe_vm_create
xe_vm_create used the IOCTL create flags in a few places rather than the internal VM flags and this just happened to work as these values matched. This is risky (and incorrect) as the internal flag values are free to change. Fix this and use the internal VM flag values. Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index bd143acbde0e..a9cf62f7aac6 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -1253,13 +1253,13 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
vm->batch_invalidate_tlb = true;
}
- if (flags & DRM_XE_VM_CREATE_COMPUTE_MODE) {
+ if (flags & XE_VM_FLAG_COMPUTE_MODE) {
INIT_WORK(&vm->preempt.rebind_work, preempt_rebind_work_func);
vm->flags |= XE_VM_FLAG_COMPUTE_MODE;
vm->batch_invalidate_tlb = false;
}
- if (flags & DRM_XE_VM_CREATE_ASYNC_BIND_OPS) {
+ if (flags & XE_VM_FLAG_ASYNC_BIND_OPS) {
vm->async_ops.fence.context = dma_fence_context_alloc(1);
vm->flags |= XE_VM_FLAG_ASYNC_BIND_OPS;
}