drm/amdgpu: Add graphics cache rinse packet for sdma 5.0
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 20 Apr 2021 19:26:46 +0000 (15:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:06:45 +0000 (18:06 -0400)
commite8d7aa68c8fe68525d04a940ca59c1b5aae16b7e
treef4cdf91e9ddd8b0962530060621c3c63cb4e6189
parent969aea09316799a60fe44ceedf1bd9bf861c4009
drm/amdgpu: Add graphics cache rinse packet for sdma 5.0

Add emit mem sync callback for sdma_v5_0

In amdgpu sync object test, three threads created jobs
to send GFX IB and SDMA IB in sequence. After the first
GFX thread joined, sometimes the third thread will reuse
the same physical page to store the SDMA IB. There will
be a risk that SDMA will read GFX IB in the previous physical
page. So it's better to flush the cache before commit sdma IB.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c