[PATCH] xe_exec_reset: Wait for spin batches to start

Cavitt, Jonathan jonathan.cavitt at intel.com
Tue Jul 9 21:03:32 UTC 2024


-----Original Message-----
From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Matthew Brost
Sent: Tuesday, July 9, 2024 11:07 AM
To: igt-dev at lists.freedesktop.org
Cc: Yang, Fei <fei.yang at intel.com>
Subject: [PATCH] xe_exec_reset: Wait for spin batches to start
> 
> Ensure spin batches are running on hardware before triggering any type
> of reset.
> 
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>

LGTM.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
-Jonathan Cavitt

> ---
>  tests/intel/xe_exec_reset.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
> index 817b82cdef..dcb22f275f 100644
> --- a/tests/intel/xe_exec_reset.c
> +++ b/tests/intel/xe_exec_reset.c
> @@ -236,6 +236,10 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
>  		if (e != i)
>  			 syncobj_reset(fd, &syncobjs[e], 1);
>  		xe_exec(fd, &exec);
> +
> +		if (i < bad_batches && !(flags & CAT_ERROR))
> +			xe_spin_wait_started(&data[i].spin);
> +
>  	}
>  
>  	if (flags & GT_RESET)
> @@ -380,6 +384,9 @@ test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
>  		if (e != i)
>  			 syncobj_reset(fd, &syncobjs[e], 1);
>  		xe_exec(fd, &exec);
> +
> +		if (!i && !(flags & CAT_ERROR))
> +			xe_spin_wait_started(&data[i].spin);
>  	}
>  
>  	if (flags & GT_RESET)
> -- 
> 2.34.1
> 
> 


More information about the igt-dev mailing list