All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/amdgpu: Flush TLB after mapping for VG20+XGMI
@ 2022-04-01 19:57 Philip Yang
  2022-04-03 15:26 ` Christian König
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Philip Yang @ 2022-04-01 19:57 UTC (permalink / raw)
  To: amd-gfx; +Cc: Philip Yang, felix.kuehling, christian.koenig

For VG20 + XGMI bridge, all mappings PTEs cache in TC, this may have
stall invalid PTEs in TC because one cache line has 8 pages. Need always
flush_tlb after updating mapping.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index f0aec04111a3..687c9a140645 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -837,6 +837,12 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 		goto error_unlock;
 	}
 
+	/* Vega20+XGMI where PTEs get inadvertently cached in L2 texture cache,
+	 * heavy-weight flush TLB unconditionally.
+	 */
+	flush_tlb |= (adev->gmc.xgmi.num_physical_nodes &&
+		      adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 0));
+
 	memset(&params, 0, sizeof(params));
 	params.adev = adev;
 	params.vm = vm;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-04 19:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 19:57 [PATCH 1/1] drm/amdgpu: Flush TLB after mapping for VG20+XGMI Philip Yang
2022-04-03 15:26 ` Christian König
2022-04-04 16:19 ` Paul Menzel
2022-04-04 16:52   ` philip yang
2022-04-04 17:19     ` Paul Menzel
2022-04-04 17:03   ` Felix Kuehling
2022-04-04 19:03 ` Tomasz Moń
2022-04-04 19:18   ` Alex Deucher
2022-04-04 19:46     ` Tomasz Moń

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.