From 84badffe5e1995eae6739267bdc3fd9ef7a55f32 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sun, 7 Sep 2014 19:44:48 +0100 Subject: freedreno: use drm_mmap/drm_munmap wrappers Signed-off-by: Emil Velikov Reviewed-by: Jakob Bornecrantz --- freedreno/kgsl/kgsl_bo.c | 2 +- freedreno/kgsl/kgsl_ringbuffer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'freedreno/kgsl') diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c index c8680973..4e492dde 100644 --- a/freedreno/kgsl/kgsl_bo.c +++ b/freedreno/kgsl/kgsl_bo.c @@ -186,7 +186,7 @@ fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size) * thinks the buffer hasn't be allocate and fails */ if (bo) { - void *fbmem = mmap(NULL, size, PROT_READ | PROT_WRITE, + void *fbmem = drm_mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0); struct kgsl_map_user_mem req = { .memtype = KGSL_USER_MEM_TYPE_ADDR, diff --git a/freedreno/kgsl/kgsl_ringbuffer.c b/freedreno/kgsl/kgsl_ringbuffer.c index dc3c9c25..da99741e 100644 --- a/freedreno/kgsl/kgsl_ringbuffer.c +++ b/freedreno/kgsl/kgsl_ringbuffer.c @@ -60,7 +60,7 @@ static void kgsl_rb_bo_del(struct kgsl_rb_bo *bo) }; int ret; - munmap(bo->hostptr, bo->size); + drm_munmap(bo->hostptr, bo->size); ret = ioctl(bo->pipe->fd, IOCTL_KGSL_SHAREDMEM_FREE, &req); if (ret) { @@ -93,7 +93,7 @@ static struct kgsl_rb_bo * kgsl_rb_bo_new(struct kgsl_pipe *pipe, uint32_t size) bo->pipe = pipe; bo->gpuaddr = req.gpuaddr; bo->size = size; - bo->hostptr = mmap(NULL, size, PROT_WRITE|PROT_READ, + bo->hostptr = drm_mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED, pipe->fd, req.gpuaddr); return bo; -- cgit v1.2.3