[igt-dev] [PATCH i-g-t] lib/i915: Use intel_ctx_0() for submission tests (v2)

Jason Ekstrand jason at jlekstrand.net
Wed Jun 16 17:08:39 UTC 2021


This does make the assumption that ctx0 has the default set of engines
but, now that we've converted everything to intel_ctx_t, this assumption
should be ok.

v2 (Zbigniew Kempczyński):
 - Use for_each_ctx_engine with intel_ctx_0() instead of
   for_each_physical_ring()

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 lib/i915/gem_submission.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index bd4bbb3ef..1af009fb1 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -202,7 +202,7 @@ void gem_test_engine(int i915, unsigned int engine)
 	if (engine == ALL_ENGINES) {
 		const struct intel_execution_engine2 *e2;
 
-		__for_each_physical_engine(i915, e2) {
+		for_each_ctx_engine(i915, intel_ctx_0(i915), e2) {
 			execbuf.flags = e2->flags;
 			gem_execbuf(i915, &execbuf);
 		}
@@ -385,7 +385,7 @@ unsigned int gem_submission_measure(int i915, unsigned int engine)
 		struct intel_execution_engine2 *e;
 
 		size = -1;
-		__for_each_physical_engine(i915, e) {
+		for_each_ctx_engine(i915, intel_ctx_0(i915), e) {
 			unsigned int this =  __measure_ringsize(i915, e->flags);
 			if (this < size)
 				size = this;
-- 
2.31.1



More information about the igt-dev mailing list