summaryrefslogtreecommitdiffstats
path: root/src/etnaviv/drm
diff options
context:
space:
mode:
authorGuido Günther <[email protected]>2019-05-31 14:35:06 +0200
committerGuido Günther <[email protected]>2019-06-05 08:58:05 +0000
commite87d128b52b1ee9e5ac16481ba1736a30a4119ef (patch)
treed72ab3281204bdf8696d6d914919f0be6643bf3e /src/etnaviv/drm
parent2ebd444c100318f27776c4214c6c16555a3262e5 (diff)
etnaviv: drm: Use mesa's os_m{un,}map
Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/etnaviv/drm')
-rw-r--r--src/etnaviv/drm/etnaviv_bo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/etnaviv/drm/etnaviv_bo.c b/src/etnaviv/drm/etnaviv_bo.c
index 31ad484da4f..abdd1817cce 100644
--- a/src/etnaviv/drm/etnaviv_bo.c
+++ b/src/etnaviv/drm/etnaviv_bo.c
@@ -24,6 +24,8 @@
* Christian Gmeiner <[email protected]>
*/
+#include "os/os_mman.h"
+
#include "etnaviv_priv.h"
#include "etnaviv_drmif.h"
@@ -42,7 +44,7 @@ static void set_name(struct etna_bo *bo, uint32_t name)
void bo_del(struct etna_bo *bo)
{
if (bo->map)
- drm_munmap(bo->map, bo->size);
+ os_munmap(bo->map, bo->size);
if (bo->name)
drmHashDelete(bo->dev->name_table, bo->name);
@@ -314,8 +316,8 @@ void *etna_bo_map(struct etna_bo *bo)
get_buffer_info(bo);
}
- bo->map = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE,
- MAP_SHARED, bo->dev->fd, bo->offset);
+ bo->map = os_mmap(0, bo->size, PROT_READ | PROT_WRITE,
+ MAP_SHARED, bo->dev->fd, bo->offset);
if (bo->map == MAP_FAILED) {
ERROR_MSG("mmap failed: %s", strerror(errno));
bo->map = NULL;