[Intel-gfx] [PATCH i-g-t] tests/i915/gem_ctx_switch: Update with engine discovery

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 27 11:05:37 UTC 2019


Quoting Tvrtko Ursulin (2019-06-27 11:55:56)
> 
> On 27/06/2019 11:35, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2019-06-27 11:20:19)
> >> @@ -125,13 +128,14 @@ static void single(int fd, uint32_t handle,
> >>          shared = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
> >>          igt_assert(shared != MAP_FAILED);
> >>   
> >> -       gem_require_ring(fd, e->exec_id | e->flags);
> >> -
> >>          for (n = 0; n < 64; n++) {
> >>                  if (flags & QUEUE)
> >>                          contexts[n] = gem_queue_create(fd);
> >>                  else
> >>                          contexts[n] = gem_context_create(fd);
> >> +
> >> +               if (gem_context_has_engine_map(fd, 0))
> >> +                       gem_context_set_all_engines(fd, contexts[n]);
> > 
> > That was a moment of doubt on how well setting engines on a "queue"
> > worked :)
> 
> Why it wouldn't work?

Because I expected to have made a mistake :)

> > Ok, that looks like what I would expect. For crux tests, we iterate over
> > both the legacy ring selector, and along the engine[] indices.
> > 
> >> -       igt_subtest("basic-all-light")
> >> +       igt_subtest("all-light")
> >>                  all(fd, light, 0, 5);
> >> -       igt_subtest("basic-all-heavy")
> >> +       igt_subtest("all-heavy")
> >>                  all(fd, heavy, 0, 5);
> > 
> > And for "all" tests where we are just trying to utilise all engines at
> > once, we only care about the underlying HW utilisation and so the new
> > query interface works best.
> 
> Cool, so no complaints?

Strategy works for me. We can argue about which tests need both and
hopefully come up with a minimum set that gives good coverage of active
legacy ABI.
-Chris


More information about the Intel-gfx mailing list