[Mesa-dev] [PATCH 4/4] radeonsi: enable SDMA on Carrizo and all CIK chips again

Marek Olšák maraeo at gmail.com
Mon Oct 24 22:23:29 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

SDMA might be fixed by:
  "winsys/amdgpu: fix radeon_surf::macro_tile_index for imported textures"
---
 src/gallium/drivers/radeonsi/cik_sdma.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/cik_sdma.c b/src/gallium/drivers/radeonsi/cik_sdma.c
index 141fb01..3a18118 100644
--- a/src/gallium/drivers/radeonsi/cik_sdma.c
+++ b/src/gallium/drivers/radeonsi/cik_sdma.c
@@ -155,24 +155,20 @@ static bool cik_sdma_copy_texture(struct si_context *sctx,
 
 	assert(src_level <= src->last_level);
 	assert(dst_level <= dst->last_level);
 	assert(rdst->surface.level[dst_level].offset +
 	       dst_slice_pitch * bpp * (dstz + src_box->depth) <=
 	       rdst->resource.buf->size);
 	assert(rsrc->surface.level[src_level].offset +
 	       src_slice_pitch * bpp * (srcz + src_box->depth) <=
 	       rsrc->resource.buf->size);
 
-	/* Test CIK with radeon and amdgpu before enabling this. */
-	if (sctx->b.chip_class == CIK)
-		return false;
-
 	if (!r600_prepare_for_dma_blit(&sctx->b, rdst, dst_level, dstx, dsty,
 					dstz, rsrc, src_level, src_box))
 		return false;
 
 	dstx /= rdst->surface.blk_w;
 	dsty /= rdst->surface.blk_h;
 
 	if (srcx >= (1 << 14) ||
 	    srcy >= (1 << 14) ||
 	    srcz >= (1 << 11) ||
@@ -510,26 +506,20 @@ static void cik_sdma_copy(struct pipe_context *ctx,
 	struct si_context *sctx = (struct si_context *)ctx;
 
 	if (!sctx->b.dma.cs)
 		goto fallback;
 
 	if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
 		cik_sdma_copy_buffer(sctx, dst, src, dstx, src_box->x, src_box->width);
 		return;
 	}
 
-	/* Carrizo SDMA texture copying is very broken for some users.
-	 * https://bugs.freedesktop.org/show_bug.cgi?id=97029
-	 */
-	if (sctx->b.family == CHIP_CARRIZO)
-		goto fallback;
-
 	if (cik_sdma_copy_texture(sctx, dst, dst_level, dstx, dsty, dstz,
 				  src, src_level, src_box))
 		return;
 
 fallback:
 	si_resource_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
 				src, src_level, src_box);
 }
 
 void cik_init_sdma_functions(struct si_context *sctx)
-- 
2.7.4



More information about the mesa-dev mailing list