mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 09:00:08 +01:00
radeonsi/gfx12: remove CP DMA workarounds because CP DMA is never used on gfx12
except for cache prefetches. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
This commit is contained in:
parent
c5ee7ca4d6
commit
c90d4e0d57
2 changed files with 8 additions and 8 deletions
|
|
@ -187,6 +187,7 @@ void si_cp_dma_clear_buffer(struct si_context *sctx, struct radeon_cmdbuf *cs,
|
|||
uint64_t va = (sdst ? sdst->gpu_address : 0) + offset;
|
||||
bool is_first = true;
|
||||
|
||||
assert(!sctx->screen->info.cp_sdma_ge_use_system_memory_scope);
|
||||
assert(size && size % 4 == 0);
|
||||
|
||||
if (user_flags & SI_OP_SYNC_GE_BEFORE)
|
||||
|
|
@ -198,10 +199,6 @@ void si_cp_dma_clear_buffer(struct si_context *sctx, struct radeon_cmdbuf *cs,
|
|||
if (user_flags & SI_OP_SYNC_PS_BEFORE)
|
||||
sctx->flags |= SI_CONTEXT_PS_PARTIAL_FLUSH;
|
||||
|
||||
/* TODO: Range-invalidate GL2 or always use compute shaders */
|
||||
if (sctx->screen->info.cp_sdma_ge_use_system_memory_scope)
|
||||
sctx->flags |= SI_CONTEXT_INV_L2;
|
||||
|
||||
/* Mark the buffer range of destination as valid (initialized),
|
||||
* so that transfer_map knows it should wait for the GPU when mapping
|
||||
* that range. */
|
||||
|
|
@ -303,6 +300,7 @@ void si_cp_dma_copy_buffer(struct si_context *sctx, struct pipe_resource *dst,
|
|||
unsigned gds_flags = (dst ? 0 : CP_DMA_DST_IS_GDS) | (src ? 0 : CP_DMA_SRC_IS_GDS);
|
||||
bool is_first = true;
|
||||
|
||||
assert(!sctx->screen->info.cp_sdma_ge_use_system_memory_scope);
|
||||
assert(size);
|
||||
|
||||
if (dst) {
|
||||
|
|
@ -364,10 +362,6 @@ void si_cp_dma_copy_buffer(struct si_context *sctx, struct pipe_resource *dst,
|
|||
if ((dst || src) && !(user_flags & SI_OP_SKIP_CACHE_INV_BEFORE))
|
||||
sctx->flags |= si_get_flush_flags(sctx, coher, cache_policy);
|
||||
|
||||
/* TODO: Range-flush GL2 for src and range-invalidate GL2 for dst, or always use compute shaders */
|
||||
if (sctx->screen->info.cp_sdma_ge_use_system_memory_scope)
|
||||
sctx->flags |= SI_CONTEXT_INV_L2;
|
||||
|
||||
if (sctx->flags)
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.cache_flush);
|
||||
|
||||
|
|
|
|||
|
|
@ -215,6 +215,12 @@ void si_test_dma_perf(struct si_screen *sscreen)
|
|||
}
|
||||
} else if (method == METHOD_CP_DMA) {
|
||||
/* CP DMA */
|
||||
if (sscreen->info.cp_sdma_ge_use_system_memory_scope) {
|
||||
/* The CP DMA code doesn't implement this case. */
|
||||
success = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_copy) {
|
||||
si_cp_dma_copy_buffer(sctx, dst, src, dst_offset, src_offset, size,
|
||||
SI_OP_SYNC_BEFORE_AFTER, SI_COHERENCY_SHADER, L2_LRU);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue