diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-06-12 10:05:58 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-06-12 10:08:12 +0100 |
commit | 0421ebe98f0bc903ac9991d03142bf35c14f16c2 (patch) | |
tree | 018947d7340298bd19dec0be325a8e8445c96382 | |
parent | 0a4049fd1d8a2f7b86763072dcc28066122ef615 (diff) |
lib/i915: Increase range for randomised location of dummyload
Suggest a wider range of possible relocations to reduce the chance of
colliding with a framebuffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
-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 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) { |