From 2a67b09866d6a985734211ba94ecfd9d170e7b9d Mon Sep 17 00:00:00 2001 From: Jay Cornwall Date: Tue, 22 Aug 2017 15:15:27 -0500 Subject: [PATCH 1771/4131] drm/amdgpu: Invalidate caches with KFD TLB invalidation Physically tagged caches must be written back and invalidated before TLB invalidation is acknowledged to the driver. Modify the KFD's INVALIDATE_TLBS submission to request the hardware to do this. Change-Id: I6f54d038ef49900462bd9ed54ef70e74560dec5f Signed-off-by: Jay Cornwall --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c index 8af8d6c..25c3454 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c @@ -978,7 +978,8 @@ static int invalidate_tlbs_with_kiq(struct amdgpu_device *adev, uint16_t pasid) amdgpu_ring_write(ring, PACKET3_INVALIDATE_TLBS_DST_SEL(1) | PACKET3_INVALIDATE_TLBS_ALL_HUB(1) | - PACKET3_INVALIDATE_TLBS_PASID(pasid)); + PACKET3_INVALIDATE_TLBS_PASID(pasid) | + PACKET3_INVALIDATE_TLBS_FLUSH_TYPE(2)); amdgpu_fence_emit(ring, &f); amdgpu_ring_commit(ring); mutex_unlock(&adev->gfx.kiq.ring_mutex); -- 2.7.4