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/nouveau.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/nouveau.c')
-rw-r--r--libkms/nouveau.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index 15c012e0..228903ff 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.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 "nouveau_drm.h" 43#include "nouveau_drm.h"
44 44
@@ -155,7 +155,7 @@ nouveau_bo_map(struct kms_bo *_bo, void **out)
155 return 0; 155 return 0;
156 } 156 }
157 157
158 map = mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle); 158 map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle);
159 if (map == MAP_FAILED) 159 if (map == MAP_FAILED)
160 return -errno; 160 return -errno;
161 161
@@ -183,7 +183,7 @@ nouveau_bo_destroy(struct kms_bo *_bo)
183 183
184 if (bo->base.ptr) { 184 if (bo->base.ptr) {
185 /* XXX Sanity check map_count */ 185 /* XXX Sanity check map_count */
186 munmap(bo->base.ptr, bo->base.size); 186 drm_munmap(bo->base.ptr, bo->base.size);
187 bo->base.ptr = NULL; 187 bo->base.ptr = NULL;
188 } 188 }
189 189