From: Pierre-Eric Pelloux-Prayer Date: Thu, 17 Oct 2019 14:15:54 +0000 (+0200) Subject: radeonsi: sdma misc fixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2fb4b3c47616083e8d2664e54a1bd9a2dee6be92;p=mesa.git radeonsi: sdma misc fixes SDMA IB doesn't need to be padded for SDMA. Reviewed-by: Marek Olšák --- 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: