All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu:Check gfx poweron when skip flush_gpu_tlb
@ 2023-10-08 10:06 Feifei Xu
  2023-10-08 13:35 ` Wang, Yang(Kevin)
  0 siblings, 1 reply; 13+ messages in thread
From: Feifei Xu @ 2023-10-08 10:06 UTC (permalink / raw)
  To: amd-gfx; +Cc: Feifei Xu, feifxu, christian.koenig, Hawking.Zhang

To fix the gpu recovery failed on GFX11 with gfxhub pagefault,
flush gpu tlb after reset on GFX11.
Gfxhub tlb flush need check if adev->gfx.is_poweron set.

Fixes: d0c860f33553 ("drm/amdgpu: rework lock handling for flush_tlb v2")

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 2f9bb86edd71..048d32edee88 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -611,8 +611,9 @@ void amdgpu_gmc_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
 		/*
 		 * A GPU reset should flush all TLBs anyway, so no need to do
 		 * this while one is ongoing.
+		 * For GFX11, gfxhub flush check if adev->gfx.is_poweron is set.
 		 */
-		if (!down_read_trylock(&adev->reset_domain->sem))
+		if (!down_read_trylock(&adev->reset_domain->sem) && !adev->gfx.is_poweron)
 			return;
 
 		if (adev->gmc.flush_tlb_needs_extra_type_2)
-- 
2.34.1


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

end of thread, other threads:[~2023-10-12  1:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-08 10:06 [PATCH] drm/amdgpu:Check gfx poweron when skip flush_gpu_tlb Feifei Xu
2023-10-08 13:35 ` Wang, Yang(Kevin)
2023-10-09  1:50   ` Xu, Feifei
2023-10-09  8:51     ` Christian König
2023-10-10  9:34       ` Xu, Feifei
2023-10-10  9:44       ` Xu, Feifei
2023-10-10 10:07         ` Xu, Feifei
2023-10-09  8:58     ` Zhang, Hawking
2023-10-10  2:27       ` Xu, Feifei
2023-10-10  9:06         ` Christian König
2023-10-10 10:14           ` Xu, Feifei
2023-10-12  1:19             ` Xu, Feifei
2023-10-10  9:25         ` Xu, Feifei

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.