Mesa (master): panfrost: Release transient pools

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 20 13:49:07 UTC 2019


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

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Wed Jun 19 13:16:14 2019 +0200

panfrost: Release transient pools

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/pan_context.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index e4a04dd821f..470a259419b 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -2522,6 +2522,13 @@ panfrost_destroy(struct pipe_context *pipe)
         screen->driver->free_slab(screen, &panfrost->shaders);
         screen->driver->free_slab(screen, &panfrost->tiler_heap);
         screen->driver->free_slab(screen, &panfrost->tiler_polygon_list);
+        screen->driver->free_slab(screen, &panfrost->tiler_dummy);
+
+        for (int i = 0; i < ARRAY_SIZE(panfrost->transient_pools); ++i) {
+                struct panfrost_memory_entry *entry;
+                entry = panfrost->transient_pools[i].entries[0];
+                pb_slab_free(&screen->slabs, (struct pb_slab_entry *)entry);
+        }
 
         ralloc_free(pipe);
 }
@@ -2680,7 +2687,6 @@ panfrost_setup_hardware(struct panfrost_context *ctx)
         screen->driver->allocate_slab(screen, &ctx->tiler_heap, 32768, false, PAN_ALLOCATE_INVISIBLE | PAN_ALLOCATE_GROWABLE, 1, 128);
         screen->driver->allocate_slab(screen, &ctx->tiler_polygon_list, 128*128, false, PAN_ALLOCATE_INVISIBLE | PAN_ALLOCATE_GROWABLE, 1, 128);
         screen->driver->allocate_slab(screen, &ctx->tiler_dummy, 1, false, PAN_ALLOCATE_INVISIBLE, 0, 0);
-
 }
 
 /* New context creation, which also does hardware initialisation since I don't




More information about the mesa-commit mailing list