gallium/radeon: prevent SDMA stalls by detecting RAW hazards in need_dma_space
authorMarek Olšák <marek.olsak@amd.com>
Tue, 27 Dec 2016 15:12:05 +0000 (16:12 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 5 Jan 2017 17:43:24 +0000 (18:43 +0100)
commit9e1aa81dfeced2381aa0df73758dd76f2722d857
treeb77dedf4281b6f83a1d0ecc8ca16285569bd1b40
parent3be83364405da8d5b7085512fcd80c0d910dffd9
gallium/radeon: prevent SDMA stalls by detecting RAW hazards in need_dma_space

Call r600_dma_emit_wait_idle only when there is a possibility of
a read-after-write hazard. Buffers not yet used by the SDMA IB don't
have to wait.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/r600/evergreen_hw_context.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeonsi/cik_sdma.c
src/gallium/drivers/radeonsi/si_dma.c