diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-01-27 09:38:34 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-01-27 09:40:27 +0000 |
commit | 7848d214729a366eca937a63ec8ea025988203d2 (patch) | |
tree | 9b6f93561584a8ad26c53859963cf872f96a20d6 /tests/gem_tiled_wc.c | |
parent | ebd8b32bc6f5046815e00a6bee7f7f6650591cce (diff) |
igt/gem_tiled_wc: Use correct offsets
A last moment "tidification" in
commit 5e9fac54918e424d928bc15b90e4c65d4cfdd356
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Jan 22 07:52:09 2015 +0000
igt/gem_tiled_wc: Fix! Finish!
wreaked havoc again.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88816
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_tiled_wc.c')
-rw-r--r-- | tests/gem_tiled_wc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/gem_tiled_wc.c b/tests/gem_tiled_wc.c index 15e7fa5a..f7053781 100644 --- a/tests/gem_tiled_wc.c +++ b/tests/gem_tiled_wc.c @@ -175,7 +175,6 @@ igt_simple_main first_page = offset & ~(PAGE_SIZE-1); last_page = (offset + len + PAGE_SIZE) & ~(PAGE_SIZE-1); - offset -= first_page; linear = gem_mmap__wc(fd, handle, first_page, last_page - first_page, PROT_READ); igt_assert(linear); @@ -226,7 +225,7 @@ igt_simple_main igt_debug("Checking offset %d swizzled %s -> %d\n", j, swizzle_str, swizzled_offset); expected_val = calculate_expected(swizzled_offset); - found_val = linear[j / 4]; + found_val = linear[(j - first_page)/ 4]; igt_assert_f(expected_val == found_val, "Bad read [%d]: %d instead of %d at 0x%08x " "for read from 0x%08x to 0x%08x, swizzle=%s\n", |