[igt-dev] [PATCH] lib/i915: gem_engine_topology: get eb flags from engine's coordiantes

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 20 08:26:50 UTC 2019


Quoting Tvrtko Ursulin (2019-06-20 09:12:55)
> 
> On 20/06/2019 08:52, Andi Shyti wrote:
> > Hi Tvrtko,
> > 
> >>> +   struct intel_execution_engine2 *e;
> >>> +
> >>> +   for_each_context_engine(fd, ctx_id, e)
> >>> +           if (class == e->class && instance == e->instance)
> >>> +                   return e->flags;
> >>
> >> And most important difference, I wouldn't configure the context from this helper. Instead I think all we need is:
> >>
> >> int gem_context_get_eb_flags(int fd, uint32_t ctx, struct i915_engine_class_instance ci)
> >> {

[snip]

> I think it would be wrong to configure the context from this helper. The 
> name of the function translates to "give me correct eb.flags for this 
> context to submit to this class:instance". All function needs to do is 
> to answer this question both on legacy and new kernels.

Yes. I think it would be most surprising if a getter reconfigured the
context.
-Chris


More information about the igt-dev mailing list