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

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Feb 23 15:59:34 UTC 2023


On 2023-02-23 at 09:11:19 +0100, Zbigniew Kempczyński wrote:
> 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>

lgtm,
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

--
Kamil

> ---
>  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