[PATCH 15/18] nouveau: use drm_mmap/drm_munmap wrappers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Emil Velikov <emil.l.velikov@xxxxxxxxx>
---
 nouveau/nouveau.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 43f0d3c..da49e17 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -33,11 +33,11 @@
 #include <stdbool.h>
 #include <assert.h>
 #include <errno.h>
-#include <sys/mman.h>
 #include <fcntl.h>
 
 #include <xf86drm.h>
 #include <xf86atomic.h>
+#include "libdrm.h"
 #include "libdrm_lists.h"
 #include "nouveau_drm.h"
 
@@ -381,7 +381,7 @@ nouveau_bo_del(struct nouveau_bo *bo)
 		drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
 	}
 	if (bo->map)
-		munmap(bo->map, bo->size);
+		drm_munmap(bo->map, bo->size);
 	free(nvbo);
 }
 
@@ -607,7 +607,7 @@ nouveau_bo_map(struct nouveau_bo *bo, uint32_t access,
 {
 	struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
 	if (bo->map == NULL) {
-		bo->map = mmap(0, bo->size, PROT_READ | PROT_WRITE,
+		bo->map = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE,
 			       MAP_SHARED, bo->device->fd, nvbo->map_handle);
 		if (bo->map == MAP_FAILED) {
 			bo->map = NULL;
-- 
2.0.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux