[igt-dev] [Intel-gfx] [PATCH i-g-t v7] tests/perf_pmu: Improve accuracy by waiting on spinner to start
Chris Wilson
chris at chris-wilson.co.uk
Mon Mar 19 14:02:38 UTC 2018
Quoting Tvrtko Ursulin (2018-03-19 13:56:05)
> @@ -146,7 +198,7 @@ static int emit_recursive_batch(igt_spin_t *spin,
>
> /* recurse */
> fill_reloc(&relocs[obj[BATCH].relocation_count],
> - obj[BATCH].handle, (batch - spin->batch) + 1,
> + obj[BATCH].handle, (batch - batch_start) + 1,
D'oh.
> I915_GEM_DOMAIN_COMMAND, 0);
> if (gen >= 8) {
> *batch++ = MI_BATCH_BUFFER_START | 1 << 8 | 1;
> @@ -167,18 +219,23 @@ static int emit_recursive_batch(igt_spin_t *spin,
> obj[BATCH].relocation_count++;
> obj[BATCH].relocs_ptr = to_user_pointer(relocs);
>
> - execbuf.buffers_ptr = to_user_pointer(obj + (2 - execbuf.buffer_count));
> - execbuf.rsvd1 = ctx;
> + execbuf->buffers_ptr = to_user_pointer(obj +
> + (2 - execbuf->buffer_count));
> + execbuf->rsvd1 = ctx;
>
> - if (out_fence)
> - execbuf.flags |= I915_EXEC_FENCE_OUT;
> + if (flags & OUT_FENCE)
> + execbuf->flags |= I915_EXEC_FENCE_OUT;
>
> for (i = 0; i < nengine; i++) {
> - execbuf.flags &= ~ENGINE_MASK;
> - execbuf.flags |= engines[i];
> - gem_execbuf_wr(fd, &execbuf);
> - if (out_fence) {
> - int _fd = execbuf.rsvd2 >> 32;
> + execbuf->flags &= ~ENGINE_MASK;
> + execbuf->flags |= engines[i];
> +
> + if (flags & POLL_RUN)
> + igt_require(gem_can_store_dword(fd, execbuf->flags));
Hmm, we need to lift this. If we abort on a secondary engine, we haven't
yet attached ourselves into the igt_terminate_spin_batches and so we'll
get GPU hangs.
-Chris
More information about the igt-dev
mailing list