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>
This commit is contained in:
Chris Wilson 2015-10-20 14:40:50 +01:00
parent 5ec54d8a21
commit 46ec33e847

View File

@ -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,