Mesa (master): r600g: avoid recursion in rv670 flush workaround

Alex Deucher agd5f at kemper.freedesktop.org
Fri May 6 17:20:42 UTC 2011


Module: Mesa
Branch: master
Commit: 3b20a89941fe9c7b5ad10e13cb035d0508c43bbd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b20a89941fe9c7b5ad10e13cb035d0508c43bbd

Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Fri May  6 13:18:00 2011 -0400

r600g: avoid recursion in rv670 flush workaround

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=36914

Signed-off-by: Alex Deucher <alexdeucher at gmail.com>

---

 src/gallium/winsys/r600/drm/r600_hw_context.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index 2453882..0514bbe 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -810,8 +810,13 @@ void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
 	     G_0085F0_DB_ACTION_ENA(flush_flags))) {
 		if (ctx->flags & R600_CONTEXT_CHECK_EVENT_FLUSH) {
 			/* the rv670 seems to fail fbo-generatemipmap unless we flush the CB1 dest base ena */
-			if (ctx->radeon->family == CHIP_RV670)
-				r600_context_flush_all(ctx, S_0085F0_CB1_DEST_BASE_ENA(1));
+			if (ctx->radeon->family == CHIP_RV670) {
+				ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_SURFACE_SYNC, 3, ctx->predicate_drawing);
+				ctx->pm4[ctx->pm4_cdwords++] = S_0085F0_CB1_DEST_BASE_ENA(1);     /* CP_COHER_CNTL */
+				ctx->pm4[ctx->pm4_cdwords++] = 0xffffffff;      /* CP_COHER_SIZE */
+				ctx->pm4[ctx->pm4_cdwords++] = 0;               /* CP_COHER_BASE */
+				ctx->pm4[ctx->pm4_cdwords++] = 0x0000000A;      /* POLL_INTERVAL */
+			}
 
 			ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_EVENT_WRITE, 0, ctx->predicate_drawing);
 			ctx->pm4[ctx->pm4_cdwords++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT) | EVENT_INDEX(0);




More information about the mesa-commit mailing list