aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov2014-09-07 13:42:08 -0500
committerEmil Velikov2014-09-28 11:09:34 -0500
commitc98c54f8434e2d38353bbf65b538bfcbf709409b (patch)
tree87365c377925aeea2477c7f11986035e506079a4 /nouveau
parentdadc9eff9fd606335a7b3d5d58065a2e8d629672 (diff)
downloadexternal-libgbm-c98c54f8434e2d38353bbf65b538bfcbf709409b.tar.gz
external-libgbm-c98c54f8434e2d38353bbf65b538bfcbf709409b.tar.xz
external-libgbm-c98c54f8434e2d38353bbf65b538bfcbf709409b.zip
nouveau: use drm_mmap/drm_munmap wrappers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'nouveau')
-rw-r--r--nouveau/nouveau.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 43f0d3c6..da49e179 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -33,11 +33,11 @@
33#include <stdbool.h> 33#include <stdbool.h>
34#include <assert.h> 34#include <assert.h>
35#include <errno.h> 35#include <errno.h>
36#include <sys/mman.h>
37#include <fcntl.h> 36#include <fcntl.h>
38 37
39#include <xf86drm.h> 38#include <xf86drm.h>
40#include <xf86atomic.h> 39#include <xf86atomic.h>
40#include "libdrm.h"
41#include "libdrm_lists.h" 41#include "libdrm_lists.h"
42#include "nouveau_drm.h" 42#include "nouveau_drm.h"
43 43
@@ -381,7 +381,7 @@ nouveau_bo_del(struct nouveau_bo *bo)
381 drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req); 381 drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
382 } 382 }
383 if (bo->map) 383 if (bo->map)
384 munmap(bo->map, bo->size); 384 drm_munmap(bo->map, bo->size);
385 free(nvbo); 385 free(nvbo);
386} 386}
387 387
@@ -607,7 +607,7 @@ nouveau_bo_map(struct nouveau_bo *bo, uint32_t access,
607{ 607{
608 struct nouveau_bo_priv *nvbo = nouveau_bo(bo); 608 struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
609 if (bo->map == NULL) { 609 if (bo->map == NULL) {
610 bo->map = mmap(0, bo->size, PROT_READ | PROT_WRITE, 610 bo->map = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE,
611 MAP_SHARED, bo->device->fd, nvbo->map_handle); 611 MAP_SHARED, bo->device->fd, nvbo->map_handle);
612 if (bo->map == MAP_FAILED) { 612 if (bo->map == MAP_FAILED) {
613 bo->map = NULL; 613 bo->map = NULL;