summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-08-30 14:29:23 +0200
committerChristoph Bumiller <[email protected]>2011-08-30 14:52:17 +0200
commit8476232b080821b859b02add4cb7869fa4a4f2b3 (patch)
tree78e03ffd4d1fbf03c5e10bea125faf4336c4ced2
parent210ddf0819b5acf87a614214b6d4b02193aafa4a (diff)
nouveau/mm: move slabs to correct list on memory release
Should get rid of "destroying GPU memory cache with some buffers still in use" message.
-rw-r--r--src/gallium/drivers/nouveau/nouveau_mm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_mm.c b/src/gallium/drivers/nouveau/nouveau_mm.c
index 6c6d28c17f6..91532d7ec72 100644
--- a/src/gallium/drivers/nouveau/nouveau_mm.c
+++ b/src/gallium/drivers/nouveau/nouveau_mm.c
@@ -210,13 +210,13 @@ nouveau_mm_free(struct nouveau_mm_allocation *alloc)
mm_slab_free(slab, alloc->offset >> slab->order);
+ if (slab->free == slab->count) {
+ LIST_DEL(&slab->head);
+ LIST_ADDTAIL(&slab->head, &bucket->free);
+ } else
if (slab->free == 1) {
LIST_DEL(&slab->head);
-
- if (slab->count > 1)
- LIST_ADDTAIL(&slab->head, &bucket->used);
- else
- LIST_ADDTAIL(&slab->head, &bucket->free);
+ LIST_ADDTAIL(&slab->head, &bucket->used);
}
FREE(alloc);