From cdc208bdaf90017c2e1aaa54d2318b956e801ca0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 4 Aug 2014 13:00:56 -0700 Subject: [PATCH] vc4: Don't forget to unmap the GEM BO when freeing. Otherwise it'll stick around forever. --- src/gallium/drivers/vc4/vc4_bufmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c index 653787e1905..581ba89fd07 100644 --- a/src/gallium/drivers/vc4/vc4_bufmgr.c +++ b/src/gallium/drivers/vc4/vc4_bufmgr.c @@ -75,6 +75,9 @@ vc4_bo_free(struct vc4_bo *bo) #ifndef USE_VC4_SIMULATOR struct vc4_screen *screen = bo->screen; + if (bo->map) + munmap(bo->map, bo->size); + struct drm_gem_close c; c.handle = bo->handle; int ret = drmIoctl(screen->fd, DRM_IOCTL_GEM_CLOSE, &c); -- 2.30.2