From 8476232b080821b859b02add4cb7869fa4a4f2b3 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Tue, 30 Aug 2011 14:29:23 +0200 Subject: [PATCH] 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. --- src/gallium/drivers/nouveau/nouveau_mm.c | 10 +++++----- 1 file 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); -- 2.30.2