From 4991e17297b0c29ad12fdf904f2b2d29c3738eee Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 16 Aug 2021 23:53:07 +0000 Subject: [PATCH] panfrost: Remove get_fresh_batch Unused, and of dubious value. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_job.c | 27 -------------------------- src/gallium/drivers/panfrost/pan_job.h | 5 ----- 2 files changed, 32 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index ee67d363729..a935d4f61aa 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -162,33 +162,6 @@ panfrost_get_batch(struct panfrost_context *ctx, return batch; } -struct panfrost_batch * -panfrost_get_fresh_batch(struct panfrost_context *ctx, - const struct pipe_framebuffer_state *key, - const char *reason) -{ - struct panfrost_batch *batch = panfrost_get_batch(ctx, key); - - panfrost_dirty_state_all(ctx); - - /* The batch has no draw/clear queued, let's return it directly. - * Note that it's perfectly fine to re-use a batch with an - * existing clear, we'll just update it with the new clear request. - */ - if (!batch->scoreboard.first_job) { - ctx->batch = batch; - return batch; - } - - /* Otherwise, we need to flush the existing one and instantiate a new - * one. - */ - perf_debug_ctx(ctx, "Flushing a batch due to: %s", reason); - panfrost_batch_submit(batch, 0, 0); - batch = panfrost_get_batch(ctx, key); - return batch; -} - /* Get the job corresponding to the FBO we're currently rendering into */ struct panfrost_batch * diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index 6b613aa6543..5881869c606 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -136,11 +136,6 @@ struct panfrost_batch { /* Functions for managing the above */ -struct panfrost_batch * -panfrost_get_fresh_batch(struct panfrost_context *ctx, - const struct pipe_framebuffer_state *key, - const char *reason); - struct panfrost_batch * panfrost_get_batch_for_fbo(struct panfrost_context *ctx);