From: Boris Brezillon Date: Thu, 5 Sep 2019 16:19:40 +0000 (+0200) Subject: panfrost: Get rid of the unused 'flush jobs accessing res' infra X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40e20324e0c304960b86f4721270e7c1d5379318;p=mesa.git panfrost: Get rid of the unused 'flush jobs accessing res' infra Will be replaced by something similar but using a BOs as keys instead of resources. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index 9723d56ac5f..586b6d854b6 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 4d30c2a9e45..0f8fe1a1b7a 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -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); } diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index 7854e0a0f99..a5347f8814e 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -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);