diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-29 17:40:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-29 17:42:02 +0100 |
commit | 0552e40727a4d95967a9f95954e6046eb3ddca5d (patch) | |
tree | df538357d152a8ecde6e8a85eab308038796ef6a | |
parent | 0aa9fd12a2f25faa9a7625a1896c31b0d257390f (diff) |
igt/gem_cpu_reloc: Fix presumed_offset
The content of the batch may no longer match the offset/presumed_offset
pair, so force the relocation by setting reloc.presumed_offset=-1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | tests/gem_cpu_reloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c index 2d4f90e8..e039f9a2 100644 --- a/tests/gem_cpu_reloc.c +++ b/tests/gem_cpu_reloc.c @@ -74,7 +74,7 @@ static void copy(int fd, uint32_t batch, uint32_t src, uint32_t dst) gem_reloc[0].target_handle = dst; gem_reloc[0].read_domains = I915_GEM_DOMAIN_RENDER; gem_reloc[0].write_domain = I915_GEM_DOMAIN_RENDER; - gem_reloc[0].presumed_offset = 0; + gem_reloc[0].presumed_offset = -1; gem_reloc[1].offset = 7 * sizeof(uint32_t); if (intel_gen(intel_get_drm_devid(fd)) >= 8) @@ -83,7 +83,7 @@ static void copy(int fd, uint32_t batch, uint32_t src, uint32_t dst) gem_reloc[1].target_handle = src; gem_reloc[1].read_domains = I915_GEM_DOMAIN_RENDER; gem_reloc[1].write_domain = 0; - gem_reloc[1].presumed_offset = 0; + gem_reloc[1].presumed_offset = -1; memset(gem_exec, 0, sizeof(gem_exec)); gem_exec[0].handle = src; |