summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-12 14:09:57 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-12 15:31:48 -0700
commitb68778e6de2da1921cf1c19cff8f54cff46eb37d (patch)
tree9a6ce98df38537d2469e590bb80d530ec3704ff4 /src
parentee32700f37583613855965995018ac5b1f42e8a3 (diff)
panfrost: Remove transient pool abstraction
Now that it has been totally replaced by the borrow mechanism, it is now unused code. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c29
-rw-r--r--src/gallium/drivers/panfrost/pan_context.h25
2 files changed, 0 insertions, 54 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index d48747bbc61..4bbf5230c6c 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -246,13 +246,6 @@ panfrost_attach_vt_framebuffer(struct panfrost_context *ctx, bool skippable)
static void
panfrost_invalidate_frame(struct panfrost_context *ctx)
{
- unsigned transient_count = ctx->transient_pools[ctx->cmdstream_i].entry_index*ctx->transient_pools[0].entry_size + ctx->transient_pools[ctx->cmdstream_i].entry_offset;
- DBG("Uploaded transient %d bytes\n", transient_count);
-
- /* Rotate cmdstream */
- if ((++ctx->cmdstream_i) == (sizeof(ctx->transient_pools) / sizeof(ctx->transient_pools[0])))
- ctx->cmdstream_i = 0;
-
if (ctx->require_sfbd)
ctx->vt_framebuffer_sfbd = panfrost_emit_sfbd(ctx, ~0);
else
@@ -265,12 +258,6 @@ panfrost_invalidate_frame(struct panfrost_context *ctx)
/* Reset varyings allocated */
ctx->varying_height = 0;
- /* The transient cmdstream is dirty every frame; the only bits worth preserving
- * (textures, shaders, etc) are in other buffers anyways */
-
- ctx->transient_pools[ctx->cmdstream_i].entry_index = 0;
- ctx->transient_pools[ctx->cmdstream_i].entry_offset = 0;
-
if (ctx->rasterizer)
ctx->dirty |= PAN_DIRTY_RASTERIZER;
@@ -2517,12 +2504,6 @@ panfrost_destroy(struct pipe_context *pipe)
panfrost_drm_free_slab(screen, &panfrost->tiler_polygon_list);
panfrost_drm_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);
}
@@ -2663,16 +2644,6 @@ panfrost_setup_hardware(struct panfrost_context *ctx)
struct pipe_context *gallium = (struct pipe_context *) ctx;
struct panfrost_screen *screen = pan_screen(gallium->screen);
- for (int i = 0; i < ARRAY_SIZE(ctx->transient_pools); ++i) {
- /* Allocate the beginning of the transient pool */
- int entry_size = (1 << 22); /* 4MB */
-
- ctx->transient_pools[i].entry_size = entry_size;
- ctx->transient_pools[i].entry_count = 1;
-
- ctx->transient_pools[i].entries[0] = (struct panfrost_memory_entry *) pb_slab_alloc(&screen->slabs, entry_size, HEAP_TRANSIENT);
- }
-
panfrost_drm_allocate_slab(screen, &ctx->scratchpad, 64, false, 0, 0, 0);
panfrost_drm_allocate_slab(screen, &ctx->varying_mem, 16384, false, PAN_ALLOCATE_INVISIBLE | PAN_ALLOCATE_COHERENT_LOCAL, 0, 0);
panfrost_drm_allocate_slab(screen, &ctx->shaders, 4096, true, PAN_ALLOCATE_EXECUTE, 0, 0);
diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h
index e8b91019053..cd9a034975d 100644
--- a/src/gallium/drivers/panfrost/pan_context.h
+++ b/src/gallium/drivers/panfrost/pan_context.h
@@ -87,25 +87,6 @@ struct panfrost_fence {
int fd;
};
-#define PANFROST_MAX_TRANSIENT_ENTRIES 64
-
-struct panfrost_transient_pool {
- /* Memory blocks in the pool */
- struct panfrost_memory_entry *entries[PANFROST_MAX_TRANSIENT_ENTRIES];
-
- /* Number of entries we own */
- unsigned entry_count;
-
- /* Current entry that we are writing to, zero-indexed, strictly less than entry_count */
- unsigned entry_index;
-
- /* Number of bytes into the current entry we are */
- off_t entry_offset;
-
- /* Entry size (all entries must be homogenous) */
- size_t entry_size;
-};
-
struct panfrost_context {
/* Gallium context */
struct pipe_context base;
@@ -122,12 +103,6 @@ struct panfrost_context {
struct pipe_framebuffer_state pipe_framebuffer;
- /* The number of concurrent FBOs allowed depends on the number of pools
- * used; pools are ringed for parallelism opportunities */
-
- struct panfrost_transient_pool transient_pools[2];
- int cmdstream_i;
-
struct panfrost_memory cmdstream_persistent;
struct panfrost_memory shaders;
struct panfrost_memory scratchpad;