panfrost: Get rid of the unused 'flush jobs accessing res' infra
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 5 Sep 2019 16:19:40 +0000 (18:19 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Fri, 13 Sep 2019 14:25:06 +0000 (16:25 +0200)
Will be replaced by something similar but using a BOs as keys instead
of resources.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/pan_context.h
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_job.h

index 9723d56ac5f78347d94225dcbbf4584ce068c48b..586b6d854b6cd2ecd023a43435acea20bb7baa4e 100644 (file)
@@ -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;
 
index 4d30c2a9e45e62c7e700675540cad681b0a29e09..0f8fe1a1b7ab01727c1828c7bec5884ebff56e07 100644 (file)
@@ -163,21 +163,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)
 {
@@ -353,25 +338,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)
 {
@@ -415,8 +381,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);
 }
index 7854e0a0f994f37b65e6489b40cf4c703e6a7bf1..a5347f8814e11737c73d27b89d62f52681913c71 100644 (file)
@@ -132,14 +132,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);