drm/amdkfd: Flush TLB after unmapping for GFX v9.4.3
authorPhilip Yang <Philip.Yang@amd.com>
Thu, 9 Feb 2023 23:23:16 +0000 (18:23 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:45 +0000 (14:56 +0200)
commit9becfff9f91e350fd4d6f16e9f117f9227258fb0
treead322c8004eabd3ec6bc50bf39496534fc8101c3
parent52c7b41ad6ee53222f4ee2f0c099a6ed8291a168
drm/amdkfd: Flush TLB after unmapping for GFX v9.4.3

[ Upstream commit 75dda67c7213c3e0d17244a8c42547c27ee746f8 ]

kfd_flush_tlb_after_unmap should return true for GFX v9.4.3, to do TLB
heavyweight flush after unmapping from GPU to guarantee that the GPU
will not access pages after they have been unmapped. This also helps
improve the mapping to GPU performance.

Without this, KFD accidently flush TLB after mapping to GPU because the
vm update sequence number is increased by previous unmapping.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: edcfe22985d0 ("drm/amdkfd: Insert missing TLB flush on GFX10 and later")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_priv.h