[igt-dev] [PATCH v21 5/6] lib: igt_dummyload: use for_each_context_engine()

Chris Wilson chris at chris-wilson.co.uk
Wed Apr 17 15:48:00 UTC 2019


Quoting Daniele Ceraolo Spurio (2019-04-17 16:42:41)
> <snip>
> 
> > @@ -94,17 +95,17 @@ emit_recursive_batch(igt_spin_t *spin,
> >   
> >       nengine = 0;
> >       if (opts->engine == ALL_ENGINES) {
> > -             unsigned int engine;
> > +             struct intel_execution_engine2 *engine;
> >   
> > -             for_each_physical_engine(fd, engine) {
> > +             for_each_context_engine(fd, opts->ctx, engine) {
> 
> On a kernel that has the new I915_CONTEXT_PARAM_ENGINES, wouldn't this 
> implicitly update opts->ctx to use it (via the ctx_map_engines in 
> intel_init_engine_list)? What if the caller then tries to submit with 
> that ctx using an execbuf flag?only an issue until all the callers are 
> updated I guess.

Using this iterator means to use both ctx and engine->flags for your
execbuf.
-Chris


More information about the igt-dev mailing list