summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-10-20 14:40:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-10-23 10:45:36 +0100
commit46ec33e847eef3292a2f3b4f4a037cfb161cfeee (patch)
treecd92abe4517a7a700f727679cf3ed7d262340418 /tests
parent5ec54d8a2165f5095ec70b9bdb9ae583fead39c2 (diff)
igt/gem_concurrent_all: Add snoop concurrency tests
Another caching mode worth exploring for bad flushing behaviour. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_concurrent_all.c21
1 files changed, 21 insertions, 0 deletions
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)
{
@@ -322,6 +336,13 @@ const struct access_mode {
.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,
.cmp_bo = gtt_cmp_bo,