mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-11-05 04:27:24 +00:00
tests/gem_exec_big: Re-add gem_sync
We need this to avoid hitting the slowpath and ending up with a
presumed_offset == -1. Regression reported by PRTS, bisected to
commit eb36fc993d7ae1988c80ba5b767989059c91d0ec
Author: Chris Wilson <chris@chris-wilson.co.uk>
AuthorDate: Mon Jun 16 10:49:16 2014 +0100
Commit: Chris Wilson <chris@chris-wilson.co.uk>
CommitDate: Mon Jun 16 10:51:02 2014 +0100
igt/gem_exec_big: Update to new igt_assert_eq
Use igt_assert_eq for better test output on failures.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
v2: igt_warn_on unexpected reloc offsets.
Cc: shuang.he@intel.com
Acked-by: Chris Wilson <chris@chris-wilson.co.uk> (on irc)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
1b1f4b16a2
commit
236d6bd2d3
@ -84,8 +84,15 @@ static void exec(int fd, uint32_t handle, uint32_t reloc_ofs)
|
|||||||
i915_execbuffer2_set_context_id(execbuf, 0);
|
i915_execbuffer2_set_context_id(execbuf, 0);
|
||||||
execbuf.rsvd2 = 0;
|
execbuf.rsvd2 = 0;
|
||||||
|
|
||||||
|
/* Avoid hitting slowpaths in the reloc processing which might yield a
|
||||||
|
* presumed_offset of -1. Happens when the batch is still busy from the
|
||||||
|
* last round. */
|
||||||
|
gem_sync(fd, handle);
|
||||||
|
|
||||||
gem_execbuf(fd, &execbuf);
|
gem_execbuf(fd, &execbuf);
|
||||||
|
|
||||||
|
igt_warn_on(gem_reloc[0].presumed_offset == -1);
|
||||||
|
|
||||||
gem_read(fd, handle, reloc_ofs, &tmp, 4);
|
gem_read(fd, handle, reloc_ofs, &tmp, 4);
|
||||||
igt_assert_eq(tmp, gem_reloc[0].presumed_offset);
|
igt_assert_eq(tmp, gem_reloc[0].presumed_offset);
|
||||||
}
|
}
|
||||||
@ -106,8 +113,11 @@ igt_simple_main
|
|||||||
handle = gem_create(fd, batch_size);
|
handle = gem_create(fd, batch_size);
|
||||||
gem_write(fd, handle, 0, batch, sizeof(batch));
|
gem_write(fd, handle, 0, batch, sizeof(batch));
|
||||||
|
|
||||||
for (reloc_ofs = 4096; reloc_ofs < batch_size; reloc_ofs += 4096)
|
for (reloc_ofs = 4096; reloc_ofs < batch_size; reloc_ofs += 4096) {
|
||||||
|
igt_debug("batch_size %u, reloc_ofs %u\n",
|
||||||
|
batch_size, reloc_ofs);
|
||||||
exec(fd, handle, reloc_ofs);
|
exec(fd, handle, reloc_ofs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gem_close(fd, handle);
|
gem_close(fd, handle);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user