gem_concurrent_blit: Purge the child bufmgr's cache
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c
index 15e2aac..6947774 100644
--- a/tests/gem_concurrent_blit.c
+++ b/tests/gem_concurrent_blit.c
@@ -296,6 +296,8 @@
drm_intel_bo_unreference(dst[i]);
}
drm_intel_bo_unreference(dummy);
+ intel_batchbuffer_free(batch);
+ drm_intel_bufmgr_destroy(bufmgr);
exit(0);
}
}
@@ -337,6 +339,10 @@
drm_intel_bo *src[MAX_NUM_BUFFERS], *dst[MAX_NUM_BUFFERS], *dummy = NULL;
igt_fixture {
+ bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
+ drm_intel_bufmgr_gem_enable_reuse(bufmgr);
+ batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
+
for (int i = 0; i < num_buffers; i++) {
src[i] = mode->create_bo(bufmgr, i, width, height);
dst[i] = mode->create_bo(bufmgr, ~i, width, height);
@@ -353,6 +359,8 @@
drm_intel_bo_unreference(dst[i]);
}
drm_intel_bo_unreference(dummy);
+ intel_batchbuffer_free(batch);
+ drm_intel_bufmgr_destroy(bufmgr);
}
run_basic_modes(mode, src, dst, dummy, "-forked", run_forked);
@@ -372,10 +380,6 @@
max = gem_aperture_size (fd) / (1024 * 1024) / 2;
if (num_buffers > max)
num_buffers = max;
-
- bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
- drm_intel_bufmgr_gem_enable_reuse(bufmgr);
- batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
}
for (i = 0; i < ARRAY_SIZE(access_modes); i++)