From c7dc0465cf55f613f1caa085aa762db06cb14974 Mon Sep 17 00:00:00 2001 From: Jinzhou Su Date: Mon, 19 Apr 2021 14:04:22 +0800 Subject: [PATCH] test/amdgpu: Add emit mem sync flag for test IB In syncobj test, 3 threads will be created. Sometimes the first gfx IB and the third sdma IB will use same physical page. There will be risk that sdma engine will read gfx IB in the same physical page. So better to flush the cache before commit the sdma IB. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui Acked-by: Alex Deucher --- tests/amdgpu/syncobj_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/amdgpu/syncobj_tests.c b/tests/amdgpu/syncobj_tests.c index f911093a..690bea01 100644 --- a/tests/amdgpu/syncobj_tests.c +++ b/tests/amdgpu/syncobj_tests.c @@ -145,7 +145,7 @@ static int syncobj_command_submission_helper(uint32_t syncobj_handle, bool AMDGPU_HW_IP_DMA; chunk_data.ib_data.ip_instance = 0; chunk_data.ib_data.ring = 0; - chunk_data.ib_data.flags = 0; + chunk_data.ib_data.flags = AMDGPU_IB_FLAG_EMIT_MEM_SYNC; chunks[1].chunk_id = wait_or_signal ? AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT :