[Mesa-dev] [PATCH 1/4] gallium/radeon: remove RADEON_FLUSH_KEEP_TILING_FLAGS flag

Marek Olšák maraeo at gmail.com
Mon Jul 18 12:14:27 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

always set
---
 src/gallium/drivers/r300/r300_flush.c         | 2 --
 src/gallium/drivers/r600/r600_hw_context.c    | 3 ---
 src/gallium/drivers/radeon/radeon_winsys.h    | 3 +--
 src/gallium/drivers/radeonsi/si_hw_context.c  | 3 ---
 src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 9 +++------
 5 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
index 63182cb..54108d1 100644
--- a/src/gallium/drivers/r300/r300_flush.c
+++ b/src/gallium/drivers/r300/r300_flush.c
@@ -78,8 +78,6 @@ void r300_flush(struct pipe_context *pipe,
 {
     struct r300_context *r300 = r300_context(pipe);
 
-    flags |= RADEON_FLUSH_KEEP_TILING_FLAGS;
-
     if (r300->dirty_hw) {
         r300_flush_and_cleanup(r300, flags, fence);
     } else {
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 21565d3..ea6902f 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -274,9 +274,6 @@ void r600_context_gfx_flush(void *context, unsigned flags,
 		radeon_set_context_reg(cs, R_028350_SX_MISC, 0);
 	}
 
-	/* force to keep tiling flags */
-	flags |= RADEON_FLUSH_KEEP_TILING_FLAGS;
-
 	/* Flush the CS. */
 	ctx->b.ws->cs_flush(cs, flags, fence);
 
diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h
index a9c9b9e..ba56936 100644
--- a/src/gallium/drivers/radeon/radeon_winsys.h
+++ b/src/gallium/drivers/radeon/radeon_winsys.h
@@ -29,8 +29,7 @@
 #include "pipebuffer/pb_buffer.h"
 
 #define RADEON_FLUSH_ASYNC		(1 << 0)
-#define RADEON_FLUSH_KEEP_TILING_FLAGS	(1 << 1)
-#define RADEON_FLUSH_END_OF_FRAME       (1 << 2)
+#define RADEON_FLUSH_END_OF_FRAME       (1 << 1)
 
 /* Tiling flags. */
 enum radeon_bo_layout {
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
index f36a7a0..e2e7afd 100644
--- a/src/gallium/drivers/radeonsi/si_hw_context.c
+++ b/src/gallium/drivers/radeonsi/si_hw_context.c
@@ -123,9 +123,6 @@ void si_context_gfx_flush(void *context, unsigned flags,
 
 	si_emit_cache_flush(ctx, NULL);
 
-	/* force to keep tiling flags */
-	flags |= RADEON_FLUSH_KEEP_TILING_FLAGS;
-
 	if (ctx->trace_buf)
 		si_trace_emit(ctx);
 
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index 15c3e5c..606c38d 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -563,13 +563,10 @@ static int radeon_drm_cs_flush(struct radeon_winsys_cs *rcs,
         default:
         case RING_GFX:
         case RING_COMPUTE:
-            cs->cst->flags[0] = 0;
+            cs->cst->flags[0] = RADEON_CS_KEEP_TILING_FLAGS;
             cs->cst->flags[1] = RADEON_CS_RING_GFX;
-            cs->cst->cs.num_chunks = 2;
-            if (flags & RADEON_FLUSH_KEEP_TILING_FLAGS) {
-                cs->cst->flags[0] |= RADEON_CS_KEEP_TILING_FLAGS;
-                cs->cst->cs.num_chunks = 3;
-            }
+            cs->cst->cs.num_chunks = 3;
+
             if (cs->ws->info.has_virtual_memory) {
                 cs->cst->flags[0] |= RADEON_CS_USE_VM;
                 cs->cst->cs.num_chunks = 3;
-- 
2.7.4



More information about the mesa-dev mailing list