Mesa (master): nouveau/mm: move slabs to correct list on memory release

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Tue Aug 30 05:52:43 PDT 2011


Module: Mesa
Branch: master
Commit: 8476232b080821b859b02add4cb7869fa4a4f2b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8476232b080821b859b02add4cb7869fa4a4f2b3

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Tue Aug 30 14:29:23 2011 +0200

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 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 6c6d28c..91532d7 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);



More information about the mesa-commit mailing list