diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-06-12 11:40:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-06-12 11:55:02 +0100 |
commit | f66c71e29de50bae880bc81ceb0517d4e3e2dfd8 (patch) | |
tree | ce2f022335c35fca75603a3f3ed1e920953cda78 /lib/igt_dummyload.c | |
parent | 9fe244cb751c9d3be0581a943bb9baa8651d8d29 (diff) |
lib/i915: Fix GTT offset for 64b
Large GTT do not fit into the 32b local, use a 64b and limit to [2G-3G]!
Fixes: 0421ebe98f0b ("lib/i915: Increase range for randomised location of dummyload")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib/igt_dummyload.c')
-rw-r--r-- | lib/igt_dummyload.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c index 64d59f8d0..f79f16dee 100644 --- a/lib/igt_dummyload.c +++ b/lib/igt_dummyload.c @@ -82,7 +82,7 @@ emit_recursive_batch(igt_spin_t *spin, unsigned int nengine; int fence_fd = -1; uint32_t *cs, *batch; - uint32_t addr; + uint64_t addr; int i; /* @@ -100,6 +100,8 @@ emit_recursive_batch(igt_spin_t *spin, * that wrap. */ addr = gem_aperture_size(fd) / 2; + if (addr >> 31) + addr = 1 << 31; addr += random() % addr / 2; addr &= -4096; |