return ret;
}
- /* Validate the buffer into its pinned location, with no
- * pending fence.
+ /* Validate the buffer into its pinned location, with no pending
+ * fence.
*/
ret = drm_buffer_object_validate(bo, bo->fence_class, 0, 0);
if (ret) {
return ret;
}
- /* Pull the buffer off of the LRU and add it to the pinned
- * list
- */
+ /* Add our buffer to the pinned list */
bo->pinned_mem_type = bo->mem.mem_type;
mutex_lock(&dev->struct_mutex);
- list_del_init(&bo->lru);
list_del_init(&bo->pinned_lru);
drm_bo_add_to_pinned_lru(bo);
bo->pinned_node = bo->mem.mm_node;
}
- bo->pinned = pin;
mutex_unlock(&dev->struct_mutex);
} else {
list_del_init(&bo->pinned_lru);
bo->pinned_node = NULL;
- bo->pinned = pin;
mutex_unlock(&dev->struct_mutex);
}
+ bo->pinned = pin;
mutex_unlock(&bo->mutex);
return 0;
}