radeon: Add comment to explain logic for freeing dma buffers.
authorPauli Nieminen <suokkos@gmail.com>
Thu, 20 Aug 2009 15:57:35 +0000 (18:57 +0300)
committerPauli Nieminen <suokkos@gmail.com>
Fri, 21 Aug 2009 13:40:14 +0000 (16:40 +0300)
src/mesa/drivers/dri/radeon/radeon_dma.c

index 40082d0798f14d0955565ed3d1a3707f98bfb39f..7e6b74add862c69660744b73634638e6ab2e202b 100644 (file)
@@ -204,6 +204,9 @@ again_alloc:
                }
                insert_at_head(&rmesa->dma.reserved, dma_bo);
        } else {
+               /* We push and pop buffers from end of list so we can keep
+                  counter on unused buffers for later freeing them from
+                  begin of list */
                struct radeon_dma_bo *dma_bo = last_elem(&rmesa->dma.free);
                assert(dma_bo->bo->cref == 1);
                remove_from_list(dma_bo);