[igt-dev] [PATCH i-g-t] tests/i915/gem_lmem_swapping: Fix bug in test_smem_oom

Arjun Melkaveri arjun.melkaveri at intel.com
Fri Apr 1 07:25:04 UTC 2022


ctx was not initialized with all physical engines,
after device reopening.
This change would resolve assert issue seen in __do_evict.

Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
Cc: Ramalingam C <ramalingam.c at intel.com>
Signed-off-by: Arjun Melkaveri <arjun.melkaveri at intel.com>
---
 tests/i915/gem_lmem_swapping.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/i915/gem_lmem_swapping.c b/tests/i915/gem_lmem_swapping.c
index 43f0688f..fb260bcb 100644
--- a/tests/i915/gem_lmem_swapping.c
+++ b/tests/i915/gem_lmem_swapping.c
@@ -428,6 +428,9 @@ static void test_smem_oom(int i915,
 
 		fill_params(i915, &params, region, 0, 1, true);
 
+		ctx = intel_ctx_create_all_physical(fd);
+		__gem_context_set_persistence(fd, ctx->id, false);
+
 		igt_install_exit_handler(smem_oom_exit_handler);
 		__do_evict(fd, ctx, &region->region, &params,
 			   params.seed + child + 1);
-- 
2.25.1



More information about the igt-dev mailing list