[PATCH 1/2] test/intel/prime_mmap: Limit aperture testing to machines with an aperture

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Apr 15 17:09:54 UTC 2025


Hi Pravalika,
On 2025-04-15 at 19:01:05 +0530, Pravalika Gurram wrote:
> From: Chris Wilson <chris.p.wilson at linux.intel.com>
> 
> The test_aperture_limit looks at the handling of internal GGTT mmaps for
> the dmabuf and checking what happens if we try to mmap more than we can
> fit inside the aperture. Thus if we have no aperture, there is no corner
> case regarding the mmapable aperture that requires validation.
> 
> Signed-off-by: Chris Wilson <chris.p.wilson at linux.intel.com>
> Signed-off-by: Pravalika Gurram <pravalika.gurram at intel.com>

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

> ---
>  tests/intel/prime_mmap.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/intel/prime_mmap.c b/tests/intel/prime_mmap.c
> index 6de54b840..e3a3a021b 100644
> --- a/tests/intel/prime_mmap.c
> +++ b/tests/intel/prime_mmap.c
> @@ -490,6 +490,10 @@ test_aperture_limit(uint32_t region, uint64_t size)
>  	uint64_t size1 = (gem_mappable_aperture_size(fd) * 7) / 8;
>  	uint64_t size2 = (gem_mappable_aperture_size(fd) * 3) / 8;
>  
> +	igt_require(gem_has_mappable_ggtt(fd));
> +	igt_require(size1 >= size2);
> +	igt_require(size2 >= size);
> +
>  	handle1 = gem_create(fd, size1);
>  	dma_buf_fd1 = prime_handle_to_fd_for_mmap(fd, handle1);
>  	igt_assert(errno == 0);
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list