[igt-dev] [PATCH v12 5/7] lib/i915: add gem_engine_topology library

Andi Shyti andi.shyti at intel.com
Tue Mar 19 10:00:03 UTC 2019


> > 1. gem_topology_has_engine(): checks if the engine is present by
> >    querying the driver in a way that the caller function wouldn't
> >    know if the above ioctls are implemented.
> > 
> > 2. gem_set_eb_flags(): sets the execution buffer flag depending
> >    whether it refers to context-engine mapping or not.
> > 
> > 3. gem_context_execbuf(): is a wrapper that executes the buffer
> >    in a way that the calling function doesn't know about the
> >    ioctls in the driver.
> 
> You are not going to get me to use gem_context_execbuf, or
> gem_set_eb_flags(). I just want a function that returns the flags for a
> given engine in this context, as 99% of the time I already expect to
> have the right flags.

That's fine, I thought it might be cleaner to have wrappers
around that abstracts whatever is below. But anyway that's an
easy fix just make a gem_get_eb_flags instead of a
gem_set_eb_flags.

The thing that I like less is that the chain of calls starts
getting too long and hard to follow.

On the other hand, the amount of thngs to be done before calling
an execbuf would starts being too demanding (therefore hard to
follow).

I think this check should be done directly by execbuf, so that
the caller function would be completely agnostic. But this
requires quite some re-work around, which definitely goes far 
beyond the purpose of this patchset.

Andi


More information about the igt-dev mailing list