new engine discovery interface
Subsystems (2)
v23 cover new engine discovery interface
From: Andi Shyti <[email protected]>
Hi,
In this patchset I propose an alternative way of engine discovery thanks to the new interfaces developed by Tvrtko and Chris[4].
Thanks Tvrtko, Chris, Antonio and Petri for your comments in the previous RFCs.
Andi
v22 --> v23
===========
updated the following tests to the new APIs:
gem_busygem_cs_tlbgem_ctx_execgem_exec_basicgem_exec_parallelgem_exec_storegem_waiti915_hangman
v21 --> v22
===========
- just removed context creation and deletion from engine_topology and fixed perf_pmu accordingly.
v20 --> v21
===========
- removed Tvrtko's debug messages
- few fixes from Chris last review
v19 --> v20
===========
- added some debugs from Tvrtko to get more info about gem_wait failure.
- few fixes in gem_engine_topology.c from Tvrtko's comments, including a bigger fix about an uncontrolled variable increment in the _next function
v18 --> v19
===========
- integrated Tvrtko's fixup patch [17]. From this patch some changes have been moved to gem_engine_topology as a new helper for getting the engine's properties.
v17 --> v18
===========
- three patches have been applied (the ones that add gem_context_has_engine() function)
- few cosmetic fixes
- and some changes coming from Tvrtko's review on v17
v16 --> v17
===========
amongst many little things, three main changes:
- improved perf_pmu adaptation to gem_engine_topology
- removed the exec-ctx test, perf_pmu will be the flag test
- when creating the engine list, now the for_each_engine_physical can be executed safely during subtest listing
v15 --> v16
===========
- few changes to the gem_engine_topology stuff
- added une more dummy test which loops through the physical engines, as well.
- changes to test/perf_pmu required some more changes than expected (the 3 last patches)
v14 --> v15
===========
PATCH v14: [16]
- virtual engines will be called "virtual" like unrecognised engines will be called "unknown"
- renamed the for_each loops to more meaningful names (__for_each_static_engine and for_each_context_engine) and moved into gem_engine_topology.h
- minor changes about data types.
v13 --> v14
===========
PATCH v13: [15]
minor changes this time:
- squashed patch 2 and 3 (from v13) with a little rename and added Chris r-b
- fixed some index issues and string assignement leaks
- squashed patches 5, 6, 7 and 8 from v13
v12 --> v13
===========
PATCH v12: [14]
This patch is also very different from the previous other than some reorganization of the code these are the main changes:
- the previous version lacked the case when the context had its engines mapped. checks in the following order
if the driver doesn't have the new API
-> get the engines from the static list
if the driver has the API but the context has nothing mapped
-> get the engines from "query" and map them
if the driver has the API and the context has engines mapped
-> get the engines from the context
- the helper functions have been removed as they were of no use.
v11 --> v12
===========
PATCH v11: [13]
This 12th version starts from a completely different thought. Here's the main differences:
- The list of engines is provided in an engine_data structure which contains an index (useful for looping through and for engine/context index mapping) instead of an array of engines.
- The list of engines is generated every time the init function is called and nothing is allocated in heap memory.
- The ioctl check is done already during the initialization part and if the new ioctls are not implemented, then the init function still stores only those present in the GPU.
- The for_each loop is implemented by re-using the previous 'for_each_engine_class_instance()' implemented by Tvrtko.
- The gem_topology library offers few helper functions for checking the engine presence, checking the implementation of the ioctls and executing the buffer, in order to be completely unaware of the driver implementation.
Thanks Tvrtko for all your inputs.
v10 --> v11
===========
RFC v10: [12]
few cosmetic changes in v11 and minor architectural details. Thanks Tvrtko.
- the 'query_engines()' functions are static as no one is using them yet.
- removed the 'gem_has_engine_topology()' function because it's very little used, 'get_active_engines()' can be used instead.
- a minor ring -> engine renaming coming from Chris.
v9 --> v10
==========
RFC v9: [11]
also this time quite many changes, thanks Chris for the reviews, here the most relevant of them.
- gem_query.[ch] have been renamed to gem_engine_topology.[ch] and all the functions ended up there as they are referring to the topology of the engines.
- the functions 'get_active_engines()', 'gem_set_context_get_engines()' and 'igt_require_gem_engine_list()' will be the main interface to the gem_engine_topology library, refer to patch 2 for details.
- the define 'for_each_engine2()' doesn't expose anymore the iterator.
- 'gem_context_has_engine()' has been moved from ioctl_wrappers.c to gem_context.c.
- the gem_exec_basic exec-ctx subtest does not abort if the new getparam/setparam and query apis are not implemented as it can work with both (as it was done at the beginning).
v8 --> v9
=========
RFC v8: [10]
quite many changes, please refer to the review in [10]. Thanks Chris for the review. These are the most relevant:
- all the allocation in gem_query have been made in stack, not anymore allocated dynamically.
- removed get/set_context as it was already implemented and I didn't know.
- renamed some functions and variables to hopefully more meaningful names.
V7 --> v8
=========
RFC v7: [9]
- all functions have been moved from lib/igt_gt.{c,h} and lib/ioctl_wrappers.{c,h} to lib/i916/gem_query.{c,h}. (thanks Chris)
- 'for_each_engine_ctx' has been renamed to 'for_each_engine2' to be consistent with the '2' that indicates the new 'struct intel_execution_engine2' data structure.
V6 --> V7
=========
RFC v6: [8]
- a new patch has been added (patch 3) which adds a new requirement check through the igt_require_gem_engine_list() function. (thanks Chris) This function will initialize the engine list instead of the instead of igt_require_gem() as it was in v6
- all the ioctls have been wrapped (thanks Chris and Antonio) and new library functions have been added and assert the ioctls
- gem_init_engine_list() function returns the errno from the GETPARAM ioctl in order to be used as a requirement. (thanks Chris)
- fixed few requires/asserts
- The engine list "intel_active_engines2" is allocated of the number of engines instead of a political 64 (thanks Antonio).
- some parameter renaming in gem_has_ring_by_idx(). (thanks Chris).
- the original "intel_execution_engines2" has not been renamed, because it is used to create subtests before even executing any test/ioctl. By renaming it, some subtest generations failed. (thanks Petri)
V5 --> V6
=========
RFC v5: [7]
- Chris implemented the getparam ioctl which allows to the test to figure otu whether the new interface has been implemented. This way the for_each_engine_ctx() is able to work with new and old kernel uapi (thanks Chris)
V4 --> V5
=========
RFC v4: [6]
- the engine list is now built in 'igt_require_gem()' instead of '__open_driver()' so that we keep this discovery method specific to the i915 driver (thanks Chris).
- All the query/setparam structures dynamic allocation based on the number of engines, now are politically allocated 64 times, to avoid extra ioctl calls that retrieve the engine number (thanks Chris)
- use igt_ioctl instead of ioctl (thanks Chris)
- allocate intel_execution_engines2 dynamically instead of statically (thanks Tvrtko)
- simplify the test in 'gem_exec_basic()' so that simply checks the presence of the engine instead of executing a buffer (thank Chris)
- a new patch has been added (patch 3) that extends the 'gem_has_ring()' boolean function. The new version sets the index as it's mapped in the kernel.The previous function is now a wrapper to the new function.
V3 --> V4
=========
PATCH v3: [3]
- re-architectured the discovery mechanism based on Tvrtko's sugestion and reviews.. In this version the discovery is done during the device opening and stored in a NULL terminated array, which replaces the existing intel_execution_engines2 that is mainly used as a reference.
V2 --> V3
=========
RFC v2: [2]
- removed a standalone gem_query_engines_demo test and added the exec-ctx subtest inside gem_exec_basic (thanks Tvrtko).
- fixed most of Tvrtko's comments in [5], which consist in putting the mallocs igt_assert and ictls in igt_require and few refactoring (thanks Tvrtko).
V1 --> V2
=========
RFC v1: [1]
- added a demo test that simply queries the driver about the engines and executes a buffer (thanks Tvrtko)
- refactored the for_each_engine_ctx() macro so that what in the previous version was done by the "bind" function, now it's done in the first iteration. (Thanks Crhis)
- removed the "gem_has_ring_ctx()" because it was out of the scope.
- rename functions to more meaningful names
[1] RFC v1: https://lists.freedesktop.org/archives/igt-dev/2018-November/007025.html
[2] RFC v2: https://lists.freedesktop.org/archives/igt-dev/2018-November/007079.html
[3] PATCH v3: https://lists.freedesktop.org/archives/igt-dev/2018-November/007148.html
[4] https://cgit.freedesktop.org/~tursulin/drm-intel/log/?h=media
[5] https://lists.freedesktop.org/archives/igt-dev/2018-November/007100.html
[6] https://lists.freedesktop.org/archives/igt-dev/2019-January/008029.html
[7] https://lists.freedesktop.org/archives/igt-dev/2019-January/008165.html
[8] https://lists.freedesktop.org/archives/igt-dev/2019-February/008902.html
[9] https://lists.freedesktop.org/archives/igt-dev/2019-February/009185.html
[10] https://lists.freedesktop.org/archives/igt-dev/2019-February/009205.html
[11] https://lists.freedesktop.org/archives/igt-dev/2019-February/009277.html
[12] https://lists.freedesktop.org/archives/igt-dev/2019-March/010197.html
[13] https://lists.freedesktop.org/archives/igt-dev/2019-March/010467.html
[14] https://lists.freedesktop.org/archives/igt-dev/2019-March/010776.html
[15] https://lists.freedesktop.org/archives/igt-dev/2019-March/010827.html
[16] https://lists.freedesktop.org/archives/igt-dev/2019-March/010916.html
[17] https://lists.freedesktop.org/archives/igt-dev/2019-April/011821.html
Andi Shyti (14):
include/drm-uapi: import i915_drm.h header file
lib/i915: add gem_engine_topology library and for_each loop definition
lib: igt_gt: add execution buffer flags to class helper
lib: igt_gt: make gem_engine_can_store_dword() check engine class
lib: igt_dummyload: use for_each_context_engine()
test: perf_pmu: use the gem_engine_topology library test/i915: gem_busy: use the gem_engine_topology library test/i915: gem_cs_tlb: use the gem_engine_topology library test/i915: gem_ctx_exec: use the gem_engine_topology library test/i915: gem_exec_basic: use the gem_engine_topology library test/i915: gem_exec_parallel: use the gem_engine_topology library test/i915: gem_exec_store: use the gem_engine_topology library test/i915: gem_wait: use the gem_engine_topology library test/i915: i915_hangman: use the gem_engine_topology library
include/drm-uapi/i915_drm.h | 209 +++++++++++++++++++++++- lib/Makefile.sources | 2 + lib/i915/gem_engine_topology.c | 282 +++++++++++++++++++++++++++++++++ lib/i915/gem_engine_topology.h | 79 +++++++++ lib/igt.h | 1 + lib/igt_dummyload.c | 29 ++-- lib/igt_gt.c | 30 +++- lib/igt_gt.h | 12 +- lib/meson.build | 1 + tests/i915/gem_busy.c | 133 ++++++---------- tests/i915/gem_cs_tlb.c | 8 +- tests/i915/gem_ctx_exec.c | 15 +- tests/i915/gem_exec_basic.c | 28 ++-- tests/i915/gem_exec_parallel.c | 7 +- tests/i915/gem_exec_store.c | 25 ++- tests/i915/gem_wait.c | 24 +-- tests/i915/i915_hangman.c | 15 +- tests/perf_pmu.c | 151 +++++++++++------- 18 files changed, 822 insertions(+), 229 deletions(-) create mode 100644 lib/i915/gem_engine_topology.c create mode 100644 lib/i915/gem_engine_topology.h
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 1/14 include/drm-uapi: import i915_drm.h header file
From: Andi Shyti <[email protected]>
This header file is imported in order to include the two new ioctls DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM and DRM_IOCTL_I915_QUERY.
--- include/drm-uapi/i915_drm.h | 209 +++++++++++++++++++++++++++++++++++- 1 file changed, 206 insertions(+), 3 deletions(-)
include/drm-uapi/i915_drm.h +206 -3
@@ -136,6 +136,8 @@ enum drm_i915_gem_engine_class {struct i915_engine_class_instance {__u16 engine_class;/* see enum drm_i915_gem_engine_class */ __u16 engine_instance; +#define I915_ENGINE_CLASS_INVALID_NONE -1 +#define I915_ENGINE_CLASS_INVALID_VIRTUAL -2 };/**
@@ -355,6 +357,8 @@ typedef struct _drm_i915_sarea {#define DRM_I915_PERF_ADD_CONFIG 0x37#define DRM_I915_PERF_REMOVE_CONFIG 0x38#define DRM_I915_QUERY 0x39 +#define DRM_I915_GEM_VM_CREATE 0x3a +#define DRM_I915_GEM_VM_DESTROY 0x3b/* Must be kept compact -- no holes */ #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
@@ -415,6 +419,8 @@ typedef struct _drm_i915_sarea {#define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config)#define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64)#define DRM_IOCTL_I915_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query) +#define DRM_IOCTL_I915_GEM_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, struct drm_i915_gem_vm_control) +#define DRM_IOCTL_I915_GEM_VM_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, struct drm_i915_gem_vm_control)/* Allow drivers to submit batchbuffers directly to hardware, relying * on the security mechanisms provided by hardware.
@@ -598,6 +604,12 @@ typedef struct drm_i915_irq_wait {*/ #define I915_PARAM_MMAP_GTT_COHERENT 52 +/* +* Query whether DRM_I915_GEM_EXECBUFFER2 supports coordination of parallel +* execution through use of explicit fence support. +* See I915_EXEC_FENCE_OUT and I915_EXEC_FENCE_SUBMIT. +*/ +#define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53/* Must be kept compact -- no holes and well documented */ typedef struct drm_i915_getparam {
@@ -1120,7 +1132,16 @@ struct drm_i915_gem_execbuffer2 {*/ #define I915_EXEC_FENCE_ARRAY (1<<19) -#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_ARRAY<<1)) +/* +* Setting I915_EXEC_FENCE_SUBMIT implies that lower_32_bits(rsvd2) represent +* a sync_file fd to wait upon (in a nonblocking manner) prior to executing +* the batch. +* +* Returns -EINVAL if the sync_file fd cannot be found. +*/ +#define I915_EXEC_FENCE_SUBMIT (1 << 20) + +#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_SUBMIT << 1))#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)#define i915_execbuffer2_set_context_id (eb2, context) \
@@ -1464,8 +1485,9 @@ struct drm_i915_gem_context_create_ext {__u32 ctx_id;/* output: id of new context*/ __u32 flags;#define I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS (1u << 0) +#define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1u << 1)#define I915_CONTEXT_CREATE_FLAGS_UNKNOWN \ - (-(I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS << 1)) + (-(I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE << 1))__u64 extensions; };
@@ -1507,6 +1529,41 @@ struct drm_i915_gem_context_param {* On creation, all new contexts are marked as recoverable. */ #define I915_CONTEXT_PARAM_RECOVERABLE 0x8 + +/* +* The id of the associated virtual memory address space (ppGTT) of +* this context. Can be retrieved and passed to another context +* (on the same fd) for both to use the same ppGTT and so share +* address layouts, and avoid reloading the page tables on context +* switches between themselves. +* +* See DRM_I915_GEM_VM_CREATE and DRM_I915_GEM_VM_DESTROY. +*/ +#define I915_CONTEXT_PARAM_VM 0x9 + +/* +* I915_CONTEXT_PARAM_ENGINES: +* +* Bind this context to operate on this subset of available engines. Henceforth, +* the I915_EXEC_RING selector for DRM_IOCTL_I915_GEM_EXECBUFFER2 operates as +* an index into this array of engines; I915_EXEC_DEFAULT selecting engine[0] +* and upwards. Slots 0...N are filled in using the specified (class, instance). +* Use +* engine_class: I915_ENGINE_CLASS_INVALID, +* engine_instance: I915_ENGINE_CLASS_INVALID_NONE +* to specify a gap in the array that can be filled in later, e.g. by a +* virtual engine used for load balancing. +* +* Setting the number of engines bound to the context to 0, by passing a zero +* sized argument, will revert back to default settings. +* +* See struct i915_context_param_engines. +* +* Extensions: +* i915_context_engines_load_balance (I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE) +* i915_context_engines_bond (I915_CONTEXT_ENGINES_EXT_BOND) +*/ +#define I915_CONTEXT_PARAM_ENGINES 0xa/* Must be kept compact -- no holes and well documented */ __u64 value;
@@ -1540,9 +1597,10 @@ struct drm_i915_gem_context_param_sseu {struct i915_engine_class_instance engine;/* -* Unused for now. Must be cleared to zero. +* Unknown flags must be cleared to zero. */ __u32 flags; +#define I915_CONTEXT_SSEU_FLAG_ENGINE_INDEX (1u << 0)/* * Mask of slices to enable for the context. Valid values are a subset
@@ -1570,12 +1628,115 @@ struct drm_i915_gem_context_param_sseu {__u32 rsvd; }; +/* +* i915_context_engines_load_balance: +* +* Enable load balancing across this set of engines. +* +* Into the I915_EXEC_DEFAULT slot [0], a virtual engine is created that when +* used will proxy the execbuffer request onto one of the set of engines +* in such a way as to distribute the load evenly across the set. +* +* The set of engines must be compatible (e.g. the same HW class) as they +* will share the same logical GPU context and ring. +* +* To intermix rendering with the virtual engine and direct rendering onto +* the backing engines (bypassing the load balancing proxy), the context must +* be defined to use a single timeline for all engines. +*/ +struct i915_context_engines_load_balance { +struct i915_user_extension base; + +__u16 engine_index; +__u16 num_siblings; +__u32 flags;/* all undefined flags must be zero */ + +__u64 mbz64;/* reserved for future use; must be zero */ + +struct i915_engine_class_instance engines[0 ]; +} __attribute__((packed)); + +#define I915_DEFINE_CONTEXT_ENGINES_LOAD_BALANCE (name__,N__ ) struct { \ + struct i915_user_extension base; \ + __u16 engine_index; \ + __u16 num_siblings; \ + __u32 flags; \ + __u64 mbz64; \ + struct i915_engine_class_instance engines[N__]; \ +} __attribute__((packed)) name__ + +/* +* i915_context_engines_bond: +* +* Constructed bonded pairs for execution within a virtual engine. +* +* All engines are equal, but some are more equal than others. Given +* the distribution of resources in the HW, it may be preferable to run +* a request on a given subset of engines in parallel to a request on a +* specific engine. We enable this selection of engines within a virtual +* engine by specifying bonding pairs, for any given master engine we will +* only execute on one of the corresponding siblings within the virtual engine. +* +* To execute a request in parallel on the master engine and a sibling requires +* coordination with a I915_EXEC_FENCE_SUBMIT. +*/ +struct i915_context_engines_bond { +struct i915_user_extension base; + +struct i915_engine_class_instance master; + +__u16 virtual_index;/* index of virtual engine in ctx->engines[] */ +__u16 num_bonds; + +__u64 flags;/* all undefined flags must be zero */ +__u64 mbz64[4 ];/* reserved for future use; must be zero */ + +struct i915_engine_class_instance engines[0 ]; +} __attribute__((packed)); + +#define I915_DEFINE_CONTEXT_ENGINES_BOND (name__,N__ ) struct { \ + struct i915_user_extension base; \ + struct i915_engine_class_instance master; \ + __u16 virtual_index; \ + __u16 num_bonds; \ + __u64 flags; \ + __u64 mbz64[4]; \ + struct i915_engine_class_instance engines[N__]; \ +} __attribute__((packed)) name__ + +struct i915_context_param_engines { +__u64 extensions;/* linked chain of extension blocks, 0 terminates */ +#define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0/* see i915_context_engines_load_balance */ +#define I915_CONTEXT_ENGINES_EXT_BOND 1/* see i915_context_engines_bond */ +struct i915_engine_class_instance engines[0 ]; +} __attribute__((packed)); + +#define I915_DEFINE_CONTEXT_PARAM_ENGINES (name__,N__ ) struct { \ + __u64 extensions; \ + struct i915_engine_class_instance engines[N__]; \ +} __attribute__((packed)) name__ +struct drm_i915_gem_context_create_ext_setparam {#define I915_CONTEXT_CREATE_EXT_SETPARAM 0struct i915_user_extension base;struct drm_i915_gem_context_param param; }; +struct drm_i915_gem_context_create_ext_clone { +#define I915_CONTEXT_CREATE_EXT_CLONE 1 +struct i915_user_extension base; +__u32 clone_id; +__u32 flags; +#define I915_CONTEXT_CLONE_ENGINES (1u << 0) +#define I915_CONTEXT_CLONE_FLAGS (1u << 1) +#define I915_CONTEXT_CLONE_SCHEDATTR (1u << 2) +#define I915_CONTEXT_CLONE_SSEU (1u << 3) +#define I915_CONTEXT_CLONE_TIMELINE (1u << 4) +#define I915_CONTEXT_CLONE_VM (1u << 5) +#define I915_CONTEXT_CLONE_UNKNOWN -(I915_CONTEXT_CLONE_VM << 1) +__u64 rsvd; +}; +struct drm_i915_gem_context_destroy {__u32 ctx_id;__u32 pad;
@@ -1821,6 +1982,7 @@ struct drm_i915_perf_oa_config {struct drm_i915_query_item {__u64 query_id;#define DRM_I915_QUERY_TOPOLOGY_INFO 1 +#define DRM_I915_QUERY_ENGINE_INFO 2/* Must be kept compact -- no holes and well documented */ /*
@@ -1919,6 +2081,47 @@ struct drm_i915_query_topology_info {__u8 data[]; }; +/** +* struct drm_i915_engine_info +* +* Describes one engine and it's capabilities as known to the driver. +*/ +struct drm_i915_engine_info { +/** Engine class and instance. */ +struct i915_engine_class_instance engine; + +/** Reserved field. */ +__u32 rsvd0; + +/** Engine flags. */ +__u64 flags; + +/** Capabilities of this engine. */ +__u64 capabilities; +#define I915_VIDEO_CLASS_CAPABILITY_HEVC (1 << 0) +#define I915_VIDEO_AND_ENHANCE_CLASS_CAPABILITY_SFC (1 << 1) + +/** Reserved fields. */ +__u64 rsvd1[4 ]; +}; + +/** +* struct drm_i915_query_engine_info +* +* Engine info query enumerates all engines known to the driver by filling in +* an array of struct drm_i915_engine_info structures. +*/ +struct drm_i915_query_engine_info { +/** Number of struct drm_i915_engine_info structs following. */ +__u32 num_engines; + +/** MBZ */ +__u32 rsvd[3 ]; + +/** Marker for drm_i915_engine_info structures. */ +struct drm_i915_engine_info engines[]; +}; +#if defined(__cplusplus) }#endif
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 2/14 lib/i915: add gem_engine_topology library and for_each loop definition
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
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.
--- lib/Makefile.sources | 2 + lib/i915/gem_engine_topology.c | 282 +++++++++++++++++++++++++++++++++ lib/i915/gem_engine_topology.h | 79 +++++++++ lib/igt.h | 1 + lib/igt_gt.h | 2 + lib/meson.build | 1 + 6 files changed, 367 insertions(+) create mode 100644 lib/i915/gem_engine_topology.c create mode 100644 lib/i915/gem_engine_topology.h
lib/Makefile.sources +2 -0
@@ -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 \
lib/i915/gem_engine_topology.c new file +282 -0
282 lines not on this page · raw message
lib/i915/gem_engine_topology.h new file +79 -0
79 lines not on this page · raw message
lib/igt.h +1 -0
@@ -54,5 +54,6 @@#include "media_spin.h" #include "rendercopy.h" #include "i915/gem_mman.h" +#include "i915/gem_engine_topology.h" #endif /* IGT_H */
lib/igt_gt.h +2 -0
@@ -95,6 +95,8 @@ extern const struct intel_execution_engine2 {const char *name;int class;int instance; +uint64_t flags; +bool is_virtual; } intel_execution_engines2[];unsigned int
lib/meson.build +1 -0
@@ -5,6 +5,7 @@ lib_sources = [ 'i915/gem_submission.c', 'i915/gem_ring.c', 'i915/gem_mman.c', + 'i915/gem_engine_topology.c', 'igt_color_encoding.c', 'igt_debugfs.c', 'igt_device.c',
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 3/14 lib: igt_gt: add execution buffer flags to class helper
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
we have a "class/instance to eb flags" helper but not the opposite, add it.
--- lib/igt_gt.c | 18 ++++++++++++++++++ lib/igt_gt.h | 2 ++ 2 files changed, 20 insertions(+)
lib/igt_gt.c +18 -0
@@ -41,6 +41,7 @@#include "intel_reg.h" #include "intel_chipset.h" #include "igt_dummyload.h" +#include "i915/gem_engine_topology.h" /** * SECTION:igt_gt
@@ -586,6 +587,23 @@ const struct intel_execution_engine2 intel_execution_engines2[] = { { } }; +int gem_execbuf_flags_to_engine_class (unsigned int flags) +{ +switch (flags &0x3f ) { +case I915_EXEC_DEFAULT : +case I915_EXEC_RENDER : +return I915_ENGINE_CLASS_RENDER ; +case I915_EXEC_BLT : +return I915_ENGINE_CLASS_COPY ; +case I915_EXEC_BSD : +return I915_ENGINE_CLASS_VIDEO ; +case I915_EXEC_VEBOX : +return I915_ENGINE_CLASS_VIDEO_ENHANCE ; +default : +igt_assert (0 ); + } +} + unsigned int gem_class_instance_to_eb_flags(int gem_fd, enum drm_i915_gem_engine_class class,
lib/igt_gt.h +2 -0
@@ -99,6 +99,8 @@ extern const struct intel_execution_engine2 {bool is_virtual; } intel_execution_engines2[]; +int gem_execbuf_flags_to_engine_class (unsigned int flags); + unsigned int gem_class_instance_to_eb_flags(int gem_fd, enum drm_i915_gem_engine_class class,
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 4/14 lib: igt_gt: make gem_engine_can_store_dword() check engine class
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Engines referred by class and instance are getting more popular, gem_engine_can_store_dword() should handle the situation.
--- lib/igt_gt.c | 12 +++++++++--- lib/igt_gt.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-)
lib/igt_gt.c +9 -3
@@ -557,7 +557,7 @@ const struct intel_execution_engine intel_execution_engines[] = { { NULL, 0, 0 } }; -bool gem_can_store_dword (int fd,unsigned int engine) +bool gem_class_can_store_dword (int fd,int class) {uint16_t devid =intel_get_drm_devid (fd);const struct intel_device_info *info =intel_get_device_info (devid);
@@ -569,8 +569,8 @@ bool gem_can_store_dword(int fd, unsigned int engine)if (gen ==3 && (info->is_grantsdale || info->is_alviso))return false;/* only supports physical addresses */ -if (gen ==6 && ((engine &0x3f ) ==I915_EXEC_BSD )) -return false;/* kills the machine! */ +if (gen ==6 && class ==I915_ENGINE_CLASS_VIDEO ) +return false;if (info->is_broadwater)return false;/* Not sure yet... */
@@ -578,6 +578,12 @@ bool gem_can_store_dword(int fd, unsigned int engine)return true; } +bool gem_can_store_dword (int fd,unsigned int engine) +{ +return gem_class_can_store_dword (fd, +gem_execbuf_flags_to_engine_class (engine)); +} +const struct intel_execution_engine2 intel_execution_engines2[] = { {"rcs0" ,I915_ENGINE_CLASS_RENDER ,0 }, {"bcs0" ,I915_ENGINE_CLASS_COPY ,0 },
lib/igt_gt.h +1 -0
@@ -90,6 +90,7 @@ bool gem_ring_is_physical_engine(int fd, unsigned int ring);bool gem_ring_has_physical_engine (int fd,unsigned int ring);bool gem_can_store_dword (int fd,unsigned int engine); +bool gem_class_can_store_dword (int fd,int class); extern const struct intel_execution_engine2 { const char *name;
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 5/14 lib: igt_dummyload: use for_each_context_engine()
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
With the new getparam/setparam api, engines are mapped to context. Use for_each_context_engine() to loop through existing engines.
--- lib/igt_dummyload.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)
lib/igt_dummyload.c +20 -9
@@ -39,6 +39,7 @@#include "ioctl_wrappers.h" #include "sw_sync.h" #include "igt_vgem.h" +#include "i915/gem_engine_topology.h" #include "i915/gem_mman.h" /**
@@ -77,7 +78,7 @@ emit_recursive_batch(igt_spin_t *spin,struct drm_i915_gem_relocation_entry relocs[2 ], *r;struct drm_i915_gem_execbuffer2 *execbuf;struct drm_i915_gem_exec_object2 *obj; -unsigned int engines[16 ]; +unsigned int flags[GEM_MAX_ENGINES ];unsigned int nengine;int fence_fd =-1 ;uint32_t *cs, *batch;
@@ -85,17 +86,17 @@ emit_recursive_batch(igt_spin_t *spin, nengine =0 ;if (opts->engine ==ALL_ENGINES ) { -unsigned int engine; +struct intel_execution_engine2 *engine; -for_each_physical_engine (fd, engine) { +for_each_context_engine (fd, opts->ctx, engine) {if (opts->flags &IGT_SPIN_POLL_RUN && - !gem_can_store_dword (fd, engine)) + !gem_class_can_store_dword (fd, engine->class))continue ; - engines[nengine++] = engine; + flags[nengine++] = engine->flags; } }else { - engines[nengine++] = opts->engine; + flags[nengine++] = opts->engine; }igt_require (nengine);
@@ -237,7 +238,7 @@ emit_recursive_batch(igt_spin_t *spin,for (i =0 ; i < nengine; i++) { execbuf->flags &= ~ENGINE_MASK ; - execbuf->flags |= engines[i]; + execbuf->flags |= flags[i];gem_execbuf_wr (fd, execbuf);
@@ -316,9 +317,19 @@ igt_spin_factory(int fd, const struct igt_spin_factory *opts)igt_require_gem (fd);if (opts->engine !=ALL_ENGINES ) { -gem_require_ring (fd, opts->engine); +struct intel_execution_engine2 e; +int class; + +if (!gem_context_lookup_engine (fd, opts->engine, + opts->ctx, &e)) { + class = e.class; + }else { +gem_require_ring (fd, opts->engine); + class =gem_execbuf_flags_to_engine_class (opts->engine); + } +if (opts->flags &IGT_SPIN_POLL_RUN ) -igt_require (gem_can_store_dword (fd, opts->engine)); +igt_require (gem_class_can_store_dword (fd, class)); } spin =spin_create (fd, opts);
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 6/14 test: perf_pmu: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
Use whenever possible gem_engine_can_store_dword() that checks class instead of flags.
Now the __for_each_engine_class_instance and for_each_engine_class_instance are unused, remove them.
--- lib/igt_gt.h | 7 --- tests/perf_pmu.c | 151 ++++++++++++++++++++++++++++------------------- 2 files changed, 91 insertions(+), 67 deletions(-)
lib/igt_gt.h +0 -7
@@ -119,11 +119,4 @@ void gem_require_engine(int gem_fd, igt_require(gem_has_engine(gem_fd, class, instance)); } -#define __for_each_engine_class_instance (e__) \ - for ((e__) = intel_execution_engines2; (e__)->name; (e__)++) - -#define for_each_engine_class_instance (fd__, e__) \ - for ((e__) = intel_execution_engines2; (e__)->name; (e__)++) \ - for_if (gem_has_engine((fd__), (e__)->class, (e__)->instance)) -#endif /* IGT_GT_H */
tests/perf_pmu.c +91 -60
508 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 06/14] test: perf_pmu: use the gem_engine_topology library
Hi Andi,
Could you remove context creation for cpu-hotplug, frequency and interrupts* subtests so that their platform coverage is not reduced? The plan was to s/I915_EXEC_RENDER/I915_EXEC_DEFAULT/ in those tests and rely on rcs0 always being first in the engine map. (Might help to add an assert into the topology library to that effect - so that potential future failures are avoided and easy to debug.)
Regards,
Tvrtko
Quoted 587 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Use whenever possible
gem_engine_can_store_dword()that checks class instead of flags.Now the
__for_each_engine_class_instanceandfor_each_engine_class_instanceare unused, remove them.Suggested-by Tvrtko Ursulin <[email protected]>Signed-off-by Andi Shyti <[email protected]>Cc Tvrtko Ursulin <[email protected]>Reviewed-by Tvrtko Ursulin <[email protected]>--- lib/igt_gt.h | 7 --- tests/perf_pmu.c | 151 ++++++++++++++++++++++++++++------------------- 2 files changed, 91 insertions(+), 67 deletions(-)lib/igt_gt.h +0
-7@@ -119,11 +119,4 @@ void gem_require_engine(int gem_fd, igt_require(gem_has_engine(gem_fd, class, instance)); } -#define __for_each_engine_class_instance (e__) \ - for ((e__) = intel_execution_engines2; (e__)->name; (e__)++) - -#define for_each_engine_class_instance (fd__, e__) \ - for ((e__) = intel_execution_engines2; (e__)->name; (e__)++) \ - for_if (gem_has_engine((fd__), (e__)->class, (e__)->instance)) -#endif /* IGT_GT_H */ tests/perf_pmu.c +89
-57@@ -72,7 +72,7 @@ static int open_group(uint64_t config, int group) }static void -init (int gem_fd,const struct intel_execution_engine2 *e,uint8_t sample) +init (int gem_fd,struct intel_execution_engine2 *e,uint8_t sample) {int fd, err =0 ;bool exists;@@ -82,7 +82,7 @@ init(int gem_fd, const struct intel_execution_engine2 *e, uint8_t sample)if (fd <0 ) err = errno; - exists =gem_has_engine (gem_fd, e->class, e->instance); + exists =gem_context_has_engine (gem_fd,0 , e->flags);if (intel_gen (intel_get_drm_devid (gem_fd)) <6 && sample ==I915_SAMPLE_SEMA ) exists = false;@@ -158,11 +158,6 @@ static unsigned int measured_usleep(unsigned int usec)return igt_nsec_elapsed (&ts); } -static unsigned int e2ring (int gem_fd,const struct intel_execution_engine2 *e) -{ -return gem_class_instance_to_eb_flags (gem_fd, e->class, e->instance); -} -#define TEST_BUSY (1)#define FLAG_SYNC (2)#define TEST_TRAILING_IDLE (4)@@ -170,14 +165,15 @@ static unsigned int e2ring(int gem_fd, const struct intel_execution_engine2 *e)#define FLAG_LONG (16)#define FLAG_HANG (32) -static igt_spin_t *__spin_poll (int fd,uint32_t ctx,unsigned long flags) +static igt_spin_t *__spin_poll (int fd,uint32_t ctx, +struct intel_execution_engine2 *e) {struct igt_spin_factory opts = { .ctx = ctx, - .engine = flags, + .engine = e->flags, }; -if (gem_can_store_dword (fd, flags)) +if (gem_class_can_store_dword (fd, e->class)) opts.flags |=IGT_SPIN_POLL_RUN ;return __igt_spin_factory (fd, &opts);@@ -209,20 +205,34 @@ static unsigned long __spin_wait(int fd, igt_spin_t *spin)return igt_nsec_elapsed (&start); } -static igt_spin_t *__spin_sync (int fd,uint32_t ctx,unsigned long flags) +static igt_spin_t *__spin_sync (int fd,uint32_t ctx, +struct intel_execution_engine2 *e) { -igt_spin_t *spin =__spin_poll (fd, ctx, flags); +igt_spin_t *spin =__spin_poll (fd, ctx, e);__spin_wait (fd, spin);return spin; } -static igt_spin_t *spin_sync (int fd,uint32_t ctx,unsigned long flags) +static igt_spin_t *spin_sync (int fd,uint32_t ctx, +struct intel_execution_engine2 *e) {igt_require_gem (fd); -return __spin_sync (fd, ctx, flags); +return __spin_sync (fd, ctx, e); +} + +static igt_spin_t *spin_sync_flags (int fd,uint32_t ctx,unsigned int flags) +{ +struct intel_execution_engine2 e = { }; + + e.class =gem_execbuf_flags_to_engine_class (flags); + e.instance = (flags & (I915_EXEC_BSD_MASK |I915_EXEC_RING_MASK )) == + (I915_EXEC_BSD |I915_EXEC_BSD_RING2 ) ?1 :0 ; + e.flags = flags; + +return spin_sync (fd, ctx, &e); }static void end_spin (int fd,igt_spin_t *spin,unsigned int flags)@@ -257,7 +267,7 @@ static void end_spin(int fd, igt_spin_t *spin, unsigned int flags) }static void -single (int gem_fd,const struct intel_execution_engine2 *e,unsigned int flags) +single (int gem_fd,struct intel_execution_engine2 *e,unsigned int flags) {unsigned long slept;igt_spin_t *spin;@@ -267,7 +277,7 @@ single(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags) fd =open_pmu (I915_PMU_ENGINE_BUSY (e->class, e->instance));if (flags &TEST_BUSY ) - spin =spin_sync (gem_fd,0 ,e2ring (gem_fd, e)); + spin =spin_sync (gem_fd,0 , e);else spin =NULL ;@@ -303,7 +313,7 @@ single(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags) }static void -busy_start (int gem_fd,const struct intel_execution_engine2 *e) +busy_start (int gem_fd,struct intel_execution_engine2 *e) {unsigned long slept;uint64_t val, ts[2 ];@@ -316,7 +326,7 @@ busy_start(int gem_fd, const struct intel_execution_engine2 *e)*/ sleep (2 ); - spin =__spin_sync (gem_fd,0 ,e2ring (gem_fd, e)); + spin =__spin_sync (gem_fd,0 , e); fd =open_pmu (I915_PMU_ENGINE_BUSY (e->class, e->instance));@@ -338,7 +348,7 @@ busy_start(int gem_fd, const struct intel_execution_engine2 *e)* will depend on the CI systems running it a lot to detect issues. */ static void -busy_double_start (int gem_fd,const struct intel_execution_engine2 *e) +busy_double_start (int gem_fd,struct intel_execution_engine2 *e) {unsigned long slept;uint64_t val, val2, ts[2 ];@@ -347,6 +357,7 @@ busy_double_start(int gem_fd, const struct intel_execution_engine2 *e)int fd; ctx =gem_context_create (gem_fd); +gem_context_set_all_engines (gem_fd, ctx);/* * Defeat the busy stats delayed disable, we need to guarantee we are @@ -359,11 +370,11 @@ busy_double_start(int gem_fd, const struct intel_execution_engine2 *e)* re-submission in execlists mode. Make sure busyness is correctly * reported with the engine busy, and after the engine went idle. */ - spin[0 ] =__spin_sync (gem_fd,0 ,e2ring (gem_fd, e)); + spin[0 ] =__spin_sync (gem_fd,0 , e);usleep (500e3 ); spin[1] = __igt_spin_new(gem_fd, .ctx = ctx, - .engine =e2ring (gem_fd, e)); + .engine = e->flags);/* * Open PMU as fast as possible after the second spin batch in attempt @@ -421,10 +432,10 @@ static void log_busy(unsigned int num_engines, uint64_t *val) }static void -busy_check_all (int gem_fd,const struct intel_execution_engine2 *e, +busy_check_all (int gem_fd,struct intel_execution_engine2 *e,const unsigned int num_engines,unsigned int flags) { -const struct intel_execution_engine2 *e_; +struct intel_execution_engine2 *e_;uint64_t tval[2 ][num_engines];unsigned int busy_idx =0 , i;uint64_t val[num_engines];@@ -434,8 +445,8 @@ busy_check_all(int gem_fd, const struct intel_execution_engine2 *e, i =0 ; fd[0 ] =-1 ; -for_each_engine_class_instance (gem_fd, e_) { -if (e == e_) +__for_each_physical_engine (gem_fd, e_) { +if (e->class == e_->class && e->instance == e_->instance) busy_idx = i; fd[i++] = open_group(I915_PMU_ENGINE_BUSY(e_->class,@@ -445,7 +456,7 @@ busy_check_all(int gem_fd, const struct intel_execution_engine2 *e,igt_assert_eq (i, num_engines); - spin =spin_sync (gem_fd,0 ,e2ring (gem_fd, e)); + spin =spin_sync (gem_fd,0 , e);pmu_read_multi (fd[0 ], num_engines, tval[0 ]); slept =measured_usleep (batch_duration_ns /1000 );if (flags &TEST_TRAILING_IDLE )@@ -478,17 +489,17 @@ __submit_spin(int gem_fd, igt_spin_t *spin,struct drm_i915_gem_execbuffer2 eb = spin->execbuf; eb.flags &= ~(0x3f |I915_EXEC_BSD_MASK ); - eb.flags |=e2ring (gem_fd, e) |I915_EXEC_NO_RELOC ; + eb.flags |= e->flags |I915_EXEC_NO_RELOC ; eb.batch_start_offset += offset;gem_execbuf (gem_fd, &eb); }static void -most_busy_check_all (int gem_fd,const struct intel_execution_engine2 *e, +most_busy_check_all (int gem_fd,struct intel_execution_engine2 *e,const unsigned int num_engines,unsigned int flags) { -const struct intel_execution_engine2 *e_; +struct intel_execution_engine2 *e_;uint64_t tval[2 ][num_engines];uint64_t val[num_engines];int fd[num_engines];@@ -497,13 +508,13 @@ most_busy_check_all(int gem_fd, const struct intel_execution_engine2 *e,unsigned int idle_idx, i; i =0 ; -for_each_engine_class_instance (gem_fd, e_) { -if (e == e_) +__for_each_physical_engine (gem_fd, e_) { +if (e->class == e_->class && e->instance == e_->instance) idle_idx = i;else if (spin)__submit_spin (gem_fd, spin, e_,64 );else - spin =__spin_poll (gem_fd,0 ,e2ring (gem_fd, e_)); + spin =__spin_poll (gem_fd,0 , e_); val[i++] =I915_PMU_ENGINE_BUSY (e_->class, e_->instance); }@@ -545,7 +556,7 @@ static void all_busy_check_all(int gem_fd, const unsigned int num_engines, unsigned int flags) { - const struct intel_execution_engine2 *e; + struct intel_execution_engine2 *e;uint64_t tval[2 ][num_engines];uint64_t val[num_engines];int fd[num_engines];@@ -554,11 +565,11 @@ all_busy_check_all(int gem_fd, const unsigned int num_engines,unsigned int i; i =0 ; -for_each_engine_class_instance (gem_fd, e) { +__for_each_physical_engine (gem_fd, e) {if (spin)__submit_spin (gem_fd, spin, e,64 );else - spin =__spin_poll (gem_fd,0 ,e2ring (gem_fd, e)); + spin =__spin_poll (gem_fd,0 , e); val[i++] =I915_PMU_ENGINE_BUSY (e->class, e->instance); }@@ -592,7 +603,7 @@ all_busy_check_all(int gem_fd, const unsigned int num_engines, }static void -no_sema (int gem_fd,const struct intel_execution_engine2 *e,unsigned int flags) +no_sema (int gem_fd,struct intel_execution_engine2 *e,unsigned int flags) {igt_spin_t *spin;uint64_t val[2 ][2 ];@@ -602,7 +613,7 @@ no_sema(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags)open_group (I915_PMU_ENGINE_WAIT (e->class, e->instance), fd);if (flags &TEST_BUSY ) - spin =spin_sync (gem_fd,0 ,e2ring (gem_fd, e)); + spin =spin_sync (gem_fd,0 , e);else spin =NULL ;@@ -631,7 +642,7 @@ no_sema(int gem_fd, const struct intel_execution_engine2 *e, unsigned int flags)#define MI_SEMAPHORE_SAD_GTE_SDD (1<<12)static void -sema_wait (int gem_fd,const struct intel_execution_engine2 *e, +sema_wait (int gem_fd,struct intel_execution_engine2 *e,unsigned int flags) {struct drm_i915_gem_relocation_entry reloc[2 ] = {};@@ -689,7 +700,7 @@ sema_wait(int gem_fd, const struct intel_execution_engine2 *e, eb.buffer_count =2 ; eb.buffers_ptr =to_user_pointer (obj); - eb.flags =e2ring (gem_fd, e); + eb.flags = e->flags;/** * Start the semaphore wait PMU and after some known time let the above @@ -792,7 +803,7 @@ static int wait_vblank(int fd, union drm_wait_vblank *vbl) }static void -event_wait (int gem_fd,const struct intel_execution_engine2 *e) +event_wait (int gem_fd,struct intel_execution_engine2 *e) {struct drm_i915_gem_exec_object2 obj = { };struct drm_i915_gem_execbuffer2 eb = { };@@ -845,7 +856,7 @@ event_wait(int gem_fd, const struct intel_execution_engine2 *e) eb.buffer_count =1 ; eb.buffers_ptr =to_user_pointer (&obj); - eb.flags =e2ring (gem_fd, e) |I915_EXEC_SECURE ; + eb.flags = e->flags |I915_EXEC_SECURE ;for_each_pipe_with_valid_output (&data.display, p, output) {struct igt_helper_process waiter = { };@@ -917,7 +928,7 @@ event_wait(int gem_fd, const struct intel_execution_engine2 *e) }static void -multi_client (int gem_fd,const struct intel_execution_engine2 *e) +multi_client (int gem_fd,struct intel_execution_engine2 *e) {uint64_t config =I915_PMU_ENGINE_BUSY (e->class, e->instance);unsigned long slept[2 ];@@ -936,7 +947,7 @@ multi_client(int gem_fd, const struct intel_execution_engine2 *e)*/ fd[1 ] =open_pmu (config); - spin =spin_sync (gem_fd,0 ,e2ring (gem_fd, e)); + spin =spin_sync (gem_fd,0 , e); val[0 ] = val[1 ] =__pmu_read_single (fd[0 ], &ts[0 ]); slept[1 ] =measured_usleep (batch_duration_ns /1000 );@@ -1039,6 +1050,7 @@ static void cpu_hotplug(int gem_fd)igt_spin_t *spin[2 ];uint64_t ts[2 ];uint64_t val; +uint32_t ctx;int link[2 ];int fd, ret;int cur =0 ;@@ -1046,14 +1058,17 @@ static void cpu_hotplug(int gem_fd)igt_require (cpu0_hotplug_support ()); + ctx =gem_context_create (gem_fd); + fd =open_pmu (I915_PMU_ENGINE_BUSY (I915_ENGINE_CLASS_RENDER ,0 ));/* * Create two spinners so test can ensure shorter gaps in engine * busyness as it is terminating one and re-starting the other. */ - spin[0] = igt_spin_new(gem_fd, .engine = I915_EXEC_RENDER); - spin[1] = __igt_spin_new(gem_fd, .engine = I915_EXEC_RENDER); + spin[0] = igt_spin_new(gem_fd, .engine = I915_EXEC_RENDER, .ctx = ctx); + spin[1] = __igt_spin_new(gem_fd, .engine = I915_EXEC_RENDER, + .ctx = ctx); val =__pmu_read_single (fd, &ts[0 ]);@@ -1137,6 +1152,7 @@ static void cpu_hotplug(int gem_fd)igt_spin_free (gem_fd, spin[cur]); spin[cur] = __igt_spin_new(gem_fd, + .ctx = ctx, .engine =I915_EXEC_RENDER ); cur ^=1 ; }@@ -1150,6 +1166,7 @@ static void cpu_hotplug(int gem_fd)igt_waitchildren ();close (fd);close (link[0 ]); +gem_context_destroy (gem_fd, ctx);/* Skip if child signals a problem with offlining a CPU. */ igt_skip_on (buf =='s' );@@ -1165,17 +1182,21 @@ test_interrupts(int gem_fd)igt_spin_t *spin[target];struct pollfd pfd;uint64_t idle, busy; +uint32_t ctx;int fence_fd;int fd;gem_quiescent_gpu (gem_fd); + ctx =gem_context_create (gem_fd); + fd =open_pmu (I915_PMU_INTERRUPTS );/* Queue spinning batches. */ for (int i =0 ; i < target; i++) { spin[i] = __igt_spin_new(gem_fd, .engine = I915_EXEC_RENDER, + .ctx = ctx, .flags =IGT_SPIN_FENCE_OUT );if (i ==0 ) { fence_fd = spin[i]->out_fence;@@ -1217,6 +1238,7 @@ test_interrupts(int gem_fd)/* Check at least as many interrupts has been generated. */ busy =pmu_read_single (fd) - idle;close (fd); +gem_context_destroy (gem_fd, ctx);igt_assert_lte (target, busy); }@@ -1229,15 +1251,19 @@ test_interrupts_sync(int gem_fd)igt_spin_t *spin[target];struct pollfd pfd;uint64_t idle, busy; +uint32_t ctx;int fd;gem_quiescent_gpu (gem_fd); + ctx =gem_context_create (gem_fd); + fd =open_pmu (I915_PMU_INTERRUPTS );/* Queue spinning batches. */ for (int i =0 ; i < target; i++) spin[i] = __igt_spin_new(gem_fd, + .ctx = ctx, .flags =IGT_SPIN_FENCE_OUT );/* Wait for idle state. */ @@ -1262,6 +1288,7 @@ test_interrupts_sync(int gem_fd)/* Check at least as many interrupts has been generated. */ busy =pmu_read_single (fd) - idle;close (fd); +gem_context_destroy (gem_fd, ctx);igt_assert_lte (target, busy); }@@ -1274,6 +1301,9 @@ test_frequency(int gem_fd)double min[2 ], max[2 ];igt_spin_t *spin;int fd, sysfs; +uint32_t ctx; + + ctx =gem_context_create (gem_fd); sysfs =igt_sysfs_open (gem_fd);igt_require (sysfs >=0 );@@ -1301,7 +1331,7 @@ test_frequency(int gem_fd)igt_require (igt_sysfs_get_u32 (sysfs,"gt_boost_freq_mhz" ) == min_freq);gem_quiescent_gpu (gem_fd);/* Idle to be sure the change takes effect */ - spin =spin_sync (gem_fd,0 ,I915_EXEC_RENDER ); + spin =spin_sync_flags (gem_fd, ctx,I915_EXEC_RENDER ); slept =pmu_read_multi (fd,2 , start);measured_usleep (batch_duration_ns /1000 );@@ -1327,7 +1357,7 @@ test_frequency(int gem_fd)igt_require (igt_sysfs_get_u32 (sysfs,"gt_min_freq_mhz" ) == max_freq);gem_quiescent_gpu (gem_fd); - spin =spin_sync (gem_fd,0 ,I915_EXEC_RENDER ); + spin =spin_sync_flags (gem_fd, ctx,I915_EXEC_RENDER ); slept =pmu_read_multi (fd,2 , start);measured_usleep (batch_duration_ns /1000 );@@ -1348,6 +1378,8 @@ test_frequency(int gem_fd) min_freq, igt_sysfs_get_u32(sysfs, "gt_min_freq_mhz"));close (fd); +gem_context_destroy (gem_fd, ctx); +igt_info ("Min frequency: requested %.1f, actual %.1f\n" , min[0 ], min[1 ]); igt_info("Max frequency: requested %.1f, actual %.1f\n",@@ -1448,7 +1480,7 @@ test_rc6(int gem_fd, unsigned int flags) }static void -test_enable_race (int gem_fd,const struct intel_execution_engine2 *e) +test_enable_race (int gem_fd,struct intel_execution_engine2 *e) {uint64_t config =I915_PMU_ENGINE_BUSY (e->class, e->instance);struct igt_helper_process engine_load = { };@@ -1458,14 +1490,14 @@ test_enable_race(int gem_fd, const struct intel_execution_engine2 *e)int fd;igt_require (gem_has_execlists (gem_fd)); -igt_require (gem_has_engine (gem_fd, e->class, e->instance)); +igt_require (gem_context_has_engine (gem_fd,0 , e->flags)); obj.handle =gem_create (gem_fd,4096 );gem_write (gem_fd, obj.handle,0 , &bbend,sizeof (bbend)); eb.buffer_count =1 ; eb.buffers_ptr =to_user_pointer (&obj); - eb.flags =e2ring (gem_fd, e); + eb.flags = e->flags;/* * This test is probabilistic so run in a few times to increase the @@ -1512,7 +1544,7 @@ test_enable_race(int gem_fd, const struct intel_execution_engine2 *e) __assert_within(x, ref, tolerance, tolerance)static void -accuracy (int gem_fd,const struct intel_execution_engine2 *e, +accuracy (int gem_fd,struct intel_execution_engine2 *e,unsigned long target_busy_pct,unsigned long target_iters) {@@ -1562,7 +1594,7 @@ accuracy(int gem_fd, const struct intel_execution_engine2 *e,igt_spin_t *spin;/* Allocate our spin batch and idle it. */ - spin = igt_spin_new(gem_fd, .engine = e2ring(gem_fd, e)); + spin = igt_spin_new(gem_fd, .engine = e->flags);igt_spin_end (spin);gem_sync (gem_fd, spin->handle);@@ -1666,7 +1698,7 @@ igt_mainI915_PMU_LAST -__I915_PMU_OTHER (0 ) +1 ;unsigned int num_engines =0 ;int fd =-1 ; -const struct intel_execution_engine2 *e; +struct intel_execution_engine2 *e;unsigned int i; igt_fixture {@@ -1675,7 +1707,7 @@ igt_mainigt_require_gem (fd);igt_require (i915_type_id () >0 ); -for_each_engine_class_instance (fd, e) +__for_each_physical_engine (fd, e) num_engines++; }@@ -1685,7 +1717,7 @@ igt_main igt_subtest("invalid-init")invalid_init (); -__for_each_engine_class_instance (e) { +__for_each_physical_engine (fd, e) {const unsigned int pct[] = {2 ,50 ,98 };/** @@ -1703,7 +1735,7 @@ igt_main igt_subtest_group { igt_fixture { -gem_require_engine (fd, e->class, e->instance); +gem_context_has_engine (fd,0 , e->flags); }/** @@ -1889,12 +1921,11 @@ igt_maingem_quiescent_gpu (fd); } -__for_each_engine_class_instance (e) { +__for_each_physical_engine (render_fd, e) {
tests/perf_pmu.c igt_main · line 1931
Quoted 10 lines
tests/perf_pmu.c +2
-3igt_subtest_group { igt_fixture { -gem_require_engine (render_fd, - e->class, - e->instance); +gem_context_has_engine (render_fd, +0 , e->flags); }igt_subtest_f ("render-node-busy-%s" , e->name)
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 06/14] test: perf_pmu: use the gem_engine_topology library
In reply to Andi ShytiQuoting Andi Shyti (2019-05-13 01:45:00)
tests/perf_pmu.c static int open_group(uint64_t config, int group) · line 75
Quoted 3 lines
static void
tests/perf_pmu.c +1
-1-init(int gem_fd, const struct intel_execution_engine2 *e, uint8_t sample) +init(int gem_fd, struct intel_execution_engine2 *e, uint8_t sample)
There's a lot of const dropping where const seems appropriate throughout this series? Did I misread and there's a reason throughout why we are rewriting the caller's struct?
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 06/14] test: perf_pmu: use the gem_engine_topology library
Hi Chris,
Quoted 8 lines · Chris Wilson
Quoting Andi Shyti (2019-05-13 01:45:00)
tests/perf_pmu.c static int open_group(uint64_t config, int group) · line 75
Quoted 3 lines
static void
tests/perf_pmu.c +1
-1-init(int gem_fd, const struct intel_execution_engine2 *e, uint8_t sample) +init(int gem_fd, struct intel_execution_engine2 *e, uint8_t sample)There's a lot of const dropping where const seems appropriate throughout this series? Did I misread and there's a reason throughout why we are rewriting the caller's struct?
'const' is not needed anymore... why keep variables const while we are not declaring them const?
Ther reason in a first place for having 'const' all around was because we were looping through the "const struct intel_execution_engine2 intel_execution_engines2[]" array, which we are not doing anymore.
I see 'const' as somehow "type-incoherent".
Andi
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 06/14] test: perf_pmu: use the gem_engine_topology library
Quoting Andi Shyti (2019-05-13 15:15:34)
Quoted 12 lines
Hi Chris,
Quoted 8 lines · Chris Wilson
Quoting Andi Shyti (2019-05-13 01:45:00)
tests/perf_pmu.c static int open_group(uint64_t config, int group) · line 75
Quoted 3 lines
static void
tests/perf_pmu.c +1
-1-init(int gem_fd, const struct intel_execution_engine2 *e, uint8_t sample) +init(int gem_fd, struct intel_execution_engine2 *e, uint8_t sample)There's a lot of const dropping where const seems appropriate throughout this series? Did I misread and there's a reason throughout why we are rewriting the caller's struct?
Quoted 2 lines
'const' is not needed anymore... why keep variables const while we are not declaring them const?
It's a reminder to the programmer that the pointer is read only; it serves as documentation that we are not allowed to write into the struct.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 7/14 test/i915: gem_busy: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/gem_busy.c | 133 ++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 82 deletions(-)
tests/i915/gem_busy.c +51 -82
@@ -66,22 +66,9 @@ static void __gem_busy(int fd, *read = busy.busy >>16 ; } -static uint32_t ring_to_class (unsigned int ring) -{ -uint32_t class[] = { - [I915_EXEC_DEFAULT ] =I915_ENGINE_CLASS_RENDER , - [I915_EXEC_RENDER ] =I915_ENGINE_CLASS_RENDER , - [I915_EXEC_BLT ] =I915_ENGINE_CLASS_COPY , - [I915_EXEC_BSD ] =I915_ENGINE_CLASS_VIDEO , - [I915_EXEC_VEBOX ] =I915_ENGINE_CLASS_VIDEO_ENHANCE , - }; -igt_assert (ring <ARRAY_SIZE (class)); -return class[ring]; -} -static bool exec_noop (int fd,uint32_t *handles, -unsigned ring, +unsigned flags,bool write) {struct drm_i915_gem_execbuffer2 execbuf;
@@ -97,9 +84,9 @@ static bool exec_noop(int fd,memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (exec); execbuf.buffer_count =3 ; - execbuf.flags = ring; -igt_debug ("Queuing handle for %s on ring %d\n" , - write ?"writing" :"reading" , ring &0x7 ); + execbuf.flags = flags; +igt_debug ("Queuing handle for %s on engine %d\n" , + write ?"writing" :"reading" , flags);return __gem_execbuf (fd, &execbuf) ==0 ; }
@@ -110,17 +97,16 @@ static bool still_busy(int fd, uint32_t handle)return write; } -static void semaphore (int fd,unsigned ring,uint32_t flags) +static void semaphore (int fd,const struct intel_execution_engine2 *e) {uint32_t bbe =MI_BATCH_BUFFER_END ; -const unsigned uabi =ring_to_class (ring &63 ); +const unsigned uabi = e->class;igt_spin_t *spin;uint32_t handle[3 ];uint32_t read, write;uint32_t active;unsigned i; - -gem_require_ring (fd, ring | flags); +struct intel_execution_engine2 *__e; handle[TEST ] =gem_create (fd,4096 ); handle[BATCH ] =gem_create (fd,4096 );
@@ -129,18 +115,18 @@ static void semaphore(int fd, unsigned ring, uint32_t flags)/* Create a long running batch which we can use to hog the GPU */ handle[BUSY ] =gem_create (fd,4096 ); spin = igt_spin_new(fd, - .engine = ring, + .engine = e->flags, .dependency = handle[BUSY ]);/* Queue a batch after the busy, it should block and remain "busy" */ -igt_assert (exec_noop (fd, handle, ring | flags, false)); +igt_assert (exec_noop (fd, handle, e->flags, false));igt_assert (still_busy (fd, handle[BUSY ]));__gem_busy (fd, handle[TEST ], &read, &write);igt_assert_eq (read,1 << uabi);igt_assert_eq (write,0 );/* Requeue with a write */ -igt_assert (exec_noop (fd, handle, ring | flags, true)); +igt_assert (exec_noop (fd, handle, e->flags, true));igt_assert (still_busy (fd, handle[BUSY ]));__gem_busy (fd, handle[TEST ], &read, &write);igt_assert_eq (read,1 << uabi);
@@ -148,12 +134,13 @@ static void semaphore(int fd, unsigned ring, uint32_t flags)/* Now queue it for a read across all available rings */ active =0 ; -for (i =I915_EXEC_RENDER ; i <=I915_EXEC_VEBOX ; i++) { -if (exec_noop (fd, handle, i | flags, false)) - active |=1 <<ring_to_class (i); +__for_each_physical_engine (fd, __e) { +if (exec_noop (fd, handle, __e->flags, false)) + active |=1 << __e->class; }igt_assert (still_busy (fd, handle[BUSY ]));__gem_busy (fd, handle[TEST ], &read, &write); +printf ("ANDIIII: read = 0x%x, active = 0x%x\n" , read, active);igt_assert_eq (read, active);igt_assert_eq (write,1 + uabi);/* from the earlier write */
@@ -173,7 +160,7 @@ static void semaphore(int fd, unsigned ring, uint32_t flags)#define PARALLEL 1#define HANG 2 -static void one (int fd,unsigned ring,unsigned test_flags) +static void one (int fd,const struct intel_execution_engine2 *e,unsigned test_flags) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 obj[2 ];
@@ -182,7 +169,7 @@ static void one(int fd, unsigned ring, unsigned test_flags)struct drm_i915_gem_relocation_entry store[1024 +1 ];struct drm_i915_gem_execbuffer2 execbuf;unsigned size =ALIGN (ARRAY_SIZE (store)*16 +4 ,4096 ); -const unsigned uabi =ring_to_class (ring &63 ); +const unsigned uabi = e->class;uint32_t read[2 ], write[2 ];struct timespec tv;uint32_t *batch, *bbe;
@@ -191,7 +178,7 @@ static void one(int fd, unsigned ring, unsigned test_flags)memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (obj); execbuf.buffer_count =2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;
@@ -263,17 +250,18 @@ static void one(int fd, unsigned ring, unsigned test_flags)__gem_busy (fd, obj[BATCH ].handle, &read[BATCH ], &write[BATCH ]);if (test_flags &PARALLEL ) { -unsigned other; +struct intel_execution_engine2 *e2; -for_each_physical_engine (fd, other) { -if (other == ring) +__for_each_physical_engine (fd, e2) { +if (e2->class == e->class && + e2->instance == e->instance)continue ; -if (!gem_can_store_dword (fd, other)) +if (!gem_class_can_store_dword (fd, e->class))continue ; -igt_debug ("Testing %s in parallel\n" , e__->name); -one (fd, other,0 ); +igt_debug ("Testing %s in parallel\n" , e2->name); +one (fd, e2,0 ); } }
@@ -439,11 +427,11 @@ static bool has_extended_busy_ioctl(int fd)return read !=0 ; } -static void basic (int fd,unsigned ring,unsigned flags) +static void basic (int fd,const struct intel_execution_engine2 *e,bool hang) {igt_spin_t *spin = igt_spin_new(fd, - .engine = ring, + .engine = e->flags, .flags =IGT_SPIN_NO_PREEMPTION );struct timespec tv;int timeout;
@@ -452,7 +440,7 @@ static void basic(int fd, unsigned ring, unsigned flags) busy =gem_bo_busy (fd, spin->handle); timeout =120 ; -if ((flags &HANG ) ==0 ) { +if (!hang) {igt_spin_end (spin); timeout =1 ; }
@@ -465,7 +453,7 @@ static void basic(int fd, unsigned ring, unsigned flags)igt_debugfs_dump (fd,"i915_hangcheck_info" );igt_assert_f (igt_seconds_elapsed (&tv) < timeout,"%s batch did not complete within %ds\n" , - flags &HANG ?"Hanging" :"Normal" , + hang ?"Hanging" :"Normal" , timeout); } }
@@ -475,13 +463,14 @@ static void basic(int fd, unsigned ring, unsigned flags) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ; igt_fixture { fd =drm_open_driver_master (DRIVER_INTEL );igt_require_gem (fd); -igt_require (gem_can_store_dword (fd,0 )); +igt_require (gem_class_can_store_dword (fd, +I915_ENGINE_CLASS_RENDER )); } igt_subtest_group {
@@ -489,14 +478,13 @@ igt_mainigt_fork_hang_detector (fd); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_group {igt_subtest_f ("%sbusy-%s" , - e->exec_id ==0 ?"basic-" :"" , - e->name) { -igt_require (gem_has_ring (fd, e->exec_id | e->flags)); + e->class ==I915_ENGINE_CLASS_RENDER + ? "basic-" : "", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,0 ); +basic (fd, e, false); } } }
@@ -507,31 +495,22 @@ igt_maingem_require_mmap_wc (fd); } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-%s", e->name) { -igt_require (gem_ring_has_physical_engine (fd, e->exec_id | e->flags)); -igt_require (gem_can_store_dword (fd, e->exec_id | e->flags)); +igt_require (gem_class_can_store_dword (fd, + e->class));gem_quiescent_gpu (fd); -one (fd, e->exec_id | e->flags,0 ); +one (fd, e,0 );gem_quiescent_gpu (fd); } } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-parallel-%s", e->name) { -igt_require (gem_ring_has_physical_engine (fd, e->exec_id | e->flags)); -igt_require (gem_can_store_dword (fd, e->exec_id | e->flags)); +igt_require (gem_class_can_store_dword (fd, e->class));gem_quiescent_gpu (fd); -one (fd, e->exec_id | e->flags,PARALLEL ); +one (fd, e,PARALLEL );gem_quiescent_gpu (fd); } }
@@ -543,13 +522,9 @@ igt_mainigt_require (has_semaphores (fd)); } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-semaphore-%s", e->name) -semaphore (fd, e->exec_id, e->flags); +semaphore (fd, e); } }
@@ -568,14 +543,13 @@ igt_main hang =igt_allow_hang (fd,0 ,0 ); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) {igt_subtest_f ("%shang-%s" , - e->exec_id ==0 ?"basic-" :"" , - e->name) { + e->class ==I915_ENGINE_CLASS_RENDER + ? "basic-" : "", e->name) {igt_skip_on_simulation (); -igt_require (gem_has_ring (fd, e->exec_id | e->flags));gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG ); +basic (fd, e, true); } }
@@ -585,18 +559,13 @@ igt_maingem_require_mmap_wc (fd); } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-hang-%s", e->name) {igt_skip_on_simulation (); -igt_require (gem_ring_has_physical_engine (fd, e->exec_id | e->flags)); -igt_require (gem_can_store_dword (fd, e->exec_id | e->flags)); +igt_require (gem_class_can_store_dword (fd, e->class));gem_quiescent_gpu (fd); -one (fd, e->exec_id | e->flags,HANG ); +one (fd, e,HANG );gem_quiescent_gpu (fd); } }
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 07/14] test/i915: gem_busy: use the gem_engine_topology library
Quoted 60 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>--- tests/i915/gem_busy.c | 133 ++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 82 deletions(-)tests/i915/gem_busy.c +5
-18@@ -66,22 +66,9 @@ static void __gem_busy(int fd, *read = busy.busy >>16 ; } -static uint32_t ring_to_class (unsigned int ring) -{ -uint32_t class[] = { - [I915_EXEC_DEFAULT ] =I915_ENGINE_CLASS_RENDER , - [I915_EXEC_RENDER ] =I915_ENGINE_CLASS_RENDER , - [I915_EXEC_BLT ] =I915_ENGINE_CLASS_COPY , - [I915_EXEC_BSD ] =I915_ENGINE_CLASS_VIDEO , - [I915_EXEC_VEBOX ] =I915_ENGINE_CLASS_VIDEO_ENHANCE , - }; -igt_assert (ring <ARRAY_SIZE (class)); -return class[ring]; -} -static bool exec_noop (int fd,uint32_t *handles, -unsigned ring, +unsigned flags,bool write) {struct drm_i915_gem_execbuffer2 execbuf;@@ -97,9 +84,9 @@ static bool exec_noop(int fd,memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (exec); execbuf.buffer_count =3 ; - execbuf.flags = ring; -igt_debug ("Queuing handle for %s on ring %d\n" , - write ?"writing" :"reading" , ring &0x7 ); + execbuf.flags = flags; +igt_debug ("Queuing handle for %s on engine %d\n" , + write ?"writing" :"reading" , flags);return __gem_execbuf (fd, &execbuf) ==0 ; }@@ -110,17 +97,16 @@ static bool still_busy(int fd, uint32_t handle)return write; } -static void semaphore (int fd,unsigned ring,uint32_t flags) +static void semaphore (int fd,const struct intel_execution_engine2 *e) {uint32_t bbe =MI_BATCH_BUFFER_END ;
tests/i915/gem_busy.c static bool still_busy(int fd, uint32_t handle) · line 109
Quoted 10 lines
tests/i915/gem_busy.c +2
-3-const unsigned uabi =ring_to_class (ring &63 ); +const unsigned uabi = e->class;igt_spin_t *spin;uint32_t handle[3 ];uint32_t read, write;uint32_t active;unsigned i; - -gem_require_ring (fd, ring | flags); +struct intel_execution_engine2 *__e;
Nitpick - widest at the bottom reads untidy.
Quoted 29 lines
tests/i915/gem_busy.c +3
-3handle[TEST ] =gem_create (fd,4096 ); handle[BATCH ] =gem_create (fd,4096 );@@ -129,18 +115,18 @@ static void semaphore(int fd, unsigned ring, uint32_t flags)/* Create a long running batch which we can use to hog the GPU */ handle[BUSY ] =gem_create (fd,4096 ); spin = igt_spin_new(fd, - .engine = ring, + .engine = e->flags, .dependency = handle[BUSY ]);/* Queue a batch after the busy, it should block and remain "busy" */ -igt_assert (exec_noop (fd, handle, ring | flags, false)); +igt_assert (exec_noop (fd, handle, e->flags, false));igt_assert (still_busy (fd, handle[BUSY ]));__gem_busy (fd, handle[TEST ], &read, &write);igt_assert_eq (read,1 << uabi);igt_assert_eq (write,0 );/* Requeue with a write */ -igt_assert (exec_noop (fd, handle, ring | flags, true)); +igt_assert (exec_noop (fd, handle, e->flags, true));igt_assert (still_busy (fd, handle[BUSY ]));__gem_busy (fd, handle[TEST ], &read, &write);igt_assert_eq (read,1 << uabi);@@ -148,12 +134,13 @@ static void semaphore(int fd, unsigned ring, uint32_t flags)/* Now queue it for a read across all available rings */ active =0 ;
tests/i915/gem_busy.c static void semaphore(int fd, unsigned ring, uint32_t flags) · line 143
Quoted 10 lines
tests/i915/gem_busy.c +4
-3-for (i =I915_EXEC_RENDER ; i <=I915_EXEC_VEBOX ; i++) { -if (exec_noop (fd, handle, i | flags, false)) - active |=1 <<ring_to_class (i); +__for_each_physical_engine (fd, __e) { +if (exec_noop (fd, handle, __e->flags, false)) + active |=1 << __e->class; }igt_assert (still_busy (fd, handle[BUSY ]));__gem_busy (fd, handle[TEST ], &read, &write); +printf ("ANDIIII: read = 0x%x, active = 0x%x\n" , read, active);
Snip. :)
Quoted 56 lines
tests/i915/gem_busy.c +10
-9igt_assert_eq (read, active);igt_assert_eq (write,1 + uabi);/* from the earlier write */ @@ -173,7 +160,7 @@ static void semaphore(int fd, unsigned ring, uint32_t flags)#define PARALLEL 1#define HANG 2 -static void one (int fd,unsigned ring,unsigned test_flags) +static void one (int fd,const struct intel_execution_engine2 *e,unsigned test_flags) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 obj[2 ];@@ -182,7 +169,7 @@ static void one(int fd, unsigned ring, unsigned test_flags)struct drm_i915_gem_relocation_entry store[1024 +1 ];struct drm_i915_gem_execbuffer2 execbuf;unsigned size =ALIGN (ARRAY_SIZE (store)*16 +4 ,4096 ); -const unsigned uabi =ring_to_class (ring &63 ); +const unsigned uabi = e->class;uint32_t read[2 ], write[2 ];struct timespec tv;uint32_t *batch, *bbe;@@ -191,7 +178,7 @@ static void one(int fd, unsigned ring, unsigned test_flags)memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (obj); execbuf.buffer_count =2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;@@ -263,17 +250,18 @@ static void one(int fd, unsigned ring, unsigned test_flags)__gem_busy (fd, obj[BATCH ].handle, &read[BATCH ], &write[BATCH ]);if (test_flags &PARALLEL ) { -unsigned other; +struct intel_execution_engine2 *e2; -for_each_physical_engine (fd, other) { -if (other == ring) +__for_each_physical_engine (fd, e2) { +if (e2->class == e->class && + e2->instance == e->instance)continue ; -if (!gem_can_store_dword (fd, other)) +if (!gem_class_can_store_dword (fd, e->class))continue ; -igt_debug ("Testing %s in parallel\n" , e__->name); -one (fd, other,0 ); +igt_debug ("Testing %s in parallel\n" , e2->name); +one (fd, e2,0 ); } }
tests/i915/gem_busy.c static bool has_extended_busy_ioctl(int fd) · line 430
Quoted 5 lines
tests/i915/gem_busy.c +1
-1@@ -439,11 +427,11 @@ static bool has_extended_busy_ioctl(int fd)return read !=0 ; } -static void basic (int fd,unsigned ring,unsigned flags) +static void basic (int fd,const struct intel_execution_engine2 *e,bool hang)
I would have left the flags for a smaller diff but okay.
Quoted 149 lines
tests/i915/gem_busy.c +24
-42{igt_spin_t *spin = igt_spin_new(fd, - .engine = ring, + .engine = e->flags, .flags =IGT_SPIN_NO_PREEMPTION );struct timespec tv;int timeout;@@ -452,7 +440,7 @@ static void basic(int fd, unsigned ring, unsigned flags) busy =gem_bo_busy (fd, spin->handle); timeout =120 ; -if ((flags &HANG ) ==0 ) { +if (!hang) {igt_spin_end (spin); timeout =1 ; }@@ -465,7 +453,7 @@ static void basic(int fd, unsigned ring, unsigned flags)igt_debugfs_dump (fd,"i915_hangcheck_info" );igt_assert_f (igt_seconds_elapsed (&tv) < timeout,"%s batch did not complete within %ds\n" , - flags &HANG ?"Hanging" :"Normal" , + hang ?"Hanging" :"Normal" , timeout); } }@@ -475,13 +463,14 @@ static void basic(int fd, unsigned ring, unsigned flags) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ; igt_fixture { fd =drm_open_driver_master (DRIVER_INTEL );igt_require_gem (fd); -igt_require (gem_can_store_dword (fd,0 )); +igt_require (gem_class_can_store_dword (fd, +I915_ENGINE_CLASS_RENDER )); } igt_subtest_group {@@ -489,14 +478,13 @@ igt_mainigt_fork_hang_detector (fd); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_group {igt_subtest_f ("%sbusy-%s" , - e->exec_id ==0 ?"basic-" :"" , - e->name) { -igt_require (gem_has_ring (fd, e->exec_id | e->flags)); + e->class ==I915_ENGINE_CLASS_RENDER + ? "basic-" : "", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,0 ); +basic (fd, e, false); } } }@@ -507,31 +495,22 @@ igt_maingem_require_mmap_wc (fd); } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-%s", e->name) { -igt_require (gem_ring_has_physical_engine (fd, e->exec_id | e->flags)); -igt_require (gem_can_store_dword (fd, e->exec_id | e->flags)); +igt_require (gem_class_can_store_dword (fd, + e->class));gem_quiescent_gpu (fd); -one (fd, e->exec_id | e->flags,0 ); +one (fd, e,0 );gem_quiescent_gpu (fd); } } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-parallel-%s", e->name) { -igt_require (gem_ring_has_physical_engine (fd, e->exec_id | e->flags)); -igt_require (gem_can_store_dword (fd, e->exec_id | e->flags)); +igt_require (gem_class_can_store_dword (fd, e->class));gem_quiescent_gpu (fd); -one (fd, e->exec_id | e->flags,PARALLEL ); +one (fd, e,PARALLEL );gem_quiescent_gpu (fd); } }@@ -543,13 +522,9 @@ igt_mainigt_require (has_semaphores (fd)); } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-semaphore-%s", e->name) -semaphore (fd, e->exec_id, e->flags); +semaphore (fd, e); } }@@ -568,14 +543,13 @@ igt_main hang =igt_allow_hang (fd,0 ,0 ); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) {igt_subtest_f ("%shang-%s" , - e->exec_id ==0 ?"basic-" :"" , - e->name) { + e->class ==I915_ENGINE_CLASS_RENDER + ? "basic-" : "", e->name) {igt_skip_on_simulation (); -igt_require (gem_has_ring (fd, e->exec_id | e->flags));gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG ); +basic (fd, e, true); } }@@ -585,18 +559,13 @@ igt_maingem_require_mmap_wc (fd); } -for (e = intel_execution_engines; e->name; e++) { -/* default exec-id is purely symbolic */ -if (e->exec_id ==0 ) -continue ; - +__for_each_physical_engine (fd, e) { igt_subtest_f("extended-hang-%s", e->name) {igt_skip_on_simulation ();
tests/i915/gem_busy.c igt_main · line 571
Quoted 10 lines
tests/i915/gem_busy.c +2
-3-igt_require (gem_ring_has_physical_engine (fd, e->exec_id | e->flags)); -igt_require (gem_can_store_dword (fd, e->exec_id | e->flags)); +igt_require (gem_class_can_store_dword (fd, e->class));gem_quiescent_gpu (fd); -one (fd, e->exec_id | e->flags,HANG ); +one (fd, e,HANG );gem_quiescent_gpu (fd); } }
Looks okay. With the debug printf out:
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 07/14] test/i915: gem_busy: use the gem_engine_topology library
Quoting Tvrtko Ursulin (2019-05-13 11:42:49)
Quoted 6 lines · Andi Shyti
tests/i915/gem_busy.c static bool has_extended_busy_ioctl(int fd) · line 430
Quoted 2 lines
tests/i915/gem_busy.c +1
-1-static void basic (int fd,unsigned ring,unsigned flags) +static void basic (int fd,const struct intel_execution_engine2 *e,bool hang)I would have left the flags for a smaller diff but okay.
Rather prefer flags over multiple bool args, and certainly do not randomly replace flags with bools. flags are much easier to read than multiple booleans.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 8/14 test/i915: gem_cs_tlb: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/gem_cs_tlb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/i915/gem_cs_tlb.c +4 -4
@@ -140,7 +140,7 @@ static void run_on_ring(int fd, unsigned ring_id, const char *ring_name) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ;igt_skip_on_simulation ();
@@ -150,9 +150,9 @@ igt_mainigt_require_gem (fd); } -for (e = intel_execution_engines; e->name; e++) - igt_subtest_f("%s%s", e->exec_id ? "" : "basic-", e->name) -run_on_ring (fd, e->exec_id | e->flags, e->name); +__for_each_physical_engine (fd, e) + igt_subtest_f("%s", e->name) +run_on_ring (fd, e->flags, e->name);igt_fixture close (fd );
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 08/14] test/i915: gem_cs_tlb: use the gem_engine_topology library
Quoted 29 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>--- tests/i915/gem_cs_tlb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)tests/i915/gem_cs_tlb.c +1
-1@@ -140,7 +140,7 @@ static void run_on_ring(int fd, unsigned ring_id, const char *ring_name) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ;igt_skip_on_simulation ();@@ -150,9 +150,9 @@ igt_mainigt_require_gem (fd); }
tests/i915/gem_cs_tlb.c igt_main · line 158
Quoted 10 lines
tests/i915/gem_cs_tlb.c +3
-3-for (e = intel_execution_engines; e->name; e++) - igt_subtest_f("%s%s", e->exec_id ? "" : "basic-", e->name) -run_on_ring (fd, e->exec_id | e->flags, e->name); +__for_each_physical_engine (fd, e) + igt_subtest_f("%s", e->name) +run_on_ring (fd, e->flags, e->name);igt_fixture close (fd );
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 9/14 test/i915: gem_ctx_exec: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/gem_ctx_exec.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
tests/i915/gem_ctx_exec.c +7 -8
@@ -111,7 +111,8 @@ static void big_exec(int fd, uint32_t handle, int ring)gem_sync (fd, handle); } -static void invalid_context (int fd,unsigned ring,uint32_t handle) +static void invalid_context (int fd,struct intel_execution_engine2 *e, +uint32_t handle) {struct drm_i915_gem_exec_object2 obj = { .handle = handle,
@@ -119,7 +120,7 @@ static void invalid_context(int fd, unsigned ring, uint32_t handle)struct drm_i915_gem_execbuffer2 execbuf = { .buffers_ptr =to_user_pointer (&obj), .buffer_count =1 , - .flags = ring, + .flags = e->flags, };unsigned int i;uint32_t ctx;
@@ -198,7 +199,7 @@ static void norecovery(int i915) igt_main {const uint32_t batch[2 ] = {0 ,MI_BATCH_BUFFER_END }; -const struct intel_execution_engine *e; +struct intel_execution_engine2 *e;uint32_t handle;uint32_t ctx_id;int fd;
@@ -228,11 +229,9 @@ igt_maingem_sync (fd, handle); } -for (e = intel_execution_engines; e->name; e++) { - igt_subtest_f("basic-invalid-context-%s", e->name) { -gem_require_ring (fd, e->exec_id | e->flags); -invalid_context (fd, e->exec_id | e->flags, handle); - } +__for_each_physical_engine (fd, e) { + igt_subtest_f("basic-invalid-context-%s", e->name) +invalid_context (fd, e, handle); }igt_subtest ("eviction" )
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 09/14] test/i915: gem_ctx_exec: use the gem_engine_topology library
Quoted 37 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>Cc Tvrtko Ursulin <[email protected]>Cc Daniel Vetter <[email protected]>--- tests/i915/gem_ctx_exec.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)tests/i915/gem_ctx_exec.c +3
-2@@ -111,7 +111,8 @@ static void big_exec(int fd, uint32_t handle, int ring)gem_sync (fd, handle); } -static void invalid_context (int fd,unsigned ring,uint32_t handle) +static void invalid_context (int fd,struct intel_execution_engine2 *e, +uint32_t handle) {struct drm_i915_gem_exec_object2 obj = { .handle = handle,@@ -119,7 +120,7 @@ static void invalid_context(int fd, unsigned ring, uint32_t handle)struct drm_i915_gem_execbuffer2 execbuf = { .buffers_ptr =to_user_pointer (&obj), .buffer_count =1 , - .flags = ring, + .flags = e->flags, };unsigned int i;uint32_t ctx;
tests/i915/gem_ctx_exec.c static void norecovery(int i915) · line 202
Quoted 5 lines
tests/i915/gem_ctx_exec.c +1
-1@@ -198,7 +199,7 @@ static void norecovery(int i915) igt_main {const uint32_t batch[2 ] = {0 ,MI_BATCH_BUFFER_END }; -const struct intel_execution_engine *e; +struct intel_execution_engine2 *e;
I think if you added const new parameter in invalid_context this one here would be able to stay. It would have been nicer I think but never mind.
Quoted 9 lines
tests/i915/gem_ctx_exec.c +0
-1uint32_t handle;uint32_t ctx_id;int fd;@@ -228,11 +229,9 @@ igt_maingem_sync (fd, handle); } -for (e = intel_execution_engines; e->name; e++) {
tests/i915/gem_ctx_exec.c igt_main · line 237
Quoted 10 lines
tests/i915/gem_ctx_exec.c +3
-4- igt_subtest_f("basic-invalid-context-%s", e->name) { -gem_require_ring (fd, e->exec_id | e->flags); -invalid_context (fd, e->exec_id | e->flags, handle); - } +__for_each_physical_engine (fd, e) { + igt_subtest_f("basic-invalid-context-%s", e->name) +invalid_context (fd, e, handle); }igt_subtest ("eviction" )
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 10/14 test/i915: gem_exec_basic: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/gem_exec_basic.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
tests/i915/gem_exec_basic.c +14 -14
@@ -42,12 +42,12 @@ static void batch_fini(int fd, uint32_t handle)gem_close (fd, handle); } -static void noop (int fd,unsigned ring) +static void noop (int fd,uint64_t flags) {struct drm_i915_gem_execbuffer2 execbuf;struct drm_i915_gem_exec_object2 exec; -gem_require_ring (fd, ring); +gem_require_ring (fd, flags);memset (&exec,0 ,sizeof (exec));
@@ -56,18 +56,18 @@ static void noop(int fd, unsigned ring)memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (&exec); execbuf.buffer_count =1 ; - execbuf.flags = ring; + execbuf.flags = flags;gem_execbuf (fd, &execbuf);batch_fini (fd, exec.handle); } -static void readonly (int fd,unsigned ring) +static void readonly (int fd,uint64_t flags) {struct drm_i915_gem_execbuffer2 *execbuf;struct drm_i915_gem_exec_object2 exec; -gem_require_ring (fd, ring); +gem_require_ring (fd, flags);memset (&exec,0 ,sizeof (exec)); exec.handle =batch_create (fd);
@@ -77,7 +77,7 @@ static void readonly(int fd, unsigned ring) execbuf->buffers_ptr =to_user_pointer (&exec); execbuf->buffer_count =1 ; - execbuf->flags = ring; + execbuf->flags = flags;igt_assert (mprotect (execbuf,4096 ,PROT_READ ) ==0 );gem_execbuf (fd, execbuf);
@@ -87,13 +87,13 @@ static void readonly(int fd, unsigned ring)batch_fini (fd, exec.handle); } -static void gtt (int fd,unsigned ring) +static void gtt (int fd,uint64_t flags) {struct drm_i915_gem_execbuffer2 *execbuf;struct drm_i915_gem_exec_object2 *exec;uint32_t handle; -gem_require_ring (fd, ring); +gem_require_ring (fd, flags); handle =gem_create (fd,4096 );
@@ -106,7 +106,7 @@ static void gtt(int fd, unsigned ring) execbuf->buffers_ptr =to_user_pointer (exec); execbuf->buffer_count =1 ; - execbuf->flags = ring; + execbuf->flags = flags;gem_execbuf (fd, execbuf);
@@ -116,7 +116,7 @@ static void gtt(int fd, unsigned ring) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ; igt_fixture {
@@ -126,13 +126,13 @@ igt_mainigt_fork_hang_detector (fd); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_f("basic-%s", e->name) -noop (fd, e->exec_id | e->flags); +noop (fd, e->flags); igt_subtest_f("readonly-%s", e->name) -readonly (fd, e->exec_id | e->flags); +readonly (fd, e->flags); igt_subtest_f("gtt-%s", e->name) -gtt (fd, e->exec_id | e->flags); +gtt (fd, e->flags); } igt_fixture {
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 10/14] test/i915: gem_exec_basic: use the gem_engine_topology library
Quoted 17 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>--- tests/i915/gem_exec_basic.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)tests/i915/gem_exec_basic.c +0
-0@@ -42,12 +42,12 @@ static void batch_fini(int fd, uint32_t handle)gem_close (fd, handle);
tests/i915/gem_exec_basic.c static void batch_fini(int fd, uint32_t handle) · line 50
Quoted 10 lines
tests/i915/gem_exec_basic.c +2
-2} -static void noop (int fd,unsigned ring) +static void noop (int fd,uint64_t flags) {struct drm_i915_gem_execbuffer2 execbuf;struct drm_i915_gem_exec_object2 exec; -gem_require_ring (fd, ring); +gem_require_ring (fd, flags);
gem_require_ring cannot support new engines, no?
Regards,
Tvrtko
Quoted 77 lines
tests/i915/gem_exec_basic.c +9
-10memset (&exec,0 ,sizeof (exec));@@ -56,18 +56,18 @@ static void noop(int fd, unsigned ring)memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (&exec); execbuf.buffer_count =1 ; - execbuf.flags = ring; + execbuf.flags = flags;gem_execbuf (fd, &execbuf);batch_fini (fd, exec.handle); } -static void readonly (int fd,unsigned ring) +static void readonly (int fd,uint64_t flags) {struct drm_i915_gem_execbuffer2 *execbuf;struct drm_i915_gem_exec_object2 exec; -gem_require_ring (fd, ring); +gem_require_ring (fd, flags);memset (&exec,0 ,sizeof (exec)); exec.handle =batch_create (fd);@@ -77,7 +77,7 @@ static void readonly(int fd, unsigned ring) execbuf->buffers_ptr =to_user_pointer (&exec); execbuf->buffer_count =1 ; - execbuf->flags = ring; + execbuf->flags = flags;igt_assert (mprotect (execbuf,4096 ,PROT_READ ) ==0 );gem_execbuf (fd, execbuf);@@ -87,13 +87,13 @@ static void readonly(int fd, unsigned ring)batch_fini (fd, exec.handle); } -static void gtt (int fd,unsigned ring) +static void gtt (int fd,uint64_t flags) {struct drm_i915_gem_execbuffer2 *execbuf;struct drm_i915_gem_exec_object2 *exec;uint32_t handle; -gem_require_ring (fd, ring); +gem_require_ring (fd, flags); handle =gem_create (fd,4096 );@@ -106,7 +106,7 @@ static void gtt(int fd, unsigned ring) execbuf->buffers_ptr =to_user_pointer (exec); execbuf->buffer_count =1 ; - execbuf->flags = ring; + execbuf->flags = flags;gem_execbuf (fd, execbuf);@@ -116,7 +116,7 @@ static void gtt(int fd, unsigned ring) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ; igt_fixture {@@ -126,13 +126,13 @@ igt_mainigt_fork_hang_detector (fd); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) {igt_subtest_f ("basic-%s" , e->name) -noop (fd, e->exec_id | e->flags);
tests/i915/gem_exec_basic.c igt_main · line 138
Quoted 10 lines
tests/i915/gem_exec_basic.c +3
-2+noop (fd, e->flags); igt_subtest_f("readonly-%s", e->name) -readonly (fd, e->exec_id | e->flags); +readonly (fd, e->flags); igt_subtest_f("gtt-%s", e->name) -gtt (fd, e->exec_id | e->flags); +gtt (fd, e->flags); } igt_fixture {
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Tvrtko Ursulin
Reviewed-byRe: [igt-dev] [PATCH v23 10/14] test/i915: gem_exec_basic: use the gem_engine_topology library
Quoted 13 lines · Tvrtko Ursulin
Quoted 11 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>---
tests/i915/gem_exec_basic.c| 28 ++++++++++++++--------------1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 16 lines
Quoted 5 lines
tests/i915/gem_exec_basic.c +0
-0tests/i915/gem_exec_basic.c static void batch_fini(int fd, uint32_t handle) · line 48
Quoted 9 lines
tests/i915/gem_exec_basic.c +2
-2@@ -42,12 +42,12 @@ static void batch_fini(int fd, uint32_t handle) gem_close(fd, handle); } -static void noop (int fd,unsigned ring) +static void noop (int fd,uint64_t flags) { struct drm_i915_gem_execbuffer2 execbuf; struct drm_i915_gem_exec_object2 exec; - gem_require_ring(fd, ring); + gem_require_ring(fd, flags);
gem_require_ringcannot support new engines, no?
It can. :)
Regards,
Tvrtko
Quoted 65 lines
Regards,
Tvrtko
Quoted 60 lines
tests/i915/gem_exec_basic.c +7
-7memset(&exec, 0, sizeof(exec));@@ -56,18 +56,18 @@ static void noop(int fd, unsigned ring) memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = to_user_pointer(&exec); execbuf.buffer_count = 1; - execbuf.flags = ring; + execbuf.flags = flags; gem_execbuf(fd, &execbuf); batch_fini(fd, exec.handle); } -static void readonly (int fd,unsigned ring) +static void readonly (int fd,uint64_t flags) { struct drm_i915_gem_execbuffer2 *execbuf; struct drm_i915_gem_exec_object2 exec; - gem_require_ring(fd, ring); + gem_require_ring(fd, flags); memset(&exec, 0, sizeof(exec)); exec.handle = batch_create(fd);@@ -77,7 +77,7 @@ static void readonly(int fd, unsigned ring) execbuf->buffers_ptr = to_user_pointer(&exec); execbuf->buffer_count = 1; - execbuf->flags = ring; + execbuf->flags = flags; igt_assert(mprotect(execbuf, 4096, PROT_READ) == 0); gem_execbuf(fd, execbuf);@@ -87,13 +87,13 @@ static void readonly(int fd, unsigned ring) batch_fini(fd, exec.handle); } -static void gtt (int fd,unsigned ring) +static void gtt (int fd,uint64_t flags) { struct drm_i915_gem_execbuffer2 *execbuf; struct drm_i915_gem_exec_object2 *exec; uint32_t handle; - gem_require_ring(fd, ring); + gem_require_ring(fd, flags); handle = gem_create(fd, 4096);@@ -106,7 +106,7 @@ static void gtt(int fd, unsigned ring) execbuf->buffers_ptr = to_user_pointer(exec); execbuf->buffer_count = 1; - execbuf->flags = ring; + execbuf->flags = flags; gem_execbuf(fd, execbuf);@@ -116,7 +116,7 @@ static void gtt(int fd, unsigned ring)
igt_main
{
- const structintel_execution_engine*e;
+ const structintel_execution_engine2*e;
int fd = -1;
igt_fixture{tests/i915/gem_exec_basic.c +2
-2@@ -126,13 +126,13 @@ igt_main igt_fork_hang_detector(fd); } - for (e = intel_execution_engines; e->name; e++) { + __for_each_physical_engine(fd, e) { igt_subtest_f("basic-%s", e->name) - noop(fd, e->exec_id | e->flags); + noop(fd, e->flags); igt_subtest_f("readonly-%s", e->name)
Quoted 8 lines
tests/i915/gem_exec_basic.c igt_main
Quoted 8 lines
tests/i915/gem_exec_basic.c +2
-2- readonly(fd, e->exec_id | e->flags); + readonly(fd, e->flags); igt_subtest_f("gtt-%s", e->name) - gtt(fd, e->exec_id | e->flags); + gtt(fd, e->flags); } igt_fixture {
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 11/14 test/i915: gem_exec_parallel: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/gem_exec_parallel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
tests/i915/gem_exec_parallel.c +4 -3
@@ -229,6 +229,8 @@ static void all(int fd, unsigned engine, unsigned flags) igt_main { +const struct intel_execution_engine2 *e; + const struct mode { const char *name; unsigned flags;
@@ -251,14 +253,13 @@ igt_main igt_subtest_f("%s", *m->name ? m->name : "basic")all (fd,ALL_ENGINES , m->flags); -for (const struct intel_execution_engine *e = intel_execution_engines; - e->name; e++) { +__for_each_physical_engine (fd, e) {for (const struct mode *m = modes; m->name; m++)igt_subtest_f ("%s%s%s" , e->name, *m->name ?"-" :"" , m->name) -all (fd, e->exec_id | e->flags, m->flags); +all (fd, e->flags, m->flags); } igt_fixture {
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 11/14] test/i915: gem_exec_parallel: use the gem_engine_topology library
Quoted 25 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>--- tests/i915/gem_exec_parallel.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)tests/i915/gem_exec_parallel.c +2
-0@@ -229,6 +229,8 @@ static void all(int fd, unsigned engine, unsigned flags) igt_main { +const struct intel_execution_engine2 *e; + const struct mode { const char *name; unsigned flags;
tests/i915/gem_exec_parallel.c igt_main · line 254
Quoted 2 lines
tests/i915/gem_exec_parallel.c +0
-0@@ -251,14 +253,13 @@ igt_main igt_subtest_f("%s", *m->name ? m->name : "basic")all (fd,ALL_ENGINES , m->flags);
There's a legacy for_each_physical_engine loop in all() under the branch which handles ALL_ENGINES which needs to be converted to the new iterator.
Quoted 5 lines
tests/i915/gem_exec_parallel.c +1
-2-for (const struct intel_execution_engine *e = intel_execution_engines; - e->name; e++) { +__for_each_physical_engine (fd, e) {for (const struct mode *m = modes; m->name; m++)
tests/i915/gem_exec_parallel.c igt_main
Quoted 10 lines
tests/i915/gem_exec_parallel.c +1
-1igt_subtest_f ("%s%s%s" , e->name, *m->name ?"-" :"" , m->name) -all (fd, e->exec_id | e->flags, m->flags); +all (fd, e->flags, m->flags); } igt_fixture {
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 12/14 test/i915: gem_exec_store: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/gem_exec_store.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)
tests/i915/gem_exec_store.c +12 -13
@@ -37,7 +37,7 @@#define ENGINE_MASK (I915_EXEC_RING_MASK | LOCAL_I915_EXEC_BSD_MASK) -static void store_dword (int fd,unsigned ring) +static void store_dword (int fd,const struct intel_execution_engine2 *e) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 obj[2 ];
@@ -46,14 +46,13 @@ static void store_dword(int fd, unsigned ring)uint32_t batch[16 ];int i; -gem_require_ring (fd, ring); -igt_require (gem_can_store_dword (fd, ring)); +igt_require (gem_class_can_store_dword (fd, e->class));intel_detect_and_clear_missed_interrupts (fd);memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (obj); execbuf.buffer_count =2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen >3 && gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;
@@ -97,7 +96,8 @@ static void store_dword(int fd, unsigned ring) }#define PAGES 1 -static void store_cachelines (int fd,unsigned ring,unsigned int flags) +static void store_cachelines (int fd,const struct intel_execution_engine2 *e, +unsigned int flags) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 *obj;
@@ -110,13 +110,12 @@ static void store_cachelines(int fd, unsigned ring, unsigned int flags) reloc =calloc (NCACHELINES ,sizeof (*reloc));igt_assert (reloc); -gem_require_ring (fd, ring); -igt_require (gem_can_store_dword (fd, ring)); +igt_require (gem_class_can_store_dword (fd, e->class));intel_detect_and_clear_missed_interrupts (fd);memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffer_count = flags &PAGES ?NCACHELINES +1 :2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen >3 && gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;
@@ -311,7 +310,7 @@ static int print_welcome(int fd) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd; igt_fixture {
@@ -329,15 +328,15 @@ igt_mainigt_fork_hang_detector (fd); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_f("basic-%s", e->name) -store_dword (fd, e->exec_id | e->flags); +store_dword (fd, e); igt_subtest_f("cachelines-%s", e->name) -store_cachelines (fd, e->exec_id | e->flags,0 ); +store_cachelines (fd, e,0 ); igt_subtest_f("pages-%s", e->name) -store_cachelines (fd, e->exec_id | e->flags,PAGES ); +store_cachelines (fd, e,PAGES ); }igt_subtest ("basic-all" )
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 12/14] test/i915: gem_exec_store: use the gem_engine_topology library
Quoted 87 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>--- tests/i915/gem_exec_store.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)tests/i915/gem_exec_store.c +10
-11@@ -37,7 +37,7 @@#define ENGINE_MASK (I915_EXEC_RING_MASK | LOCAL_I915_EXEC_BSD_MASK) -static void store_dword (int fd,unsigned ring) +static void store_dword (int fd,const struct intel_execution_engine2 *e) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 obj[2 ];@@ -46,14 +46,13 @@ static void store_dword(int fd, unsigned ring)uint32_t batch[16 ];int i; -gem_require_ring (fd, ring); -igt_require (gem_can_store_dword (fd, ring)); +igt_require (gem_class_can_store_dword (fd, e->class));intel_detect_and_clear_missed_interrupts (fd);memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (obj); execbuf.buffer_count =2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen >3 && gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;@@ -97,7 +96,8 @@ static void store_dword(int fd, unsigned ring) }#define PAGES 1 -static void store_cachelines (int fd,unsigned ring,unsigned int flags) +static void store_cachelines (int fd,const struct intel_execution_engine2 *e, +unsigned int flags) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 *obj;@@ -110,13 +110,12 @@ static void store_cachelines(int fd, unsigned ring, unsigned int flags) reloc =calloc (NCACHELINES ,sizeof (*reloc));igt_assert (reloc); -gem_require_ring (fd, ring); -igt_require (gem_can_store_dword (fd, ring)); +igt_require (gem_class_can_store_dword (fd, e->class));intel_detect_and_clear_missed_interrupts (fd);memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffer_count = flags &PAGES ?NCACHELINES +1 :2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen >3 && gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;@@ -311,7 +310,7 @@ static int print_welcome(int fd) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd; igt_fixture {@@ -329,15 +328,15 @@ igt_mainigt_fork_hang_detector (fd); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_f("basic-%s", e->name) -store_dword (fd, e->exec_id | e->flags); +store_dword (fd, e);
tests/i915/gem_exec_store.c igt_main · line 342
Quoted 10 lines
tests/i915/gem_exec_store.c +2
-2igt_subtest_f("cachelines-%s", e->name) -store_cachelines (fd, e->exec_id | e->flags,0 ); +store_cachelines (fd, e,0 ); igt_subtest_f("pages-%s", e->name) -store_cachelines (fd, e->exec_id | e->flags,PAGES ); +store_cachelines (fd, e,PAGES ); }igt_subtest ("basic-all" )
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 12/14] test/i915: gem_exec_store: use the gem_engine_topology library
In reply to Andi ShytiAlso pencil in changing store_all() to use new for each phys engine iterator.
Regards,
Tvrtko
Quoted 87 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>--- tests/i915/gem_exec_store.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-)tests/i915/gem_exec_store.c +10
-11@@ -37,7 +37,7 @@#define ENGINE_MASK (I915_EXEC_RING_MASK | LOCAL_I915_EXEC_BSD_MASK) -static void store_dword (int fd,unsigned ring) +static void store_dword (int fd,const struct intel_execution_engine2 *e) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 obj[2 ];@@ -46,14 +46,13 @@ static void store_dword(int fd, unsigned ring)uint32_t batch[16 ];int i; -gem_require_ring (fd, ring); -igt_require (gem_can_store_dword (fd, ring)); +igt_require (gem_class_can_store_dword (fd, e->class));intel_detect_and_clear_missed_interrupts (fd);memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffers_ptr =to_user_pointer (obj); execbuf.buffer_count =2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen >3 && gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;@@ -97,7 +96,8 @@ static void store_dword(int fd, unsigned ring) }#define PAGES 1 -static void store_cachelines (int fd,unsigned ring,unsigned int flags) +static void store_cachelines (int fd,const struct intel_execution_engine2 *e, +unsigned int flags) {const int gen =intel_gen (intel_get_drm_devid (fd));struct drm_i915_gem_exec_object2 *obj;@@ -110,13 +110,12 @@ static void store_cachelines(int fd, unsigned ring, unsigned int flags) reloc =calloc (NCACHELINES ,sizeof (*reloc));igt_assert (reloc); -gem_require_ring (fd, ring); -igt_require (gem_can_store_dword (fd, ring)); +igt_require (gem_class_can_store_dword (fd, e->class));intel_detect_and_clear_missed_interrupts (fd);memset (&execbuf,0 ,sizeof (execbuf)); execbuf.buffer_count = flags &PAGES ?NCACHELINES +1 :2 ; - execbuf.flags = ring; + execbuf.flags = e->flags;if (gen >3 && gen <6 ) execbuf.flags |=I915_EXEC_SECURE ;@@ -311,7 +310,7 @@ static int print_welcome(int fd) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd; igt_fixture {@@ -329,15 +328,15 @@ igt_mainigt_fork_hang_detector (fd); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_f("basic-%s", e->name) -store_dword (fd, e->exec_id | e->flags); +store_dword (fd, e);
tests/i915/gem_exec_store.c igt_main · line 342
Quoted 10 lines
tests/i915/gem_exec_store.c +2
-2igt_subtest_f("cachelines-%s", e->name) -store_cachelines (fd, e->exec_id | e->flags,0 ); +store_cachelines (fd, e,0 ); igt_subtest_f("pages-%s", e->name) -store_cachelines (fd, e->exec_id | e->flags,PAGES ); +store_cachelines (fd, e,PAGES ); }igt_subtest ("basic-all" )
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 13/14 test/i915: gem_wait: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/gem_wait.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
tests/i915/gem_wait.c +12 -12
@@ -134,7 +134,7 @@ static void basic(int fd, unsigned engine, unsigned flags) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ;igt_skip_on_simulation ();
@@ -177,27 +177,27 @@ igt_mainbasic (fd,ALL_ENGINES ,WRITE ); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_group { igt_subtest_f("busy-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,BUSY ); +basic (fd, e->flags,BUSY ); } igt_subtest_f("wait-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,0 ); +basic (fd, e->flags,0 ); } igt_subtest_f("await-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,AWAIT ); +basic (fd, e->flags,AWAIT ); } igt_subtest_f("write-busy-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,BUSY |WRITE ); +basic (fd, e->flags,BUSY |WRITE ); } igt_subtest_f("write-wait-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,WRITE ); +basic (fd, e->flags,WRITE ); } } }
@@ -234,22 +234,22 @@ igt_mainbasic (fd,ALL_ENGINES ,WRITE |HANG ); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_f("hang-busy-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG |BUSY ); +basic (fd, e->flags,HANG |BUSY ); } igt_subtest_f("hang-wait-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG ); +basic (fd, e->flags,HANG ); } igt_subtest_f("hang-busy-write-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG |WRITE |BUSY ); +basic (fd, e->flags,HANG |WRITE |BUSY ); } igt_subtest_f("hang-wait-write-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG |WRITE ); +basic (fd, e->flags,HANG |WRITE ); } }
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 13/14] test/i915: gem_wait: use the gem_engine_topology library
Quoted 77 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Chris Wilson <[email protected]>--- tests/i915/gem_wait.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)tests/i915/gem_wait.c +10
-10@@ -134,7 +134,7 @@ static void basic(int fd, unsigned engine, unsigned flags) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;int fd =-1 ;igt_skip_on_simulation ();@@ -177,27 +177,27 @@ igt_mainbasic (fd,ALL_ENGINES ,WRITE ); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_group { igt_subtest_f("busy-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,BUSY ); +basic (fd, e->flags,BUSY ); } igt_subtest_f("wait-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,0 ); +basic (fd, e->flags,0 ); } igt_subtest_f("await-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,AWAIT ); +basic (fd, e->flags,AWAIT ); } igt_subtest_f("write-busy-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,BUSY |WRITE ); +basic (fd, e->flags,BUSY |WRITE ); } igt_subtest_f("write-wait-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,WRITE ); +basic (fd, e->flags,WRITE ); } } }@@ -234,22 +234,22 @@ igt_mainbasic (fd,ALL_ENGINES ,WRITE |HANG ); } -for (e = intel_execution_engines; e->name; e++) { +__for_each_physical_engine (fd, e) { igt_subtest_f("hang-busy-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG |BUSY ); +basic (fd, e->flags,HANG |BUSY ); } igt_subtest_f("hang-wait-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG ); +basic (fd, e->flags,HANG ); } igt_subtest_f("hang-busy-write-%s", e->name) {gem_quiescent_gpu (fd);
tests/i915/gem_wait.c igt_main · line 255
Quoted 10 lines
tests/i915/gem_wait.c +2
-2-basic (fd, e->exec_id | e->flags,HANG |WRITE |BUSY ); +basic (fd, e->flags,HANG |WRITE |BUSY ); } igt_subtest_f("hang-wait-write-%s", e->name) {gem_quiescent_gpu (fd); -basic (fd, e->exec_id | e->flags,HANG |WRITE ); +basic (fd, e->flags,HANG |WRITE ); } }
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v23 14/14 test/i915: i915_hangman: use the gem_engine_topology library
In reply to Andi ShytiFrom: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library.
--- tests/i915/i915_hangman.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
tests/i915/i915_hangman.c +4 -11
@@ -256,7 +256,7 @@ static void hangcheck_unterminated(void) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;igt_hang_t hang = {};igt_skip_on_simulation ();
@@ -276,16 +276,9 @@ igt_main igt_subtest("error-state-basic")test_error_state_basic (); -for (e = intel_execution_engines; e->name; e++) { -if (e->exec_id ==0 ) -continue ; - - igt_subtest_f("error-state-capture-%s", e->name) { -igt_require (gem_ring_has_physical_engine (device, e->exec_id | e->flags)); -test_error_state_capture (e->exec_id | e->flags, - e->full_name); - } - } +__for_each_physical_engine (device, e) + igt_subtest_f("error-state-capture-%s", e->name) +test_error_state_capture (e->flags, e->name); igt_subtest("hangcheck-unterminated")hangcheck_unterminated ();
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH v23 14/14] test/i915: i915_hangman: use the gem_engine_topology library
Quoted 36 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Replace the legacy for_each_engine* defines with the ones implemented in the
gem_engine_topologylibrary.Signed-off-by Andi Shyti <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Chris Wilson <[email protected]>--- tests/i915/i915_hangman.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)tests/i915/i915_hangman.c +1
-7@@ -256,7 +256,7 @@ static void hangcheck_unterminated(void) igt_main { -const struct intel_execution_engine *e; +const struct intel_execution_engine2 *e;igt_hang_t hang = {};igt_skip_on_simulation ();@@ -276,16 +276,9 @@ igt_main igt_subtest("error-state-basic")test_error_state_basic (); -for (e = intel_execution_engines; e->name; e++) { -if (e->exec_id ==0 ) -continue ; - - igt_subtest_f("error-state-capture-%s", e->name) { -igt_require (gem_ring_has_physical_engine (device, e->exec_id | e->flags));
tests/i915/i915_hangman.c igt_main · line 284
Quoted 10 lines
tests/i915/i915_hangman.c +3
-4-test_error_state_capture (e->exec_id | e->flags, - e->full_name); - } - } +__for_each_physical_engine (device, e) + igt_subtest_f("error-state-capture-%s", e->name) +test_error_state_capture (e->flags, e->name); igt_subtest("hangcheck-unterminated")hangcheck_unterminated ();
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for new engine discovery interface
In reply to Andi Shyti== Series Details ==
== Series Details ==
Series: new engine discovery interface
URL : https://patchwork.freedesktop.org/series/60557/
State : success
== Summary ==
CI Bug Log - changes from IGT_4981 -> IGTPW_2968
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/60557/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_2968 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-7500u: [PASS][1] -> [DMESG-WARN][2] ([fdo#105128] / [fdo#107139])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/fi-kbl-7500u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/fi-kbl-7500u/igt@[email protected]
* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: [PASS][3] -> [INCOMPLETE][4] ([fdo#108602] / [fdo#108744])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/fi-skl-iommu/igt@i915_selftest@live_hangcheck.html
#### Warnings ####
* igt@i915_selftest@live_hangcheck:
- fi-apl-guc: [DMESG-FAIL][5] ([fdo#110620]) -> [FAIL][6] ([fdo#110623])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/fi-apl-guc/igt@i915_selftest@live_hangcheck.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/fi-apl-guc/igt@i915_selftest@live_hangcheck.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
[fdo#110246]: https://bugs.freedesktop.org/show_bug.cgi?id=110246
[fdo#110620]: https://bugs.freedesktop.org/show_bug.cgi?id=110620
[fdo#110623]: https://bugs.freedesktop.org/show_bug.cgi?id=110623
Participating hosts (53 -> 44)
------------------------------
Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-ivb-3770 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* IGT: IGT_4981 -> IGTPW_2968
CI_DRM_6073: c059ddabfe60a5072ace44a34a9de9b4202df6ec @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2968: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/
IGT_4981: 709bd6869e2aff01a67eef729f9dc330f404387e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+++ 135 lines
--- 184 lines
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for new engine discovery interface
In reply to Andi Shyti== Series Details ==
== Series Details ==
Series: new engine discovery interface
URL : https://patchwork.freedesktop.org/series/60557/
State : success
== Summary ==
CI Bug Log - changes from IGT_4981_full -> IGTPW_2968_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/60557/revisions/1/mbox/
New tests
---------
New tests have been introduced between IGT_4981_full and IGTPW_2968_full:
### New IGT tests (106) ###
* igt@gem_busy@basic-busy-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.00] s
* igt@gem_busy@basic-hang-rcs0:
- Statuses : 6 pass(s)
- Exec time: [12.64, 16.16] s
* igt@gem_busy@busy-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.00] s
* igt@gem_busy@busy-vcs0:
- Statuses : 6 pass(s)
- Exec time: [0.00] s
* igt@gem_busy@busy-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.00] s
* igt@gem_busy@busy-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.00] s
* igt@gem_busy@extended-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.02, 0.03] s
* igt@gem_busy@extended-parallel-bcs0:
- Statuses : 1 incomplete(s) 5 pass(s)
- Exec time: [0.0, 0.04] s
* igt@gem_busy@extended-parallel-rcs0:
- Statuses : 1 incomplete(s) 4 pass(s)
- Exec time: [0.0, 0.05] s
* igt@gem_busy@extended-parallel-vcs0:
- Statuses : 5 pass(s) 1 skip(s)
- Exec time: [0.0, 0.03] s
* igt@gem_busy@extended-parallel-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.03] s
* igt@gem_busy@extended-parallel-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.02, 0.04] s
* igt@gem_busy@extended-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.01, 0.03] s
* igt@gem_busy@extended-semaphore-bcs0:
- Statuses : 4 pass(s) 2 skip(s)
- Exec time: [0.0, 0.01] s
* igt@gem_busy@extended-semaphore-rcs0:
- Statuses : 4 pass(s) 2 skip(s)
- Exec time: [0.0, 0.00] s
* igt@gem_busy@extended-semaphore-vcs0:
- Statuses : 4 pass(s) 2 skip(s)
- Exec time: [0.0, 0.00] s
* igt@gem_busy@extended-semaphore-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.00] s
* igt@gem_busy@extended-semaphore-vecs0:
- Statuses : 4 pass(s) 1 skip(s)
- Exec time: [0.0, 0.00] s
* igt@gem_busy@extended-vcs0:
- Statuses : 5 pass(s) 1 skip(s)
- Exec time: [0.0, 0.04] s
* igt@gem_busy@extended-vcs1:
- Statuses :
- Exec time: [None] s
* igt@gem_busy@extended-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.01, 0.03] s
* igt@gem_cs_tlb@bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.73, 4.63] s
* igt@gem_cs_tlb@rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.72, 5.40] s
* igt@gem_cs_tlb@vcs0:
- Statuses : 6 pass(s)
- Exec time: [0.73, 4.58] s
* igt@gem_cs_tlb@vcs1:
- Statuses : 1 pass(s)
- Exec time: [1.76] s
* igt@gem_cs_tlb@vecs0:
- Statuses : 5 pass(s)
- Exec time: [1.28, 4.86] s
* igt@gem_ctx_exec@basic-invalid-context-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.00, 0.01] s
* igt@gem_ctx_exec@basic-invalid-context-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.00] s
* igt@gem_ctx_exec@basic-invalid-context-vcs0:
- Statuses : 5 pass(s)
- Exec time: [0.00] s
* igt@gem_ctx_exec@basic-invalid-context-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.00] s
* igt@gem_ctx_exec@basic-invalid-context-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.00] s
* igt@gem_exec_basic@basic-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@basic-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@basic-vcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@basic-vcs1:
- Statuses :
- Exec time: [None] s
* igt@gem_exec_basic@basic-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@gtt-bcs0:
- Statuses : 4 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@gtt-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@gtt-vcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@gtt-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.00] s
* igt@gem_exec_basic@gtt-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@readonly-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@readonly-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@readonly-vcs0:
- Statuses : 6 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_basic@readonly-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@gem_exec_basic@readonly-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.0, 0.00] s
* igt@gem_exec_parallel@bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.80, 2.41] s
* igt@gem_exec_parallel@bcs0-contexts:
- Statuses : 6 pass(s)
- Exec time: [1.26, 4.67] s
* igt@gem_exec_parallel@bcs0-fds:
- Statuses : 6 pass(s)
- Exec time: [1.28, 4.95] s
* igt@gem_exec_parallel@rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.84, 2.68] s
* igt@gem_exec_parallel@rcs0-contexts:
- Statuses : 6 pass(s)
- Exec time: [1.43, 5.41] s
* igt@gem_exec_parallel@rcs0-fds:
- Statuses : 6 pass(s)
- Exec time: [1.44, 5.72] s
* igt@gem_exec_parallel@vcs0:
- Statuses : 5 pass(s) 1 skip(s)
- Exec time: [0.0, 2.66] s
* igt@gem_exec_parallel@vcs0-contexts:
- Statuses : 5 pass(s) 1 skip(s)
- Exec time: [0.0, 4.68] s
* igt@gem_exec_parallel@vcs0-fds:
- Statuses : 5 pass(s) 1 skip(s)
- Exec time: [0.0, 5.01] s
* igt@gem_exec_parallel@vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.84] s
* igt@gem_exec_parallel@vcs1-contexts:
- Statuses : 1 pass(s)
- Exec time: [1.52] s
* igt@gem_exec_parallel@vcs1-fds:
- Statuses : 1 pass(s)
- Exec time: [1.82] s
* igt@gem_exec_parallel@vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.78, 2.73] s
* igt@gem_exec_parallel@vecs0-contexts:
- Statuses : 5 pass(s)
- Exec time: [1.26, 4.72] s
* igt@gem_exec_parallel@vecs0-fds:
- Statuses : 5 pass(s)
- Exec time: [1.28, 4.98] s
* igt@gem_exec_store@basic-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.01] s
* igt@gem_exec_store@basic-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.01] s
* igt@gem_exec_store@basic-vcs0:
- Statuses : 4 pass(s) 1 skip(s)
- Exec time: [0.0, 0.02] s
* igt@gem_exec_store@basic-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.01] s
* igt@gem_exec_store@basic-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.01, 0.02] s
* igt@gem_exec_store@cachelines-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.01] s
* igt@gem_exec_store@cachelines-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.01, 0.02] s
* igt@gem_exec_store@cachelines-vcs0:
- Statuses : 5 pass(s) 1 skip(s)
- Exec time: [0.0, 0.01] s
* igt@gem_exec_store@cachelines-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.01] s
* igt@gem_exec_store@cachelines-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.01] s
* igt@gem_exec_store@pages-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.01, 0.02] s
* igt@gem_exec_store@pages-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.01, 0.02] s
* igt@gem_exec_store@pages-vcs0:
- Statuses : 5 pass(s) 1 skip(s)
- Exec time: [0.0, 0.03] s
* igt@gem_exec_store@pages-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.01] s
* igt@gem_exec_store@pages-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.01, 0.02] s
* igt@gem_wait@await-bcs0:
- Statuses : 6 pass(s)
- Exec time: [1.01, 1.02] s
* igt@gem_wait@await-rcs0:
- Statuses : 6 pass(s)
- Exec time: [1.01, 1.02] s
* igt@gem_wait@await-vcs0:
- Statuses : 6 pass(s)
- Exec time: [1.01, 1.04] s
* igt@gem_wait@await-vcs1:
- Statuses : 1 pass(s)
- Exec time: [1.02] s
* igt@gem_wait@await-vecs0:
- Statuses : 5 pass(s)
- Exec time: [1.01, 1.02] s
* igt@gem_wait@busy-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.50] s
* igt@gem_wait@busy-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.50] s
* igt@gem_wait@busy-vcs0:
- Statuses : 6 pass(s)
- Exec time: [0.50, 0.51] s
* igt@gem_wait@busy-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.50] s
* igt@gem_wait@busy-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.50] s
* igt@gem_wait@wait-bcs0:
- Statuses : 6 pass(s)
- Exec time: [1.00, 1.02] s
* igt@gem_wait@wait-rcs0:
- Statuses : 6 pass(s)
- Exec time: [1.00, 1.02] s
* igt@gem_wait@wait-vcs0:
- Statuses : 6 pass(s)
- Exec time: [1.00, 1.01] s
* igt@gem_wait@wait-vcs1:
- Statuses : 1 pass(s)
- Exec time: [1.01] s
* igt@gem_wait@wait-vecs0:
- Statuses : 5 pass(s)
- Exec time: [1.00, 1.02] s
* igt@gem_wait@write-busy-bcs0:
- Statuses : 6 pass(s)
- Exec time: [0.50, 0.51] s
* igt@gem_wait@write-busy-rcs0:
- Statuses : 6 pass(s)
- Exec time: [0.50] s
* igt@gem_wait@write-busy-vcs0:
- Statuses : 6 pass(s)
- Exec time: [0.50, 0.51] s
* igt@gem_wait@write-busy-vcs1:
- Statuses : 1 pass(s)
- Exec time: [0.50] s
* igt@gem_wait@write-busy-vecs0:
- Statuses : 5 pass(s)
- Exec time: [0.50, 0.53] s
* igt@gem_wait@write-wait-bcs0:
- Statuses : 4 pass(s)
- Exec time: [1.01, 1.02] s
* igt@gem_wait@write-wait-rcs0:
- Statuses : 6 pass(s)
- Exec time: [1.00, 1.02] s
* igt@gem_wait@write-wait-vcs0:
- Statuses : 6 pass(s)
- Exec time: [1.01, 1.02] s
* igt@gem_wait@write-wait-vcs1:
- Statuses : 1 pass(s)
- Exec time: [1.03] s
* igt@gem_wait@write-wait-vecs0:
- Statuses : 5 pass(s)
- Exec time: [1.01, 1.02] s
* igt@i915_hangman@error-state-capture-bcs0:
- Statuses : 6 pass(s)
- Exec time: [13.65, 16.34] s
* igt@i915_hangman@error-state-capture-rcs0:
- Statuses : 6 pass(s)
- Exec time: [12.35, 15.98] s
* igt@i915_hangman@error-state-capture-vcs0:
- Statuses : 6 pass(s)
- Exec time: [8.47, 16.13] s
* igt@i915_hangman@error-state-capture-vcs1:
- Statuses : 1 pass(s)
- Exec time: [15.32] s
* igt@i915_hangman@error-state-capture-vecs0:
- Statuses : 5 pass(s)
- Exec time: [12.40, 15.87] s
Known issues
------------
Here are the changes found in IGTPW_2968_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_workarounds@suspend-resume:
- shard-apl: [PASS][1] -> [DMESG-WARN][2] ([fdo#108566]) +2 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-apl1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-apl5/igt@[email protected]
- shard-kbl: [PASS][3] -> [INCOMPLETE][4] ([fdo#103665])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-kbl7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-kbl3/igt@[email protected]
* igt@kms_cursor_crc@cursor-256x256-onscreen:
- shard-kbl: [PASS][5] -> [FAIL][6] ([fdo#103232])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-kbl1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-kbl3/igt@[email protected]
- shard-apl: [PASS][7] -> [FAIL][8] ([fdo#103232])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-apl8/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-apl8/igt@[email protected]
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109349])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-iclb2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-iclb8/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
- shard-iclb: [PASS][11] -> [FAIL][12] ([fdo#103167]) +4 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-iclb7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-iclb2/igt@[email protected]
* igt@kms_psr2_su@page_flip:
- shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#109642])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-iclb2/igt@kms_psr2_su@page_flip.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-iclb6/igt@kms_psr2_su@page_flip.html
* igt@kms_sysfs_edid_timing:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#100047])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-iclb8/igt@kms_sysfs_edid_timing.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-iclb3/igt@kms_sysfs_edid_timing.html
#### Possible fixes ####
* igt@i915_selftest@live_hangcheck:
- shard-iclb: [INCOMPLETE][17] ([fdo#107713] / [fdo#108569]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-iclb4/igt@i915_selftest@live_hangcheck.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-iclb8/igt@i915_selftest@live_hangcheck.html
* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-hsw: [INCOMPLETE][19] ([fdo#103540]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-hsw1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-hsw1/igt@[email protected]
* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: [FAIL][21] ([fdo#105363]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-glk8/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-glk8/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: [FAIL][23] ([fdo#102887] / [fdo#105363]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-glk3/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-glk7/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-glk: [INCOMPLETE][25] ([fdo#103359] / [k.org#198133]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-glk8/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-glk4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-pwrite:
- shard-glk: [FAIL][27] ([fdo#103167]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-glk5/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-pwrite.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-pwrite.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: [FAIL][29] ([fdo#103167]) -> [PASS][30] +6 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
* igt@kms_psr@psr2_basic:
- shard-iclb: [SKIP][31] ([fdo#109441]) -> [PASS][32] +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-iclb1/igt@kms_psr@psr2_basic.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-iclb2/igt@kms_psr@psr2_basic.html
* igt@kms_setmode@basic:
- shard-kbl: [FAIL][33] ([fdo#99912]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-kbl6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-kbl3/igt@[email protected]
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: [DMESG-WARN][35] ([fdo#108566]) -> [PASS][36] +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-apl5/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-apl8/igt@[email protected]
* igt@perf@short-reads:
- shard-kbl: [FAIL][37] ([fdo#103183]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-kbl3/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-kbl4/igt@[email protected]
* igt@perf_pmu@rc6:
- shard-kbl: [SKIP][39] ([fdo#109271]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4981/shard-kbl1/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/shard-kbl3/igt@[email protected]
[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103183]: https://bugs.freedesktop.org/show_bug.cgi?id=103183
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_4981 -> IGTPW_2968
CI_DRM_6073: c059ddabfe60a5072ace44a34a9de9b4202df6ec @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2968: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/
IGT_4981: 709bd6869e2aff01a67eef729f9dc330f404387e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2968/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 16 lines · Andi Shyti
From: Andi Shyti <[email protected]>
Hi,
In this patchset I propose an alternative way of engine discovery thanks to the new interfaces developed by Tvrtko and Chris[4].
Thanks Tvrtko, Chris, Antonio and Petri for your comments in the previous RFCs.
Andi
v22 --> v23
===========
updated the following tests to the new APIs:
Quoted 8 lines
gem_busygem_cs_tlbgem_ctx_execgem_exec_basicgem_exec_parallelgem_exec_storegem_waiti915_hangman
So there are no changes in "old" patches, just new patches in series (patches 7 to 14)?
Regards,
Tvrtko
Quoted 338 lines
v21 --> v22
===========
- just removed context creation and deletion fromengine_topologyand fixedperf_pmuaccordingly.v20 --> v21
===========
- removed Tvrtko's debug messages
- few fixes from Chris last reviewv19 --> v20
===========
- added some debugs from Tvrtko to get more info aboutgem_waitfailure.
- few fixes ingem_engine_topology.cfrom Tvrtko's comments, including a bigger fix about an uncontrolled variable increment in the_nextfunctionv18 --> v19
===========
- integrated Tvrtko's fixup patch [17]. From this patch some changes have been moved togem_engine_topologyas a new helper for getting the engine's properties.v17 --> v18
===========
- three patches have been applied (the ones that addgem_context_has_engine()function)
- few cosmetic fixes
- and some changes coming from Tvrtko's review on v17v16 --> v17
===========
amongst many little things, three main changes:
- improvedperf_pmuadaptation togem_engine_topology
- removed the exec-ctx test,perf_pmuwill be the flag test
- when creating the engine list, now thefor_each_engine_physicalcan be executed safely during subtest listingv15 --> v16
===========
- few changes to thegem_engine_topologystuff
- added une more dummy test which loops through the physical engines, as well.
- changes to test/perf_pmu required some more changes than expected (the 3 last patches)v14 --> v15
===========
PATCH v14: [16]- virtual engines will be called "virtual" like unrecognised engines will be called "unknown"
- renamed the
for_eachloops to more meaningful names (__for_each_static_engineandfor_each_context_engine) and moved intogem_engine_topology.h- minor changes about data types.
v13 --> v14
===========
PATCH v13: [15]
minor changes this time:
- squashed patch 2 and 3 (from v13) with a little rename and added Chris r-b- fixed some index issues and string assignement leaks
- squashed patches 5, 6, 7 and 8 from v13
v12 --> v13
===========
PATCH v12: [14]
This patch is also very different from the previous other than some reorganization of the code these are the main changes:- the previous version lacked the case when the context had its engines mapped. checks in the following order
if the driver doesn't have the new API
-> get the engines from the static list
if the driver has the API but the context has nothing mapped
-> get the engines from "query" and map them
if the driver has the API and the context has engines mapped
-> get the engines from the context- the helper functions have been removed as they were of no use.
v11 --> v12
===========
PATCH v11: [13]
This 12th version starts from a completely different thought. Here's the main differences:- The list of engines is provided in an
engine_datastructure which contains an index (useful for looping through and for engine/context index mapping) instead of an array of engines.- The list of engines is generated every time the init function is called and nothing is allocated in heap memory.
- The ioctl check is done already during the initialization part and if the new ioctls are not implemented, then the init function still stores only those present in the GPU.
- The
for_eachloop is implemented by re-using the previous 'for_each_engine_class_instance()' implemented by Tvrtko.- The
gem_topologylibrary offers few helper functions for checking the engine presence, checking the implementation of the ioctls and executing the buffer, in order to be completely unaware of the driver implementation.Thanks Tvrtko for all your inputs.
v10 --> v11
===========
RFC v10: [12]
few cosmetic changes in v11 and minor architectural details. Thanks Tvrtko.- the '
query_engines()' functions are static as no one is using them yet.- removed the '
gem_has_engine_topology()' function because it's very little used, 'get_active_engines()' can be used instead.- a minor ring -> engine renaming coming from Chris.
v9 --> v10
==========
RFC v9: [11]
also this time quite many changes, thanks Chris for the reviews, here the most relevant of them.- gem_query.[ch] have been renamed to gem_engine_topology.[ch] and all the functions ended up there as they are referring to the topology of the engines.
- the functions '
get_active_engines()', 'gem_set_context_get_engines()' and 'igt_require_gem_engine_list()' will be the main interface to thegem_engine_topologylibrary, refer to patch 2 for details.- the define '
for_each_engine2()' doesn't expose anymore the iterator.- '
gem_context_has_engine()' has been moved fromioctl_wrappers.ctogem_context.c.- the
gem_exec_basicexec-ctx subtest does not abort if the new getparam/setparam and query apis are not implemented as it can work with both (as it was done at the beginning).v8 --> v9
=========
RFC v8: [10]
quite many changes, please refer to the review in [10]. Thanks Chris for the review. These are the most relevant:- all the allocation in
gem_queryhave been made in stack, not anymore allocated dynamically.- removed get/set_context as it was already implemented and I didn't know.
- renamed some functions and variables to hopefully more meaningful names.
V7 --> v8
=========
RFC v7: [9]- all functions have been moved from
lib/igt_gt.{c,h}andlib/ioctl_wrappers.{c,h}tolib/i916/gem_query.{c,h}. (thanks Chris)- '
for_each_engine_ctx' has been renamed to 'for_each_engine2' to be consistent with the '2' that indicates the new 'structintel_execution_engine2' data structure.V6 --> V7
=========
RFC v6: [8]- a new patch has been added (patch 3) which adds a new requirement check through the
igt_require_gem_engine_list()function. (thanks Chris) This function will initialize the engine list instead of the instead ofigt_require_gem()as it was in v6- all the ioctls have been wrapped (thanks Chris and Antonio) and new library functions have been added and assert the ioctls
-
gem_init_engine_list()function returns the errno from the GETPARAM ioctl in order to be used as a requirement. (thanks Chris)- fixed few requires/asserts
- The engine list "
intel_active_engines2" is allocated of the number of engines instead of a political 64 (thanks Antonio).- some parameter renaming in
gem_has_ring_by_idx(). (thanks Chris).- the original "
intel_execution_engines2" has not been renamed, because it is used to create subtests before even executing any test/ioctl. By renaming it, some subtest generations failed. (thanks Petri)V5 --> V6
=========
RFC v5: [7]
- Chris implemented the getparam ioctl which allows to the test to figure otu whether the new interface has been implemented. This way thefor_each_engine_ctx()is able to work with new and old kernel uapi (thanks Chris)V4 --> V5
=========
RFC v4: [6]- the engine list is now built in '
igt_require_gem()' instead of '__open_driver()' so that we keep this discovery method specific to the i915 driver (thanks Chris).- All the query/setparam structures dynamic allocation based on the number of engines, now are politically allocated 64 times, to avoid extra ioctl calls that retrieve the engine number (thanks Chris)
- use
igt_ioctlinstead of ioctl (thanks Chris)- allocate
intel_execution_engines2dynamically instead of statically (thanks Tvrtko)- simplify the test in '
gem_exec_basic()' so that simply checks the presence of the engine instead of executing a buffer (thank Chris)- a new patch has been added (patch 3) that extends the '
gem_has_ring()' boolean function. The new version sets the index as it's mapped in the kernel.The previous function is now a wrapper to the new function.V3 --> V4
=========
PATCH v3: [3]- re-architectured the discovery mechanism based on Tvrtko's sugestion and reviews.. In this version the discovery is done during the device opening and stored in a NULL terminated array, which replaces the existing
intel_execution_engines2that is mainly used as a reference.V2 --> V3
=========
RFC v2: [2]- removed a standalone
gem_query_engines_demotest and added the exec-ctx subtest insidegem_exec_basic(thanks Tvrtko).- fixed most of Tvrtko's comments in [5], which consist in putting the mallocs
igt_assertand ictls inigt_requireand few refactoring (thanks Tvrtko).V1 --> V2
=========
RFC v1: [1]- added a demo test that simply queries the driver about the engines and executes a buffer (thanks Tvrtko)
- refactored the
for_each_engine_ctx()macro so that what in the previous version was done by the "bind" function, now it's done in the first iteration. (Thanks Crhis)- removed the "
gem_has_ring_ctx()" because it was out of the scope.- rename functions to more meaningful names
[1] RFC v1: https://lists.freedesktop.org/archives/igt-dev/2018-November/007025.html
[2] RFC v2: https://lists.freedesktop.org/archives/igt-dev/2018-November/007079.html
[3] PATCH v3: https://lists.freedesktop.org/archives/igt-dev/2018-November/007148.html
[4] https://cgit.freedesktop.org/~tursulin/drm-intel/log/?h=media
[5] https://lists.freedesktop.org/archives/igt-dev/2018-November/007100.html
[6] https://lists.freedesktop.org/archives/igt-dev/2019-January/008029.html
[7] https://lists.freedesktop.org/archives/igt-dev/2019-January/008165.html
[8] https://lists.freedesktop.org/archives/igt-dev/2019-February/008902.html
[9] https://lists.freedesktop.org/archives/igt-dev/2019-February/009185.html
[10] https://lists.freedesktop.org/archives/igt-dev/2019-February/009205.html
[11] https://lists.freedesktop.org/archives/igt-dev/2019-February/009277.html
[12] https://lists.freedesktop.org/archives/igt-dev/2019-March/010197.html
[13] https://lists.freedesktop.org/archives/igt-dev/2019-March/010467.html
[14] https://lists.freedesktop.org/archives/igt-dev/2019-March/010776.html
[15] https://lists.freedesktop.org/archives/igt-dev/2019-March/010827.html
[16] https://lists.freedesktop.org/archives/igt-dev/2019-March/010916.html
[17] https://lists.freedesktop.org/archives/igt-dev/2019-April/011821.htmlAndi Shyti (14):
include/drm-uapi: importi915_drm.hheader file
lib/i915: addgem_engine_topologylibrary andfor_eachloop definition
lib:igt_gt: add execution buffer flags to class helper
lib:igt_gt: makegem_engine_can_store_dword()check engine class
lib:igt_dummyload: usefor_each_context_engine()
test:perf_pmu: use thegem_engine_topologylibrary test/i915:gem_busy: use thegem_engine_topologylibrary test/i915:gem_cs_tlb: use thegem_engine_topologylibrary test/i915:gem_ctx_exec: use thegem_engine_topologylibrary test/i915:gem_exec_basic: use thegem_engine_topologylibrary test/i915:gem_exec_parallel: use thegem_engine_topologylibrary test/i915:gem_exec_store: use thegem_engine_topologylibrary test/i915:gem_wait: use thegem_engine_topologylibrary test/i915:i915_hangman: use thegem_engine_topologylibraryinclude/drm-uapi/i915_drm.h | 209 +++++++++++++++++++++++- lib/Makefile.sources | 2 + lib/i915/gem_engine_topology.c | 282 +++++++++++++++++++++++++++++++++ lib/i915/gem_engine_topology.h | 79 +++++++++ lib/igt.h | 1 + lib/igt_dummyload.c | 29 ++-- lib/igt_gt.c | 30 +++- lib/igt_gt.h | 12 +- lib/meson.build | 1 + tests/i915/gem_busy.c | 133 ++++++---------- tests/i915/gem_cs_tlb.c | 8 +- tests/i915/gem_ctx_exec.c | 15 +- tests/i915/gem_exec_basic.c | 28 ++-- tests/i915/gem_exec_parallel.c | 7 +- tests/i915/gem_exec_store.c | 25 ++- tests/i915/gem_wait.c | 24 +-- tests/i915/i915_hangman.c | 15 +- tests/perf_pmu.c | 151 +++++++++++------- 18 files changed, 822 insertions(+), 229 deletions(-)
Quoted 3 lines
create mode 100644
lib/i915/gem_engine_topology.ccreate mode 100644lib/i915/gem_engine_topology.h
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Hi Tvrtko,
Quoted 11 lines
Quoted 10 lines
updated the following tests to the new APIs:
gem_busygem_cs_tlbgem_ctx_execgem_exec_basicgem_exec_parallelgem_exec_storegem_waiti915_hangman
Quoted 2 lines
So there are no changes in "old" patches, just new patches in series (patches 7 to 14)?
basically yes and very little minor changes that I thought it was not worth mention them.
I have a lot more patches, but I don't want to send them now.
Andi
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev