summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2020-01-29 20:36:42 -0800
committerChris Wilson <chris@chris-wilson.co.uk>2020-01-30 08:35:34 +0000
commita9d69f51dadbcbc53527671f87572d05c3370cba (patch)
tree645229a8493b1d634da62b190c979719f7785ec7 /benchmarks
parentcade6f4ffa3d6086f0edefc557c65bcb3c3ecddf (diff)
benchmarks/gem_busy: use gem_mmap__device_coherent()
Use gem_mmap__device_coherent() in benchmarks/gem_busy for use with devices without a mappable aperture. Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Zbigniew KempczyƄski <zbigniew.kempczynski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/gem_busy.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/benchmarks/gem_busy.c b/benchmarks/gem_busy.c
index 2fb1edf9..405cc9b0 100644
--- a/benchmarks/gem_busy.c
+++ b/benchmarks/gem_busy.c
@@ -185,10 +185,7 @@ static int loop(unsigned ring, int reps, int ncpus, unsigned flags)
if (flags & WRITE)
obj[0].flags = EXEC_OBJECT_WRITE;
obj[1].handle = gem_create(fd, 4096);
- if (gem_mmap__has_wc(fd))
- batch = gem_mmap__wc(fd, obj[1].handle, 0, 4096, PROT_WRITE);
- else
- batch = gem_mmap__gtt(fd, obj[1].handle, 4096, PROT_WRITE);
+ batch = gem_mmap__device_coherent(fd, obj[1].handle, 0, 4096, PROT_WRITE);
gem_set_domain(fd, obj[1].handle,
I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
batch[0] = MI_BATCH_BUFFER_END;