From: Xin Wang <x.wang@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: stuart.summers@intel.com, Xin Wang <x.wang@intel.com>,
Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Subject: [PATCH] tests/intel/xe_exec_multi_queue: enable preempt flag for Q0
Date: Wed, 14 Jan 2026 06:32:36 +0000 [thread overview]
Message-ID: <20260114063236.831396-1-x.wang@intel.com> (raw)
The spinner preempt flag enables queue preemption and multi-queue
switching. Always enable premept flag while inserting multi-queue
switch point. We need multi-queue switch point only in Q0 which
acts as a gating queue until all other queues with different
priorities are submitted to hardware.
Suggested-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Xin Wang <x.wang@intel.com>
---
lib/xe/xe_spin.c | 2 +-
tests/intel/xe_exec_multi_queue.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/xe/xe_spin.c b/lib/xe/xe_spin.c
index 4dc110c22..0bc06aec3 100644
--- a/lib/xe/xe_spin.c
+++ b/lib/xe/xe_spin.c
@@ -181,7 +181,7 @@ void xe_spin_init(struct xe_spin *spin, struct xe_spin_opts *opts)
*/
if (opts->multi_queue_switch) {
uint64_t wait_addr = opts->addr + offsetof(struct xe_spin, wait_cond);
-
+ igt_assert_f(opts->preempt, "preempt field is required to enable multi-queue switching\n");
spin->batch[b++] = MI_SEMAPHORE_WAIT_CMD |
MI_SEMAPHORE_POLL |
MI_SEMAPHORE_QUEUE_SWITCH_MODE |
diff --git a/tests/intel/xe_exec_multi_queue.c b/tests/intel/xe_exec_multi_queue.c
index 6bc6f9f63..32a84ef6b 100644
--- a/tests/intel/xe_exec_multi_queue.c
+++ b/tests/intel/xe_exec_multi_queue.c
@@ -453,8 +453,8 @@ __test_priority(int fd, struct drm_xe_engine_class_instance *eci,
for (i = 0; i < num_queues; i++) {
uint64_t spin_addr = addr + i * sizeof(struct xe_spin);
-
- xe_spin_init_opts(spin[i], .addr = spin_addr, .multi_queue_switch = true);
+ /* Insert multi-queue switch point in Q0 to validate priority based queue switching */
+ xe_spin_init_opts(spin[i], .addr = spin_addr, .multi_queue_switch = !i, .preempt = !i);
sync.addr = spin_addr + (char *)&spin[i]->exec_sync - (char *)spin[i];
exec.exec_queue_id = exec_queues[i];
exec.address = spin_addr;
--
2.43.0
next reply other threads:[~2026-01-14 6:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 6:32 Xin Wang [this message]
2026-01-14 6:39 ` [PATCH] tests/intel/xe_exec_multi_queue: enable preempt flag for Q0 Niranjana Vishwanathapura
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260114063236.831396-1-x.wang@intel.com \
--to=x.wang@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=niranjana.vishwanathapura@intel.com \
--cc=stuart.summers@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox