[igt-dev] [PATCH i-g-t] lib/xe/xe_spin: Add support to create non-preemptive spin batch

Ch, Sai Gowtham sai.gowtham.ch at intel.com
Tue Jun 27 06:48:26 UTC 2023


Looks good to me.
Reviewed-by: Sai Gowtham Ch <sai.gowtham.ch at intel.com>

> -----Original Message-----
> From: Kumar, Janga Rahul <janga.rahul.kumar at intel.com>
> Sent: Tuesday, June 27, 2023 11:42 AM
> To: igt-dev at lists.freedesktop.org; Gandi, Ramadevi
> <ramadevi.gandi at intel.com>; Kumar, Janga Rahul
> <janga.rahul.kumar at intel.com>; Ch, Sai Gowtham
> <sai.gowtham.ch at intel.com>
> Subject: [PATCH i-g-t] lib/xe/xe_spin: Add support to create non-preemptive spin
> batch
> 
> From: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> 
> Add support to create non-preemptive batch during spinner creation.
> 
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> ---
>  lib/xe/xe_spin.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/xe/xe_spin.c b/lib/xe/xe_spin.c index 9f511e14..529b7684 100644
> --- a/lib/xe/xe_spin.c
> +++ b/lib/xe/xe_spin.c
> @@ -131,7 +131,11 @@ xe_spin_create(int fd, const struct igt_spin_factory
> *opt)
>  	addr = intel_allocator_alloc_with_strategy(ahnd, spin->handle, bo_size,
> 0, ALLOC_STRATEGY_LOW_TO_HIGH);
>  	xe_vm_bind_sync(fd, spin->vm, spin->handle, 0, addr, bo_size);
> 
> -	xe_spin_init(xe_spin, addr, true);
> +	if (!(opt->flags & IGT_SPIN_NO_PREEMPTION))
> +		xe_spin_init(xe_spin, addr, true);
> +	else
> +		xe_spin_init(xe_spin, addr, false);
> +
>  	exec.engine_id = spin->engine;
>  	exec.address = addr;
>  	sync.handle = spin->syncobj;
> --
> 2.25.1



More information about the igt-dev mailing list