[igt-dev] [PATCH i-g-t] tests/i915/gem_softpin: Use valid context when iterating over engines

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Apr 4 17:15:34 UTC 2022


For previous gens this bug was not discovered because newly created
context over physical engines has same number of engines. For discrete
this is not true so using bigger index taken from new context on
default is leading to -EINVAL.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 tests/i915/gem_softpin.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/i915/gem_softpin.c b/tests/i915/gem_softpin.c
index 34fc9983ff..448b4c4b9e 100644
--- a/tests/i915/gem_softpin.c
+++ b/tests/i915/gem_softpin.c
@@ -1002,6 +1002,7 @@ static void test_allocator_evict(int fd, const intel_ctx_t *ctx,
 	execbuf.buffer_count = 1;
 	if (gen < 6)
 		execbuf.flags |= I915_EXEC_SECURE;
+	execbuf.rsvd1 = ctx->id;
 
 	batches = calloc(count, sizeof(*batches));
 	igt_assert(batches);
-- 
2.32.0



More information about the igt-dev mailing list