From 7bd2ac6642248fdd865e7b32a1b4f20bda992e27 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 16 Apr 2016 17:15:38 +0100 Subject: gem_exec_lut_handle: Fix presumed_offset to force relocation on full-ppgtt If the object is at offset 0, quite likely using full-ppgtt, then the presumed_offset set also to 0 causes the relocation to be skipped. Signed-off-by: Chris Wilson --- benchmarks/gem_exec_reloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'benchmarks/gem_exec_reloc.c') diff --git a/benchmarks/gem_exec_reloc.c b/benchmarks/gem_exec_reloc.c index 2ef6df57..40e2e478 100644 --- a/benchmarks/gem_exec_reloc.c +++ b/benchmarks/gem_exec_reloc.c @@ -144,7 +144,7 @@ static int run(unsigned batch_size, reloc[n].target_handle = target[n]; else reloc[n].target_handle = objects[target[n]].handle; - reloc[n].presumed_offset = 0; + reloc[n].presumed_offset = -1; } gem_execbuf(fd, &execbuf); @@ -154,7 +154,7 @@ static int run(unsigned batch_size, for (count = 0; count < 1000; count++) { if ((flags & SKIP_RELOC) == 0) { for (n = 0; n < num_relocs; n++) - reloc[n].presumed_offset = 0; + reloc[n].presumed_offset = -1; if (flags & CYCLE_BATCH) { c = (c + 1) % 16; gem_exec[num_objects].handle = cycle[c]; -- cgit v1.2.3