aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov2014-09-07 13:41:37 -0500
committerEmil Velikov2014-09-28 11:09:34 -0500
commitdadc9eff9fd606335a7b3d5d58065a2e8d629672 (patch)
tree2ef0dab8242a8d61336d4c643b9df8a65167f128 /libkms/intel.c
parentfaf51d5694e3f0ec12c7fa1fd2f87fc96a300fe3 (diff)
downloadexternal-libdrm-dadc9eff9fd606335a7b3d5d58065a2e8d629672.tar.gz
external-libdrm-dadc9eff9fd606335a7b3d5d58065a2e8d629672.tar.xz
external-libdrm-dadc9eff9fd606335a7b3d5d58065a2e8d629672.zip
libkms: use drm_mmap/drm_munmap wrappers
... for all by exynos. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'libkms/intel.c')
-rw-r--r--libkms/intel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libkms/intel.c b/libkms/intel.c
index b006ea48..51a7fd2e 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -36,9 +36,9 @@
36#include <string.h> 36#include <string.h>
37#include "internal.h" 37#include "internal.h"
38 38
39#include <sys/mman.h>
40#include <sys/ioctl.h> 39#include <sys/ioctl.h>
41#include "xf86drm.h" 40#include "xf86drm.h"
41#include "libdrm.h"
42 42
43#include "i915_drm.h" 43#include "i915_drm.h"
44 44
@@ -173,7 +173,7 @@ intel_bo_map(struct kms_bo *_bo, void **out)
173 if (ret) 173 if (ret)
174 return ret; 174 return ret;
175 175
176 map = mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset); 176 map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset);
177 if (map == MAP_FAILED) 177 if (map == MAP_FAILED)
178 return -errno; 178 return -errno;
179 179
@@ -201,7 +201,7 @@ intel_bo_destroy(struct kms_bo *_bo)
201 201
202 if (bo->base.ptr) { 202 if (bo->base.ptr) {
203 /* XXX Sanity check map_count */ 203 /* XXX Sanity check map_count */
204 munmap(bo->base.ptr, bo->base.size); 204 drm_munmap(bo->base.ptr, bo->base.size);
205 bo->base.ptr = NULL; 205 bo->base.ptr = NULL;
206 } 206 }
207 207