summaryrefslogtreecommitdiff
path: root/tests/i915
diff options
context:
space:
mode:
Diffstat (limited to 'tests/i915')
-rw-r--r--tests/i915/gem_shrink.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/i915/gem_shrink.c b/tests/i915/gem_shrink.c
index 73b6be72..f71a1fcb 100644
--- a/tests/i915/gem_shrink.c
+++ b/tests/i915/gem_shrink.c
@@ -403,7 +403,11 @@ igt_main
unsigned int engine;
int fd;
- /* Spawn enough processes to use all memory, but each only
+ fd = drm_open_driver(DRIVER_INTEL);
+ igt_require_gem(fd);
+
+ /*
+ * Spawn enough processes to use all memory, but each only
* uses half the available mappable aperture ~128MiB.
* Individually the processes would be ok, but en masse
* we expect the shrinker to start purging objects,
@@ -418,9 +422,6 @@ igt_main
intel_require_memory(num_processes, alloc_size,
CHECK_SWAP | CHECK_RAM);
- fd = drm_open_driver(DRIVER_INTEL);
- igt_require_gem(fd);
-
nengine = 0;
for_each_engine(fd, engine)
engines[nengine++] = engine;