[igt-dev] [PATCH 2/3] xe_exec_threads: Use DRM_XE_VM_CREATE_COMPUTE_MODE when creating a compute VM

Niranjana Vishwanathapura niranjana.vishwanathapura at intel.com
Mon Sep 18 04:56:00 UTC 2023


On Fri, Sep 15, 2023 at 04:33:03PM -0700, Matthew Brost wrote:
>XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE was used creating a compute VM.
>This just happened to work as it is same value as
>DRM_XE_VM_CREATE_COMPUTE_MODE. Fix this and use correct flag,
>DRM_XE_VM_CREATE_COMPUTE_MODE.
>
>Signed-off-by: Matthew Brost <matthew.brost at intel.com>

Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>

>---
> tests/intel/xe_exec_threads.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/tests/intel/xe_exec_threads.c b/tests/intel/xe_exec_threads.c
>index ae4da0568a..34bcb3d4d5 100644
>--- a/tests/intel/xe_exec_threads.c
>+++ b/tests/intel/xe_exec_threads.c
>@@ -286,7 +286,7 @@ test_compute_mode(int fd, uint32_t vm, uint64_t addr, uint64_t userptr,
>
> 	if (!vm) {
> 		vm = xe_vm_create(fd, DRM_XE_VM_CREATE_ASYNC_BIND_OPS |
>-				  XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE, 0);
>+				  DRM_XE_VM_CREATE_COMPUTE_MODE, 0);
> 		owns_vm = true;
> 	}
>
>@@ -1075,7 +1075,7 @@ static void threads(int fd, int flags)
> 					      to_user_pointer(&ext));
> 		vm_compute_mode = xe_vm_create(fd,
> 					       DRM_XE_VM_CREATE_ASYNC_BIND_OPS |
>-					       XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE,
>+					       DRM_XE_VM_CREATE_COMPUTE_MODE,
> 					       0);
>
> 		vm_err_thread.capture = &capture;
>-- 
>2.34.1
>


More information about the igt-dev mailing list