[PATCH i-g-t] tests/amdgpu: fix VM test issue

Christian König christian.koenig at amd.com
Thu Dec 14 09:53:31 UTC 2023


Am 14.12.23 um 10:07 schrieb Jesse Zhang:
> In some cases, the size of Vram and GTT is not large, such as mobile devices.
> It should be skipped.

Well how much memory is actually needed? The unaligned mmap test should 
be able to work with something like 2-8MiB.

Maybe we are just using something to big here, that below looks like we 
are using a 1GiB buffer.

Christian.

>
> Cc: Vitaly Prosyak <vitaly.prosyak at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Christian Koenig <christian.koenig at amd.com>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
>
> Signed-off-by: Jesse zhang <jesse.zhang at amd.com>
> ---
>   tests/amdgpu/amd_vm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/amdgpu/amd_vm.c b/tests/amdgpu/amd_vm.c
> index 11be25ae8..0dde28e2e 100644
> --- a/tests/amdgpu/amd_vm.c
> +++ b/tests/amdgpu/amd_vm.c
> @@ -127,8 +127,8 @@ amdgpu_vm_unaligned_map(amdgpu_device_handle device_handle)
>   	request.preferred_heap = AMDGPU_GEM_DOMAIN_VRAM;
>   	request.flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS;
>   
> -	r = amdgpu_bo_alloc(device_handle, &request, &buf_handle);
> -	igt_assert_eq(r, 0);
> +	/* Don't let the test fail if the device doesn't have enough VRAM */
> +	igt_skip_on(amdgpu_bo_alloc(device_handle, &request, &buf_handle));
>   
>   	r = amdgpu_va_range_alloc(device_handle, amdgpu_gpu_va_range_general,
>   				4ULL << 30, 1ULL << 30, 0, &vmc_addr,



More information about the igt-dev mailing list