summaryrefslogtreecommitdiff
path: root/lib/igt_dummyload.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_dummyload.c')
-rw-r--r--lib/igt_dummyload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index b23c0384..64d59f8d 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -99,7 +99,9 @@ emit_recursive_batch(igt_spin_t *spin,
* are not allowed in the first 256KiB, for fear of negative relocations
* that wrap.
*/
- addr = (random() % 1024 + 1024) << 12;
+ addr = gem_aperture_size(fd) / 2;
+ addr += random() % addr / 2;
+ addr &= -4096;
nengine = 0;
if (opts->engine == ALL_ENGINES) {