drm/amdgpu: Add graphics cache rinse packet for sdma
authorJinzhou Su <Jinzhou.Su@amd.com>
Mon, 12 Apr 2021 07:45:31 +0000 (15:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Apr 2021 20:32:44 +0000 (16:32 -0400)
commitb45fdeab45bc42c2cd2dfbb3d11a3dd797907af6
tree80e1f08bceafd75e2d69052e71b31ae77aeb8ed8
parent0133840fba2de9d70c6e092dd9701b0be317347f
drm/amdgpu: Add graphics cache rinse packet for sdma

Add emit mem sync callback for sdma_v5_2

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.

Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c