From cade6f4ffa3d6086f0edefc557c65bcb3c3ecddf Mon Sep 17 00:00:00 2001 From: Zbigniew Kempczyński Date: Wed, 29 Jan 2020 20:36:41 -0800 Subject: benchmarks/gem_latency: change gtt to device coherent mapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On newer gens with no mappable aperture we have to switch to GEM_MMAP_OFFSET when reasonable. As gem_mmap__device_coherent() wrapper was written to choose best maping method we can change gtt mapping to it. Signed-off-by: Zbigniew Kempczyński Signed-off-by: Chris Wilson --- benchmarks/gem_latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmarks') diff --git a/benchmarks/gem_latency.c b/benchmarks/gem_latency.c index 0fc4b05e..7269e22d 100644 --- a/benchmarks/gem_latency.c +++ b/benchmarks/gem_latency.c @@ -242,7 +242,7 @@ static void setup_latency(struct producer *p, int gen, unsigned flags) if (gem_has_llc(fd)) map = gem_mmap__cpu(fd, handle, 0, 4096, PROT_WRITE); else - map = gem_mmap__gtt(fd, handle, 4096, PROT_WRITE); + map = gem_mmap__device_coherent(fd, handle, 0, 4096, PROT_WRITE); p->latency_dispatch.exec[0].relocation_count = 1; p->latency_dispatch.exec[0].relocs_ptr = -- cgit v1.2.3