summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_bufmgr.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-08-04 13:00:56 -0700
committerEric Anholt <eric@anholt.net>2014-08-11 14:45:32 -0700
commitcdc208bdaf90017c2e1aaa54d2318b956e801ca0 (patch)
treec159421a4e85b6920593b4ee3c5b768f15c9b82d /src/gallium/drivers/vc4/vc4_bufmgr.c
parentd2cc7f97df655bbca6486fbe81e35139215d7b72 (diff)
vc4: Don't forget to unmap the GEM BO when freeing.
Otherwise it'll stick around forever.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_bufmgr.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_bufmgr.c3
1 files changed, 3 insertions, 0 deletions
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);