diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-12 15:47:00 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-12 15:47:00 +0100 |
commit | 5ce86f88a0a9b24564a6349a70de5797b814b108 (patch) | |
tree | 7afa570f19234fdb885e6acc82815412ff686713 | |
parent | 8f6ebd4ac03f7c3c751d4d6bb4096d0285e34517 (diff) |
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>
-rw-r--r-- | lib/drmtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c index b198aa47..ebc396f0 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -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; |