[PATCH] drm/amdgpu: Add mem sync flag for SDMA IB test

Jinzhou Su Jinzhou.Su at amd.com
Tue Apr 20 02:23:40 UTC 2021


The buffer for SDMA IB test is allocated by sa bo
which may be used by other purpose. Better to flush
the cache before commit the IB.

Signed-off-by: Jinzhou Su <Jinzhou.Su at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index b1ad9e52b234..da67f440b102 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -1000,6 +1000,7 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout)
 	ib.ptr[7] = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP);
 	ib.length_dw = 8;
 
+	ib.flags = AMDGPU_IB_FLAG_EMIT_MEM_SYNC;
 	r = amdgpu_ib_schedule(ring, 1, &ib, NULL, &f);
 	if (r)
 		goto err1;
-- 
2.27.0



More information about the amd-gfx mailing list