Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: igt-dev@lists.freedesktop.org, shekhar.chauhan@intel.com
Cc: harish.chegondi@intel.com
Subject: [PATCH v2 8/8] tests/intel/xe_oa: Add an all OA units variant to the unbind/rebind test
Date: Tue,  3 Nov 2026 16:55:14 -0800	[thread overview]
Message-ID: <20261104005505.3232485-18-umesh.nerlige.ramappa@intel.com> (raw)
In-Reply-To: <20261104005505.3232485-10-umesh.nerlige.ramappa@intel.com>

Open a stream with a mmapped OA buffer on every OA unit, so that unbind
quiesces streams on all GTs and OA units at once, and run all checks on
each of them.

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
 tests/intel/xe_oa.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index ffc1971cb361..4eb0b13f00b1 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -2867,6 +2867,7 @@ static bool mem_is_zero(const void *vaddr, size_t len)
 #define UNBIND_CLOSE_BEFORE_REBIND	(1 << 0)
 #define UNBIND_STREAM_DISABLED		(1 << 1)
 #define UNBIND_EXEC_QUEUE		(1 << 2)
+#define UNBIND_ALL_UNITS		(1 << 3)
 
 #define UNBIND_MAX_STREAMS	16
 
@@ -3152,6 +3153,7 @@ static void test_unbind_rebind(const struct drm_xe_oa_unit *oau0, unsigned int f
 	struct unbind_stream *primary = &streams[0];
 	const struct drm_xe_engine_class_instance *hwe = NULL;
 	bool disabled = flags & UNBIND_STREAM_DISABLED;
+	const struct drm_xe_oa_unit *oau;
 	uint32_t vm, exec_q = 0;
 	int ret, i;
 
@@ -3166,6 +3168,14 @@ static void test_unbind_rebind(const struct drm_xe_oa_unit *oau0, unsigned int f
 
 	unbind_num_streams = 0;
 	unbind_stream_open(&streams[unbind_num_streams++], oau0, flags, exec_q, hwe);
+	if (flags & UNBIND_ALL_UNITS) {
+		for_each_oa_unit(oau) {
+			if (oau->oa_unit_id == oau0->oa_unit_id)
+				continue;
+			igt_assert_lt(unbind_num_streams, UNBIND_MAX_STREAMS);
+			unbind_stream_open(&streams[unbind_num_streams++], oau, flags, 0, NULL);
+		}
+	}
 	igt_debug("Opened %d OA stream(s)\n", unbind_num_streams);
 
 	/*
@@ -5713,6 +5723,7 @@ int igt_main_args("b:td", long_options, help_str, opt_handler, NULL)
 			{ "open", 0 },
 			{ "disabled", UNBIND_STREAM_DISABLED },
 			{ "exec-queue", UNBIND_EXEC_QUEUE },
+			{ "all-units", UNBIND_ALL_UNITS },
 		};
 
 		for (int i = 0; i < ARRAY_SIZE(unbind_variants); i++) {
-- 
2.55.0


  parent reply	other threads:[~2026-11-04  1:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  0:55 [PATCH v2 0/8] Test unbinding PCI device while OA stream is open Umesh Nerlige Ramappa
2026-11-04  0:55 ` [PATCH v2 1/8] tests/intel/xe_oa: Move device setup and teardown into helpers Umesh Nerlige Ramappa
2026-11-04  0:55 ` [PATCH v2 2/8] tests/intel/xe_oa: Add unbind/rebind test with an open OA stream Umesh Nerlige Ramappa
2026-11-26  7:09   ` Shekhar Chauhan
2026-11-04  0:55 ` [PATCH v2 3/8] tests/intel/xe_oa: Check that a removed device can't open OA streams Umesh Nerlige Ramappa
2026-11-26  7:10   ` Shekhar Chauhan
2026-11-04  0:55 ` [PATCH v2 4/8] tests/intel/xe_oa: Check OA buffer mmaps across unbind Umesh Nerlige Ramappa
2026-11-26  7:10   ` Shekhar Chauhan
2026-11-04  0:55 ` [PATCH v2 5/8] tests/intel/xe_oa: Check vm_ops->access on " Umesh Nerlige Ramappa
2026-11-26  5:55   ` Shekhar Chauhan
2026-11-04  0:55 ` [PATCH v2 6/8] tests/intel/xe_oa: Check that blocked OA stream waiters are woken up on unbind Umesh Nerlige Ramappa
2026-11-26  6:42   ` Shekhar Chauhan
2026-11-04  0:55 ` [PATCH v2 7/8] tests/intel/xe_oa: Add an exec queue variant to the unbind/rebind test Umesh Nerlige Ramappa
2026-11-26  7:11   ` Shekhar Chauhan
2026-11-04  0:55 ` Umesh Nerlige Ramappa [this message]
2026-11-26  7:06   ` [PATCH v2 8/8] tests/intel/xe_oa: Add an all OA units " Shekhar Chauhan
2026-11-04  2:19 ` ✓ Xe.CI.BAT: success for Test unbinding PCI device while OA stream is open (rev2) Patchwork
2026-11-04  2:39 ` ✗ i915.CI.BAT: failure " Patchwork
2026-11-04 17:42 ` ✗ Xe.CI.FULL: " Patchwork

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=20261104005505.3232485-18-umesh.nerlige.ramappa@intel.com \
    --to=umesh.nerlige.ramappa@intel.com \
    --cc=harish.chegondi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=shekhar.chauhan@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