[22/55] radeonsi: remove r600_ring::flush callback

Submitted by Marek Olšák on April 2, 2018, 4:08 a.m.

Details

Message ID 1522642128-15348-23-git-send-email-maraeo@gmail.com
State Accepted
Commit f7de8686de823f523ee53f354063d313f9dcecbe
Headers show
Series "RadeonSI Mega cleanup" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Marek Olšák April 2, 2018, 4:08 a.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/gallium/drivers/radeon/r600_pipe_common.c | 1 -
 src/gallium/drivers/radeon/r600_pipe_common.h | 2 --
 src/gallium/drivers/radeonsi/si_fence.c       | 6 +++---
 src/gallium/drivers/radeonsi/si_pipe.c        | 1 -
 4 files changed, 3 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index bd35aa8..f09770d 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -177,7 +177,6 @@  bool si_common_context_init(struct r600_common_context *rctx,
 		rctx->dma.cs = rctx->ws->cs_create(rctx->ctx, RING_DMA,
 						   si_flush_dma_cs,
 						   rctx);
-		rctx->dma.flush = si_flush_dma_cs;
 	}
 
 	return true;
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 50f1745..0faf66d 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -369,8 +369,6 @@  struct r600_atom {
 
 struct r600_ring {
 	struct radeon_winsys_cs		*cs;
-	void (*flush)(void *ctx, unsigned flags,
-		      struct pipe_fence_handle **fence);
 };
 
 /* Saved CS data for debugging features. */
diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c
index 3b43709..cd8a88b 100644
--- a/src/gallium/drivers/radeonsi/si_fence.c
+++ b/src/gallium/drivers/radeonsi/si_fence.c
@@ -376,7 +376,7 @@  static boolean si_fence_finish(struct pipe_screen *screen,
 			 * not going to wait.
 			 */
 			threaded_context_unwrap_sync(ctx);
-			sctx->b.gfx.flush(&sctx->b, timeout ? 0 : PIPE_FLUSH_ASYNC, NULL);
+			si_flush_gfx_cs(&sctx->b, timeout ? 0 : PIPE_FLUSH_ASYNC, NULL);
 			rfence->gfx_unflushed.ctx = NULL;
 
 			if (!timeout)
@@ -516,7 +516,7 @@  static void si_flush_from_st(struct pipe_context *ctx,
 
 	/* DMA IBs are preambles to gfx IBs, therefore must be flushed first. */
 	if (rctx->dma.cs)
-		rctx->dma.flush(rctx, rflags, fence ? &sdma_fence : NULL);
+		si_flush_dma_cs(rctx, rflags, fence ? &sdma_fence : NULL);
 
 	if (!radeon_emitted(rctx->gfx.cs, rctx->initial_gfx_cs_size)) {
 		if (fence)
@@ -536,7 +536,7 @@  static void si_flush_from_st(struct pipe_context *ctx,
 			gfx_fence = rctx->ws->cs_get_next_fence(rctx->gfx.cs);
 			deferred_fence = true;
 		} else {
-			rctx->gfx.flush(rctx, rflags, fence ? &gfx_fence : NULL);
+			si_flush_gfx_cs(rctx, rflags, fence ? &gfx_fence : NULL);
 		}
 	}
 
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index c8ed549..ef2942d 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -286,7 +286,6 @@  static struct pipe_context *si_create_context(struct pipe_screen *screen,
 
 	sctx->b.gfx.cs = ws->cs_create(sctx->b.ctx, RING_GFX,
 				       si_flush_gfx_cs, sctx);
-	sctx->b.gfx.flush = si_flush_gfx_cs;
 
 	/* Border colors. */
 	sctx->border_color_table = malloc(SI_MAX_BORDER_COLORS *