public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/2] tests/device_reset: unload audio before descriptor closure
@ 2026-03-15  0:38 Michał Grzelak
  2026-03-15  0:38 ` [PATCH i-g-t 2/2] tests/device_reset: unload audio on xe as well Michał Grzelak
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Michał Grzelak @ 2026-03-15  0:38 UTC (permalink / raw)
  To: igt-dev; +Cc: Michał Grzelak

Currently check for audio unloading is done after driver's file
descriptor has been closed. This renders is_i915_device() useless since
check bases on the descriptor passed. Move the check before closing the
descriptor.

Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
 tests/device_reset.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/device_reset.c b/tests/device_reset.c
index 62b295a06e..b931dff7a0 100644
--- a/tests/device_reset.c
+++ b/tests/device_reset.c
@@ -345,9 +345,6 @@ static bool has_cold_reset(int slot_dir, const char **reason)
 /* Unbind the driver from the device */
 static void driver_unbind(struct device_fds *dev)
 {
-	if (is_i915_device(dev->fds.dev))
-		igt_audio_driver_unload(&dev->snd_driver);
-
 	igt_debug("unbind the driver from the device\n");
 	igt_assert(igt_sysfs_set(dev->fds.drv_dir, "unbind",
 		   dev->dev_bus_addr));
@@ -429,6 +426,10 @@ static void set_device_filter(const char* dev_path)
 
 static void unbind_reset_rebind(struct device_fds *dev, enum reset type)
 {
+	if (is_i915_device(dev->fds.dev)) {
+		igt_audio_driver_unload(&dev->snd_driver);
+	}
+
 	igt_debug("close the device\n");
 	close_if_opened(&dev->fds.dev);
 
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-24 15:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-15  0:38 [PATCH i-g-t 1/2] tests/device_reset: unload audio before descriptor closure Michał Grzelak
2026-03-15  0:38 ` [PATCH i-g-t 2/2] tests/device_reset: unload audio on xe as well Michał Grzelak
2026-03-23 14:02   ` Saarinen, Jani
2026-03-23 14:06     ` Vehmanen, Kai
2026-03-24 15:10       ` Michał Grzelak
2026-03-15  1:32 ` ✓ Xe.CI.BAT: success for series starting with [i-g-t,1/2] tests/device_reset: unload audio before descriptor closure Patchwork
2026-03-15  1:35 ` ✓ i915.CI.BAT: " Patchwork
2026-03-15  6:10 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-15 10:27 ` ✗ i915.CI.Full: " Patchwork
2026-03-23 14:02 ` [PATCH i-g-t 1/2] " Saarinen, Jani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox