From 46ec33e847eef3292a2f3b4f4a037cfb161cfeee Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 20 Oct 2015 14:40:50 +0100 Subject: igt/gem_concurrent_all: Add snoop concurrency tests Another caching mode worth exploring for bad flushing behaviour. Signed-off-by: Chris Wilson --- tests/gem_concurrent_all.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c index 80a8697e..1d2d7872 100644 --- a/tests/gem_concurrent_all.c +++ b/tests/gem_concurrent_all.c @@ -106,6 +106,20 @@ unmapped_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) return bo; } +static drm_intel_bo * +snoop_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) +{ + drm_intel_bo *bo; + + igt_skip_on(gem_has_llc(fd)); + + bo = unmapped_create_bo(bufmgr, width, height); + gem_set_caching(fd, bo->handle, I915_CACHING_CACHED); + drm_intel_bo_disable_reuse(bo); + + return bo; +} + static void gtt_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height) { @@ -321,6 +335,13 @@ const struct access_mode { .create_bo = unmapped_create_bo, .release_bo = nop_release_bo, }, + { + .name = "snoop", + .set_bo = cpu_set_bo, + .cmp_bo = cpu_cmp_bo, + .create_bo = snoop_create_bo, + .release_bo = nop_release_bo, + }, { .name = "gtt", .set_bo = gtt_set_bo, -- cgit v1.2.3