public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Update the list of engines on the actual context
@ 2020-02-05 11:59 Chris Wilson
  2020-02-05 12:13 ` [igt-dev] " Tvrtko Ursulin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2020-02-05 11:59 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx

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@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 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,
-- 
2.25.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-07 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-05 11:59 [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Update the list of engines on the actual context Chris Wilson
2020-02-05 12:13 ` [igt-dev] " Tvrtko Ursulin
2020-02-05 12:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-07 21:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox