[PATCH i-g-t 2/2] tests/xe_spin_batch: Sync after vm_bind_async

Matthew Brost matthew.brost at intel.com
Sat Feb 24 03:41:01 UTC 2024


On Fri, Feb 23, 2024 at 03:04:07PM -0800, Jonathan Cavitt wrote:
> Ensure that vm bind completes before the call to xe_exec occurs later in
> the preempter.
> 
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
> Suggested-by: Matthew Brost <matthew.brost at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  tests/intel/xe_spin_batch.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/intel/xe_spin_batch.c b/tests/intel/xe_spin_batch.c
> index faf569baf8..3bdc1e5e20 100644
> --- a/tests/intel/xe_spin_batch.c
> +++ b/tests/intel/xe_spin_batch.c
> @@ -202,6 +202,9 @@ static void preempter(int fd, struct drm_xe_engine_class_instance *hwe)
>  	data = xe_bo_map(fd, bo, bo_size);
>  	store_dword_batch(data, addr, value);
>  
> +	igt_assert(syncobj_wait(fd, &syncobj, 1, INT64_MAX, 0, NULL));
> +	syncobj_reset(fd, &syncobj, 1);
> +
>  	exec_queue = xe_exec_queue_create(fd, vm, hwe, to_user_pointer(&ext));
>  	exec.exec_queue_id = exec_queue;
>  	exec.address = data->addr;
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list