summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-03-28 11:49:25 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-04-04 12:27:21 +0100
commit014a6fa238322b497116b359cb92df1ce7fa8847 (patch)
tree65ae001f21b556ffd74f9c45818c872a01e55450
parent452e8776788f02b9425bcbaf9533081479a5cc51 (diff)
i915/gem_exec_big: Only warn for the first sign of a pagefault
We only need the warning once, not for the several thousand relocations we try. The current execbuf implementation will set all presumed_offset to -1 so this loop should quit on the first entry if we hit the pagefault, but for the sake of completeness check all. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110269 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r--tests/i915/gem_exec_big.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/i915/gem_exec_big.c b/tests/i915/gem_exec_big.c
index 440136ee..9da90ead 100644
--- a/tests/i915/gem_exec_big.c
+++ b/tests/i915/gem_exec_big.c
@@ -169,8 +169,10 @@ static void execN(int fd, uint32_t handle, uint64_t batch_size, unsigned flags,
igt_permute_array(gem_reloc, nreloc, xchg_reloc);
gem_execbuf(fd, &execbuf);
- for (n = 0; n < nreloc; n++)
- igt_warn_on(gem_reloc[n].presumed_offset == -1);
+ for (n = 0; n < nreloc; n++) {
+ if (igt_warn_on(gem_reloc[n].presumed_offset == -1))
+ break;
+ }
if (use_64bit_relocs) {
for (n = 0; n < nreloc; n++) {