[Intel-gfx] [PATCH i-g-t 1/2] tests/gem_close_race: Use drm_open_driver helper

Daniel Vetter daniel.vetter at ffwll.ch
Fri Jun 17 14:05:38 UTC 2016


Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 tests/gem_close_race.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/gem_close_race.c b/tests/gem_close_race.c
index 94fb905213a2..6458505d6500 100644
--- a/tests/gem_close_race.c
+++ b/tests/gem_close_race.c
@@ -214,10 +214,8 @@ igt_main
 	igt_fixture {
 		int fd;
 
-		sprintf(device, "/dev/dri/card%d", drm_get_card());
-		fd = open(device, O_RDWR);
+		fd = drm_open_driver(DRIVER_INTEL);
 
-		igt_assert(fd != -1);
 		devid = intel_get_drm_devid(fd);
 		has_64bit_relocations = intel_gen(devid) >= 8;
 
-- 
2.8.1



More information about the Intel-gfx mailing list