[Intel-gfx] [PATCH i-g-t 2/2] i915/gem_ctx_thrash: Reopen the same device

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 5 00:21:24 UTC 2020


Use gem_reopen_driver() to always reopen the same device without relying
on the filtering in drm_open_driver().

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/i915/gem_ctx_thrash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_ctx_thrash.c b/tests/i915/gem_ctx_thrash.c
index d32619d5d..d9ddd6689 100644
--- a/tests/i915/gem_ctx_thrash.c
+++ b/tests/i915/gem_ctx_thrash.c
@@ -250,7 +250,7 @@ static void processes(void)
 	fds = malloc(num_ctx * sizeof(int));
 	igt_assert(fds);
 	for (unsigned n = 0; n < num_ctx; n++) {
-		fds[n] = drm_open_driver(DRIVER_INTEL);
+		fds[n] = gem_reopen_driver(fd);
 		if (fds[n] == -1) {
 			int err = errno;
 			for (unsigned i = n; i--; )
-- 
2.29.2



More information about the Intel-gfx mailing list