Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/device_reset: Require a PCI device
@ 2024-08-20 14:43 Rob Clark
  2024-08-20 15:39 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Rob Clark @ 2024-08-20 14:43 UTC (permalink / raw)
  To: igt-dev; +Cc: Rob Clark

From: Rob Clark <robdclark@chromium.org>

Too much baked in assumptions that the drm device is a PCI device.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 tests/device_reset.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/device_reset.c b/tests/device_reset.c
index 8ed3ef5220fc..40681931c251 100644
--- a/tests/device_reset.c
+++ b/tests/device_reset.c
@@ -200,6 +200,17 @@ static void init_device_fds(struct device_fds *dev)
 		igt_require_gem(dev->fds.dev);
 
 	igt_assert(device_sysfs_path(dev->fds.dev, dev_path));
+
+	/*
+	 * Platform devices do not support reset at the bus level, as
+	 * there is no actual bus.
+	 *
+	 * For other bus types, other than PCI, whether and how bus
+	 * level reset is supported is left as an exercise for the
+	 * reader.
+	 */
+	igt_require(strstr(dev_path, "/sys/devices/pci") == dev_path);
+
 	addr_pos = strrchr(dev_path, '/');
 	igt_assert(addr_pos);
 	igt_assert_eq(sizeof(dev->dev_bus_addr) - 1,
-- 
2.46.0


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

end of thread, other threads:[~2024-08-21  1:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20 14:43 [PATCH] tests/device_reset: Require a PCI device Rob Clark
2024-08-20 15:39 ` ✓ CI.xeBAT: success for " Patchwork
2024-08-20 15:49 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-20 16:07 ` [PATCH] " Kamil Konieczny
2024-08-20 18:52 ` ✗ CI.xeFULL: failure for " Patchwork
2024-08-21  1:12 ` ✗ Fi.CI.IGT: " Patchwork

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