Quoting Dale B Stimson (2020-01-22 23:26:57) > Switch from simple iteration over all potential engines to using > macro __for_each_physical_engine which only returns engines that are > actually present. > > For each context (as it is created) call gem_context_set_all_engines > so that execbuf will interpret the engine specification in the new way. > > Signed-off-by: Dale B Stimson <dale.b.stimson@xxxxxxxxx> > --- > tests/i915/gem_ctx_isolation.c | 41 ++++++++++++++++++++++++++-------- > 1 file changed, 32 insertions(+), 9 deletions(-) > > diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c > index 25113b054..31a20ed3a 100644 > --- a/tests/i915/gem_ctx_isolation.c > +++ b/tests/i915/gem_ctx_isolation.c > @@ -240,6 +240,25 @@ static bool ignore_register(uint32_t offset) > return false; > } > > +/* > + * context_create_plus_all_engines - Same as gem_context_create plus setup. > + * > + * This is a convenience function that may be called instead of the sequence > + * of gem_context_create followed by gem_context_set_all_engines. > + * If gem_has_engine_topology(), then function gem_context_set_all_engines > + * indicates that future execbuf calls for this context should interpret the > + * engine specification in a gem_engine_topology-compatible way. > + */ > +static uint32_t context_create_plus_all_engines(int fd) > +{ > + uint32_t ctx; > + > + ctx = gem_context_create(fd); > + gem_context_set_all_engines(fd, ctx); > + > + return ctx; > +} gem_context_clone_with_engines() so we can stop assuming that all-engines is the right answer, because that depends on the conditions set up by the iterator on the first context. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx