Mesa (master): r600g: use WAIT_3D_IDLE before using CP DMA

Marek Olšák mareko at kemper.freedesktop.org
Thu Jul 18 12:28:10 UTC 2013


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Tue Jul 16 22:48:48 2013 +0200

r600g: use WAIT_3D_IDLE before using CP DMA

I broke this with 7948ed1250cae78ae1b22dbce4ab23aceacc6159 for r700 at least.

---

 src/gallium/drivers/r600/evergreen_hw_context.c |    1 +
 src/gallium/drivers/r600/r600_hw_context.c      |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c b/src/gallium/drivers/r600/evergreen_hw_context.c
index c428bc1..93c9c58 100644
--- a/src/gallium/drivers/r600/evergreen_hw_context.c
+++ b/src/gallium/drivers/r600/evergreen_hw_context.c
@@ -123,6 +123,7 @@ void evergreen_cp_dma_clear_buffer(struct r600_context *rctx,
 
 	/* Flush the cache where the resource is bound. */
 	r600_flag_resource_cache_flush(rctx, dst);
+        rctx->flags |= R600_CONTEXT_WAIT_3D_IDLE;
 
 	while (size) {
 		unsigned sync = 0;
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 7bb4825..97b0f9c 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -636,6 +636,7 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx,
 	/* Flush the caches where the resources are bound. */
 	r600_flag_resource_cache_flush(rctx, src);
 	r600_flag_resource_cache_flush(rctx, dst);
+        rctx->flags |= R600_CONTEXT_WAIT_3D_IDLE;
 
 	/* There are differences between R700 and EG in CP DMA,
 	 * but we only use the common bits here. */




More information about the mesa-commit mailing list