From 2fb4b3c47616083e8d2664e54a1bd9a2dee6be92 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 17 Oct 2019 16:15:54 +0200 Subject: [PATCH] radeonsi: sdma misc fixes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit SDMA IB doesn't need to be padded for SDMA. Reviewed-by: Marek Olšák --- 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: -- 2.30.2