summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-08-06 17:53:49 +0200
committerChristian König <[email protected]>2012-08-08 12:35:10 +0200
commit8c44e5a144009a03c20befa6468d19d41c802795 (patch)
tree19c8bea785488929f4f8e0d19e08edd7f98182aa /src/gallium/winsys
parent7528e2104fdda88a9eca5d84d979a21f5c517dc9 (diff)
radeon/winsys: fix winsys VM handling
Move releasing the VM area after closing the bo handle. This partially fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45018 Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 2626586afd6..464842c0c20 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -319,13 +319,14 @@ static void radeon_bo_destroy(struct pb_buffer *_buf)
if (bo->ptr)
os_munmap(bo->ptr, bo->base.size);
+ /* Close object. */
+ args.handle = bo->handle;
+ drmIoctl(bo->rws->fd, DRM_IOCTL_GEM_CLOSE, &args);
+
if (mgr->va) {
radeon_bomgr_free_va(mgr, bo->va, bo->va_size);
}
- /* Close object. */
- args.handle = bo->handle;
- drmIoctl(bo->rws->fd, DRM_IOCTL_GEM_CLOSE, &args);
pipe_mutex_destroy(bo->map_mutex);
FREE(bo);
}