diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-04-17 14:15:37 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-04-17 14:15:37 +0200 |
commit | 5a96d59ce9d9ad5816e2d0e195afa9902445f594 (patch) | |
tree | edb7458d53b46611fdb74ef21ca512b0f4752ad2 | |
parent | 5432cc4abf672ed3adb10fd5d61a6a5716089a98 (diff) |
Don't always free up memory space when we unpin buffers.
-rw-r--r-- | linux-core/drm_bo.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index 88adfc98..450e448c 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -1399,7 +1399,10 @@ static int drm_buffer_object_validate(drm_buffer_object_t * bo, } else if (bo->pinned_node != NULL) { mutex_lock(&dev->struct_mutex); - drm_mm_put_block(bo->pinned_node); + + if (bo->pinned_node != bo->mem.mm_node) + drm_mm_put_block(bo->pinned_node); + list_del_init(&bo->pinned_lru); bo->pinned_node = NULL; mutex_unlock(&dev->struct_mutex); |