[PATCH] xe_exec_reset: Wait for spin batches to start

Yang, Fei fei.yang at intel.com
Wed Jul 10 00:45:26 UTC 2024


> Ensure spin batches are running on hardware before triggering any type of reset.
>
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>

Reviewed-by: Fei Yang <fei.yang at intel.com>

> ---
>  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