[PATCH i-g-t] tests/device_reset: Give PCI transactions more time to complete

Janusz Krzysztofik janusz.krzysztofik at linux.intel.com
Wed Jan 4 13:32:42 UTC 2023


On DG1 platforms, after unbinding the i915 driver, we observed timeouts
while PCI subsystem was waiting for PCI pending transactions to complete
before it proceded with FLR.  As a consequence, subsequent driver rebind
operation was failing.

Wait a few seconds after driver unbind before proceding with FLR on those
platforms.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
 tests/device_reset.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/device_reset.c b/tests/device_reset.c
index 39ee8dca9f..9a80cd752e 100644
--- a/tests/device_reset.c
+++ b/tests/device_reset.c
@@ -397,6 +397,10 @@ static void unbind_reset_rebind(struct device_fds *dev, enum reset type)
 
 	driver_unbind(dev);
 
+	/* On DG1 give PCI transactions a chance to complete before FLR */
+	if (type == FLR_RESET && IS_DG1(intel_get_drm_devid(dev->fds.dev)))
+		sleep(10);
+
 	initiate_device_reset(dev, type);
 
 	driver_bind(dev);
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list