summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_resource.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-12 16:45:44 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-15 08:03:34 -0700
commit1ffca961abe7d4f3dfc7884745ed9a96209c2731 (patch)
treec15aefe0b07ea11b6286064ab3bcd39462e93412 /src/gallium/drivers/panfrost/pan_resource.c
parent9981b6ef0fa387675e81a2966637080bb74f7c01 (diff)
panfrost: Remove all old allocators
With the new refactor, this all becomes dead code. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_resource.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_resource.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index cdff805ab13..5f6eaa42c98 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -633,54 +633,6 @@ panfrost_transfer_flush_region(struct pipe_context *pctx,
}
}
-static struct pb_slab *
-panfrost_slab_alloc(void *priv, unsigned heap, unsigned entry_size, unsigned group_index)
-{
- struct panfrost_screen *screen = (struct panfrost_screen *) priv;
- struct panfrost_memory *mem = rzalloc(screen, struct panfrost_memory);
-
- size_t slab_size = (1 << (MAX_SLAB_ENTRY_SIZE + 1));
-
- mem->slab.num_entries = slab_size / entry_size;
- mem->slab.num_free = mem->slab.num_entries;
-
- LIST_INITHEAD(&mem->slab.free);
- for (unsigned i = 0; i < mem->slab.num_entries; ++i) {
- /* Create a slab entry */
- struct panfrost_memory_entry *entry = rzalloc(mem, struct panfrost_memory_entry);
- entry->offset = entry_size * i;
-
- entry->base.slab = &mem->slab;
- entry->base.group_index = group_index;
-
- LIST_ADDTAIL(&entry->base.head, &mem->slab.free);
- }
-
- /* Actually allocate the memory from kernel-space. Mapped, same_va, no
- * special flags */
-
- panfrost_drm_allocate_slab(screen, mem, slab_size / 4096, true, 0, 0, 0);
-
- return &mem->slab;
-}
-
-static bool
-panfrost_slab_can_reclaim(void *priv, struct pb_slab_entry *entry)
-{
- struct panfrost_memory_entry *p_entry = (struct panfrost_memory_entry *) entry;
- return p_entry->freed;
-}
-
-static void
-panfrost_slab_free(void *priv, struct pb_slab *slab)
-{
- struct panfrost_memory *mem = (struct panfrost_memory *) slab;
- struct panfrost_screen *screen = (struct panfrost_screen *) priv;
-
- panfrost_drm_free_slab(screen, mem);
- ralloc_free(mem);
-}
-
static void
panfrost_invalidate_resource(struct pipe_context *pctx, struct pipe_resource *prsc)
{
@@ -791,24 +743,6 @@ panfrost_resource_screen_init(struct panfrost_screen *pscreen)
pscreen->base.transfer_helper = u_transfer_helper_create(&transfer_vtbl,
true, false,
true, true);
-
- pb_slabs_init(&pscreen->slabs,
- MIN_SLAB_ENTRY_SIZE,
- MAX_SLAB_ENTRY_SIZE,
-
- 3, /* Number of heaps */
-
- pscreen,
-
- panfrost_slab_can_reclaim,
- panfrost_slab_alloc,
- panfrost_slab_free);
-}
-
-void
-panfrost_resource_screen_deinit(struct panfrost_screen *pscreen)
-{
- pb_slabs_deinit(&pscreen->slabs);
}
void