summaryrefslogtreecommitdiff
path: root/lib/Makefile.sources
diff options
context:
space:
mode:
authorAndi Shyti <andi.shyti@intel.com>2019-03-28 17:09:48 +0200
committerAndi Shyti <andi.shyti@intel.com>2019-05-13 16:27:28 +0300
commit590ab531f8af445e45dc102c857dae0789491c46 (patch)
tree63d2ca64a3a582ebd4b9a04902f57f0ce37465ed /lib/Makefile.sources
parent00eb54d0b18dd9450580f42750757df2adc441c1 (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 'lib/Makefile.sources')
-rw-r--r--lib/Makefile.sources2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 97685823..ef96bd09 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -13,6 +13,8 @@ lib_source_list = \
i915/gem_ring.c \
i915/gem_mman.c \
i915/gem_mman.h \
+ i915/gem_engine_topology.c \
+ i915/gem_engine_topology.h \
i915_3d.h \
i915_reg.h \
i915_pciids.h \