Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: janusz.krzysztofik@linux.intel.com, lukasz.laguna@intel.com,
	matthew.brost@intel.com, michal.wajdeczko@intel.com,
	stuart.summers@intel.com,
	Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Subject: [PATCH i-g-t 1/2] lib/igt_dummyload: Adapt helpers for Xe
Date: Thu, 11 Jun 2026 16:24:37 +0200	[thread overview]
Message-ID: <20260611142438.260647-2-marcin.bernatowicz@linux.intel.com> (raw)
In-Reply-To: <20260611142438.260647-1-marcin.bernatowicz@linux.intel.com>

Adjust dummyload helpers igt_spin_has_started and
igt_spin_busywait_until_started to work correctly
with Xe-backed runs.

Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
---
 lib/igt_dummyload.c | 14 ++++++++++++++
 lib/igt_dummyload.h | 11 ++---------
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index cc0b4ac3b..b5ca8f643 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -670,6 +670,20 @@ static void __igt_spin_free(int fd, igt_spin_t *spin)
 	free(spin);
 }
 
+bool igt_spin_has_started(igt_spin_t *spin)
+{
+	if (spin->driver == INTEL_DRIVER_XE)
+		return xe_spin_started(spin->xe_spin);
+
+	return READ_ONCE(spin->poll[SPIN_POLL_START_IDX]);
+}
+
+void igt_spin_busywait_until_started(igt_spin_t *spin)
+{
+	while (!igt_spin_has_started(spin))
+		;
+}
+
 /**
  * igt_spin_free:
  * @fd: open i915 drm file descriptor
diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
index b771011af..e96f72652 100644
--- a/lib/igt_dummyload.h
+++ b/lib/igt_dummyload.h
@@ -128,16 +128,9 @@ static inline bool igt_spin_has_poll(const igt_spin_t *spin)
 	return spin->poll;
 }
 
-static inline bool igt_spin_has_started(igt_spin_t *spin)
-{
-	return READ_ONCE(spin->poll[SPIN_POLL_START_IDX]);
-}
+bool igt_spin_has_started(igt_spin_t *spin);
+void igt_spin_busywait_until_started(igt_spin_t *spin);
 
-static inline void igt_spin_busywait_until_started(igt_spin_t *spin)
-{
-	while (!igt_spin_has_started(spin))
-		;
-}
 
 void igt_terminate_spins(void);
 void igt_unshare_spins(void);
-- 
2.43.0


  reply	other threads:[~2026-06-11 14:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 14:24 [PATCH i-g-t 0/2] Extend core_hotunplug coverage with open-handles unbind/rebind scenario Marcin Bernatowicz
2026-06-11 14:24 ` Marcin Bernatowicz [this message]
2026-06-11 14:24 ` [PATCH i-g-t 2/2] tests/core_hotunplug: Add exec-fork-unbind-rebind subtest Marcin Bernatowicz
2026-06-11 15:26   ` Kamil Konieczny
2026-06-12  7:13     ` Bernatowicz, Marcin
2026-06-11 18:45 ` ✓ i915.CI.BAT: success for Extend core_hotunplug coverage with open-handles unbind/rebind scenario Patchwork
2026-06-11 19:14 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-12  9:33 ` ✗ Xe.CI.FULL: failure " 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=20260611142438.260647-2-marcin.bernatowicz@linux.intel.com \
    --to=marcin.bernatowicz@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=janusz.krzysztofik@linux.intel.com \
    --cc=lukasz.laguna@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=michal.wajdeczko@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