From a3b80912a993b4b6952917afea41906f88dda01e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 5 Mar 2014 11:09:46 +0000 Subject: [PATCH] igt/gem_pwrite_pread: Fix relocation offsets for gen8+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237 Signed-off-by: Chris Wilson --- tests/gem_pwrite_pread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gem_pwrite_pread.c b/tests/gem_pwrite_pread.c index 64952b7f..00eaa558 100644 --- a/tests/gem_pwrite_pread.c +++ b/tests/gem_pwrite_pread.c @@ -84,7 +84,7 @@ static void copy(int fd, uint32_t src, uint32_t dst, void *buf, int len, int loo struct drm_i915_gem_relocation_entry reloc[] = { { dst, 0, 4*sizeof(uint32_t), 0, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER }, - { src, 0, 7*sizeof(uint32_t), 0, I915_GEM_DOMAIN_RENDER, 0 }, + { src, 0, (is_64bit ? 8 : 7)*sizeof(uint32_t), 0, I915_GEM_DOMAIN_RENDER, 0 }, }; struct drm_i915_gem_exec_object2 exec[] = { { src },