[igt-dev] [PATCH i-g-t] i915/gem_softpin: Ensure gpu is idle when we use manual placement

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Feb 23 08:11:19 UTC 2023


For separate execution there is no risk we may reserve offset which is
still in use by some job. But for running bunch of allocator tests
which may be still on gpu such risk exists. To avoid failures on
grouped execution ensure for 'nopin' subtests gpu is idle first.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 tests/i915/gem_softpin.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_softpin.c b/tests/i915/gem_softpin.c
index ad6d3f531c..c29bfd43d9 100644
--- a/tests/i915/gem_softpin.c
+++ b/tests/i915/gem_softpin.c
@@ -1449,13 +1449,17 @@ igt_main
 
 		igt_describe("Check that we can combine manual placement with automatic"
 			     " GTT placement.");
-		igt_subtest("allocator-nopin")
+		igt_subtest("allocator-nopin") {
+			gem_quiescent_gpu(fd);
 			test_allocator_nopin(fd, false);
+		}
 
 		igt_describe("Check that we can combine manual placement with automatic"
 			     " GTT placement and reserves/unreserves space for objects.");
-		igt_subtest("allocator-nopin-reserve")
+		igt_subtest("allocator-nopin-reserve") {
+			gem_quiescent_gpu(fd);
 			test_allocator_nopin(fd, true);
+		}
 
 		igt_describe("Check if multiple processes can use alloctor.");
 		igt_subtest("allocator-fork")
-- 
2.34.1



More information about the igt-dev mailing list