[Intel-gfx] [PATCH i-g-t v2 03/11] lib/i915/gem_mman: add fixed mode to mmap__cpu_coherent

Dixit, Ashutosh ashutosh.dixit at intel.com
Wed Jul 28 22:24:38 UTC 2021


On Wed, 28 Jul 2021 03:30:33 -0700, Matthew Auld wrote:
>
> diff --git a/lib/i915/gem_mman.c b/lib/i915/gem_mman.c
> index 222e8896..337d28fb 100644
> --- a/lib/i915/gem_mman.c
> +++ b/lib/i915/gem_mman.c
> @@ -580,6 +580,8 @@ void *gem_mmap__cpu_coherent(int fd, uint32_t handle, uint64_t offset,
>	igt_assert(offset == 0);
>
>	ptr = __gem_mmap__cpu_coherent(fd, handle, offset, size, prot);
> +	if (!ptr)
> +		ptr = __gem_mmap_offset__fixed(fd, handle, offset, size, prot);
>	igt_assert(ptr);

Shouldn't this go in __gem_mmap__cpu_coherent instead? Maybe right after
__gem_mmap_offset__cpu.


More information about the Intel-gfx mailing list