diff options
author | Andi Shyti <andi.shyti@intel.com> | 2019-03-28 17:09:48 +0200 |
---|---|---|
committer | Andi Shyti <andi.shyti@intel.com> | 2019-05-13 01:58:57 +0300 |
commit | 7d439890b2b9deda54dd2929bb1591f9791eed28 (patch) | |
tree | 2808a2b75b86590cbbe39bd8e026fc3b180b90f8 /assembler/brw_compat.h | |
parent | 364a71b13ffd73607563dbb5a015a59622f942bf (diff) |
lib/i915: add gem_engine_topology library and for_each loop definition
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 gem_engine_topology library provides some iteration helpers:
- intel_get_current_engine(): provides the current engine in the
iteration.
- intel_get_current_physical_engine(): provides the current
physical engine, if the current engine is a virtual engine,
it moves forward until it finds a physical engine.
- intel_next_engine() it just increments the counter so that it
points to the next engine.
Extend the 'for_each_engine_class_instance' so that it can loop
using the new 'intel_init_engine_list()' and rename it to
'for_each_context_engine'.
Move '__for_each_engine_class_instance' to gem_engine_topology.h
and rename it to '__for_each_static_engine'.
Update accordingly tests/perf_pmu.c to use correctly the new
for_each loops.
Signed-off-by: Andi Shyti <andi.shyti@intel.com>
Diffstat (limited to 'assembler/brw_compat.h')
0 files changed, 0 insertions, 0 deletions