From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emil Velikov Subject: [PATCH 15/18] nouveau: use drm_mmap/drm_munmap wrappers Date: Sun, 7 Sep 2014 22:30:10 +0100 Message-ID: <1410125413-19465-16-git-send-email-emil.l.velikov@gmail.com> References: <1410125413-19465-1-git-send-email-emil.l.velikov@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A0ED6E20C for ; Sun, 7 Sep 2014 14:31:40 -0700 (PDT) Received: by mail-wg0-f50.google.com with SMTP id x13so2343305wgg.33 for ; Sun, 07 Sep 2014 14:31:39 -0700 (PDT) In-Reply-To: <1410125413-19465-1-git-send-email-emil.l.velikov@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org Cc: emil.l.velikov@gmail.com List-Id: dri-devel@lists.freedesktop.org Signed-off-by: Emil Velikov --- 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 #include #include -#include #include #include #include +#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