mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-22 15:26:21 +00:00
Use mmap64() for performing the GTT mapping
Although the address space for GTT mappings may only be 32-bits, we need to use the explicit 64-bit mmap interface so that on a 32-bit platform the offset we pass is not truncated to 31-bits. Fixes gem_mmap_offset_exhaustion on 32-bit platforms. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
8f6ebd4ac0
commit
5ce86f88a0
@ -303,7 +303,7 @@ void *gem_mmap(int fd, uint32_t handle, int size, int prot)
|
||||
if (drmIoctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg))
|
||||
return NULL;
|
||||
|
||||
ptr = mmap(0, size, prot, MAP_SHARED, fd, mmap_arg.offset);
|
||||
ptr = mmap64(0, size, prot, MAP_SHARED, fd, mmap_arg.offset);
|
||||
if (ptr == MAP_FAILED)
|
||||
ptr = NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user