[Mesa-dev] [PATCH v3 12/25] panfrost: Get rid of the unused 'flush jobs accessing res' infra

Boris Brezillon boris.brezillon at collabora.com
Thu Sep 5 19:41:37 UTC 2019


Will be replaced by something similar but using a BOs as keys instead
of resources.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
---
 src/gallium/drivers/panfrost/pan_context.h |  3 --
 src/gallium/drivers/panfrost/pan_job.c     | 38 ----------------------
 src/gallium/drivers/panfrost/pan_job.h     |  8 -----
 3 files changed, 49 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h
index 9723d56ac5f7..586b6d854b6c 100644
--- a/src/gallium/drivers/panfrost/pan_context.h
+++ b/src/gallium/drivers/panfrost/pan_context.h
@@ -114,9 +114,6 @@ struct panfrost_context {
         struct panfrost_batch *batch;
         struct hash_table *batches;
 
-        /* panfrost_resource -> panfrost_job */
-        struct hash_table *write_jobs;
-
         /* Within a launch_grid call.. */
         const struct pipe_grid_info *compute_grid;
 
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 6b0f612bb156..56aab13d7d5a 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -162,21 +162,6 @@ panfrost_batch_get_polygon_list(struct panfrost_batch *batch, unsigned size)
         return batch->polygon_list->gpu;
 }
 
-void
-panfrost_flush_jobs_writing_resource(struct panfrost_context *panfrost,
-                                     struct pipe_resource *prsc)
-{
-#if 0
-        struct hash_entry *entry = _mesa_hash_table_search(panfrost->write_jobs,
-                                   prsc);
-        if (entry) {
-                struct panfrost_batch *batch = entry->data;
-                panfrost_batch_submit(job);
-        }
-#endif
-        /* TODO stub */
-}
-
 void
 panfrost_batch_submit(struct panfrost_batch *batch)
 {
@@ -352,25 +337,6 @@ panfrost_batch_clear(struct panfrost_batch *batch,
                                      ctx->pipe_framebuffer.height);
 }
 
-void
-panfrost_flush_jobs_reading_resource(struct panfrost_context *panfrost,
-                                     struct pipe_resource *prsc)
-{
-        struct panfrost_resource *rsc = pan_resource(prsc);
-
-        panfrost_flush_jobs_writing_resource(panfrost, prsc);
-
-        hash_table_foreach(panfrost->batches, entry) {
-                struct panfrost_batch *batch = entry->data;
-
-                if (_mesa_set_search(batch->bos, rsc->bo)) {
-                        printf("TODO: submit job for flush\n");
-                        //panfrost_batch_submit(job);
-                        continue;
-                }
-        }
-}
-
 static bool
 panfrost_batch_compare(const void *a, const void *b)
 {
@@ -414,8 +380,4 @@ panfrost_batch_init(struct panfrost_context *ctx)
         ctx->batches = _mesa_hash_table_create(ctx,
                                                panfrost_batch_hash,
                                                panfrost_batch_compare);
-
-        ctx->write_jobs = _mesa_hash_table_create(ctx,
-                          _mesa_hash_pointer,
-                          _mesa_key_pointer_equal);
 }
diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h
index 6d89603f8798..e885d0b9fbd5 100644
--- a/src/gallium/drivers/panfrost/pan_job.h
+++ b/src/gallium/drivers/panfrost/pan_job.h
@@ -138,14 +138,6 @@ panfrost_batch_init(struct panfrost_context *ctx);
 void
 panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo);
 
-void
-panfrost_flush_jobs_writing_resource(struct panfrost_context *panfrost,
-                                     struct pipe_resource *prsc);
-
-void
-panfrost_flush_jobs_reading_resource(struct panfrost_context *panfrost,
-                                     struct pipe_resource *prsc);
-
 void
 panfrost_batch_submit(struct panfrost_batch *batch);
 
-- 
2.21.0



More information about the mesa-dev mailing list