On 05/02/2020 11:59, Chris Wilson wrote:
We want to iterate the set of physical engines on this context, so
update the iterators to act on a particular context.
This tunnel keeps on getting longer.
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
lib/i915/gem_engine_topology.h | 7 +++++--
tests/i915/gem_ctx_exec.c | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/i915/gem_engine_topology.h b/lib/i915/gem_engine_topology.h
index e40d7ec83..027d86be2 100644
--- a/lib/i915/gem_engine_topology.h
+++ b/lib/i915/gem_engine_topology.h
@@ -67,9 +67,12 @@ struct intel_execution_engine2 gem_eb_flags_to_engine(unsigned int flags);
intel_next_engine(&i__))
/* needs to replace "for_each_physical_engine" when conflicts are fixed */
-#define __for_each_physical_engine(fd__, e__) \
- for (struct intel_engine_data i__ = intel_init_engine_list(fd__, 0); \
+#define ____for_each_physical_engine(fd__, ctx__, e__) \
+ for (struct intel_engine_data i__ = intel_init_engine_list(fd__, ctx__); \
((e__) = intel_get_current_physical_engine(&i__)); \
intel_next_engine(&i__))
+#define __for_each_physical_engine(fd__, e__) \
+ ____for_each_physical_engine(fd__, 0, e__)
+
#endif /* GEM_ENGINE_TOPOLOGY_H */
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index aeb8d2976..5b4e4b3db 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -226,7 +226,7 @@ static void nohangcheck_hostile(int i915)
igt_require(__enable_hangcheck(dir, false));
- __for_each_physical_engine(i915, e) {
+ ____for_each_physical_engine(i915, ctx, e) {
igt_spin_t *spin;
spin = igt_spin_new(i915, ctx,
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx