summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_bo.c5
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);