[igt-dev] [PATCH i-g-t] lib/xe/xe_spin: Add support to create non-preemptive spin batch
janga.rahul.kumar at intel.com
janga.rahul.kumar at intel.com
Tue Jun 27 06:11:39 UTC 2023
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