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/vmwgfx.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/vmwgfx.c')
-rw-r--r--libkms/vmwgfx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libkms/vmwgfx.c b/libkms/vmwgfx.c
index 08163a16..bc04133f 100644
--- a/libkms/vmwgfx.c
+++ b/libkms/vmwgfx.c
@@ -35,8 +35,8 @@
35#include <string.h> 35#include <string.h>
36#include "internal.h" 36#include "internal.h"
37 37
38#include <sys/mman.h>
39#include "xf86drm.h" 38#include "xf86drm.h"
39#include "libdrm.h"
40#include "vmwgfx_drm.h" 40#include "vmwgfx_drm.h"
41 41
42struct vmwgfx_bo 42struct vmwgfx_bo
@@ -146,7 +146,7 @@ vmwgfx_bo_map(struct kms_bo *_bo, void **out)
146 return 0; 146 return 0;
147 } 147 }
148 148
149 map = mmap(NULL, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle); 149 map = drm_mmap(NULL, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle);
150 if (map == MAP_FAILED) 150 if (map == MAP_FAILED)
151 return -errno; 151 return -errno;
152 152
@@ -173,7 +173,7 @@ vmwgfx_bo_destroy(struct kms_bo *_bo)
173 173
174 if (bo->base.ptr) { 174 if (bo->base.ptr) {
175 /* XXX Sanity check map_count */ 175 /* XXX Sanity check map_count */
176 munmap(bo->base.ptr, bo->base.size); 176 drm_munmap(bo->base.ptr, bo->base.size);
177 bo->base.ptr = NULL; 177 bo->base.ptr = NULL;
178 } 178 }
179 179