Mesa (master): radeonsi: sdma misc fixes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 30 17:04:41 UTC 2019


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

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Thu Oct 17 16:15:54 2019 +0200

radeonsi: sdma misc fixes

SDMA IB doesn't need to be padded for SDMA.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_dma_cs.c  | 3 ++-
 src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_dma_cs.c b/src/gallium/drivers/radeonsi/si_dma_cs.c
index c5d6a6e39cd..c550a62ee0b 100644
--- a/src/gallium/drivers/radeonsi/si_dma_cs.c
+++ b/src/gallium/drivers/radeonsi/si_dma_cs.c
@@ -117,7 +117,8 @@ void si_sdma_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,
 		radeon_emit(cs, offset);
 		radeon_emit(cs, offset >> 32);
 		radeon_emit(cs, clear_value);
-		radeon_emit(cs, sctx->chip_class >= GFX9 ? csize - 1 : csize);
+		/* dw count */
+		radeon_emit(cs, (sctx->chip_class >= GFX9 ? csize - 1 : csize) & 0xfffffffc);
 		offset += csize;
 		size -= csize;
 	}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index c6d45b381fc..a577067edc0 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -1680,9 +1680,6 @@ static int amdgpu_cs_flush(struct radeon_cmdbuf *rcs,
       if (ws->info.chip_class <= GFX6) {
          while (rcs->current.cdw & 7)
             radeon_emit(rcs, 0xf0000000); /* NOP packet */
-      } else {
-         while (rcs->current.cdw & 7)
-            radeon_emit(rcs, 0x00000000); /* NOP packet */
       }
       break;
    case RING_GFX:




More information about the mesa-commit mailing list