[igt-dev] [PATCH v12 5/7] lib/i915: add gem_engine_topology library
Chris Wilson
chris at chris-wilson.co.uk
Tue Mar 19 09:43:29 UTC 2019
Quoting Andi Shyti (2019-03-18 23:28:10)
> The gem_engine_topology library is a set of functions that
> interface with the query and getparam/setparam ioctls.
>
> The library's access point is the 'intel_init_engine_list()'
> function that, everytime is called, generates the list of active
> engines and returns them in a 'struct intel_engine_data'. The
> structure contains only the engines that are actively present in
> the GPU.
>
> The function can work in both the cases that the query and
> getparam ioctls are implemented or not by the running kernel. In
> case they are implemented, a query is made to the driver to fetch
> the list of active engines. In case they are not implemented, the
> list is taken from the 'intel_execution_engines2' array and
> stored only after checking their presence.
>
> The library provides three helper functions:
>
> 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.
-Chris
More information about the igt-dev
mailing list