[9/9] radeonsi: don't test SDMA perf if SDMA is disabled/unsupported

Submitted by Marek Olšák on June 4, 2019, 12:02 a.m.

Details

Message ID 20190604000258.9143-9-maraeo@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Marek Olšák June 4, 2019, 12:02 a.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/gallium/drivers/radeonsi/si_test_dma_perf.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeonsi/si_test_dma_perf.c b/src/gallium/drivers/radeonsi/si_test_dma_perf.c
index 263187d683f..0b5a4a38ab7 100644
--- a/src/gallium/drivers/radeonsi/si_test_dma_perf.c
+++ b/src/gallium/drivers/radeonsi/si_test_dma_perf.c
@@ -105,20 +105,23 @@  void si_test_dma_perf(struct si_screen *sscreen)
 			unsigned cs_method = method - 4;
 			STATIC_ASSERT(L2_STREAM + 1 == L2_LRU);
 			unsigned cs_waves_per_sh =
 				test_cs ? cs_waves_per_sh_list[cs_method / (2*NUM_SHADERS)] : 0;
 			cs_method %= 2*NUM_SHADERS;
 			unsigned cache_policy = test_cp ? method % 3 :
 						test_cs ? L2_STREAM + (cs_method / NUM_SHADERS) : 0;
 			unsigned cs_dwords_per_thread =
 				test_cs ? cs_dwords_per_thread_list[cs_method % NUM_SHADERS] : 0;
 
+			if (test_sdma && !sctx->dma_cs)
+				continue;
+
 			if (sctx->chip_class == GFX6) {
 				/* GFX6 doesn't support CP DMA operations through L2. */
 				if (test_cp && cache_policy != L2_BYPASS)
 					continue;
 				/* WAVES_PER_SH is in multiples of 16 on GFX6. */
 				if (test_cs && cs_waves_per_sh % 16 != 0)
 					continue;
 			}
 
 			printf("%s ,", placement_str[placement]);