[Intel-gfx] [PATCH i-g-t 3/7] lib/i915: Add query to detect if engine accepts only ro batches
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 13 23:55:58 UTC 2019
Quoting Mika Kuoppala (2019-11-13 15:49:09)
> diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> index 5c15f177..ca6bef6a 100644
> --- a/tests/i915/gem_exec_schedule.c
> +++ b/tests/i915/gem_exec_schedule.c
> @@ -652,7 +652,8 @@ static void semaphore_noskip(int i915)
> igt_spin_t *chain, *spin;
>
> if (eb_ring(inner) == eb_ring(outer) ||
> - !gem_can_store_dword(i915, eb_ring(inner)))
> + !gem_can_store_dword(i915, eb_ring(inner)) ||
> + !gem_engine_has_mutable_submission(i915, eb_ring(inner)))
> continue;
>
> chain = __igt_spin_new(i915, .engine = eb_ring(outer));
> @@ -1157,6 +1158,9 @@ static void deep(int fd, unsigned ring)
> int dep_nreq;
> int n;
>
> + igt_require(gem_can_store_dword(fd, ring));
> + igt_require(gem_engine_has_mutable_submission(fd, ring));
> +
> ctx = malloc(sizeof(*ctx) * MAX_CONTEXTS);
> for (n = 0; n < MAX_CONTEXTS; n++) {
> ctx[n] = gem_context_create(fd);
Works, no need to skip.
> diff --git a/tests/i915/gem_exec_whisper.c b/tests/i915/gem_exec_whisper.c
> index a3384760..45cc1437 100644
> --- a/tests/i915/gem_exec_whisper.c
> +++ b/tests/i915/gem_exec_whisper.c
> @@ -204,13 +204,15 @@ static void whisper(int fd, unsigned engine, unsigned flags)
> nengine = 0;
> if (engine == ALL_ENGINES) {
> for_each_physical_engine(e, fd) {
> - if (gem_can_store_dword(fd, eb_ring(e)))
> + if (gem_can_store_dword(fd, eb_ring(e)) &&
> + gem_engine_has_mutable_submission(fd, eb_ring(e)))
> engines[nengine++] = eb_ring(e);
> }
> } else {
> igt_assert(!(flags & ALL));
> igt_require(gem_has_ring(fd, engine));
> igt_require(gem_can_store_dword(fd, engine));
> + igt_require(gem_engine_has_mutable_submission(fd, engine));
> engines[nengine++] = engine;
> }
> igt_require(nengine);
You should be able to handle the whisper; it's one of the basic does the
kernel work at all. All it is testing is relocation and scheduling...
Worksforme.
-Chris
More information about the Intel-gfx
mailing list