diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2014-09-07 20:03:05 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2014-09-28 17:09:34 +0100 |
commit | faf51d5694e3f0ec12c7fa1fd2f87fc96a300fe3 (patch) | |
tree | b7f7468856eefc3305f1bdea7c4ec6964d91e07c | |
parent | 4c2766b69c261703c62131b5e4200d0e164b5eb4 (diff) | |
download | libdrm-faf51d5694e3f0ec12c7fa1fd2f87fc96a300fe3.tar.gz libdrm-faf51d5694e3f0ec12c7fa1fd2f87fc96a300fe3.tar.bz2 libdrm-faf51d5694e3f0ec12c7fa1fd2f87fc96a300fe3.zip |
drm: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
-rw-r--r-- | xf86drm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -48,7 +48,6 @@ #include <sys/stat.h> #define stat_t struct stat #include <sys/ioctl.h> -#include <sys/mman.h> #include <sys/time.h> #include <stdarg.h> @@ -58,6 +57,7 @@ #endif #include "xf86drm.h" +#include "libdrm.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #define DRM_MAJOR 145 @@ -1137,7 +1137,7 @@ int drmMap(int fd, drm_handle_t handle, drmSize size, drmAddressPtr address) size = (size + pagesize_mask) & ~pagesize_mask; - *address = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, handle); + *address = drm_mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, handle); if (*address == MAP_FAILED) return -errno; return 0; @@ -1157,7 +1157,7 @@ int drmMap(int fd, drm_handle_t handle, drmSize size, drmAddressPtr address) */ int drmUnmap(drmAddress address, drmSize size) { - return munmap(address, size); + return drm_munmap(address, size); } drmBufInfoPtr drmGetBufInfo(int fd) @@ -1264,7 +1264,7 @@ int drmUnmapBufs(drmBufMapPtr bufs) int i; for (i = 0; i < bufs->count; i++) { - munmap(bufs->list[i].address, bufs->list[i].total); + drm_munmap(bufs->list[i].address, bufs->list[i].total); } drmFree(bufs->list); |