[PATCH] drm/amdgpu: tighten gpu_recover in mailbox_flr to avoid duplicate recover in sriov

wentalou Wentao.Lou at amd.com
Wed Jan 23 09:50:51 UTC 2019


sriov's gpu_recover inside xgpu_ai_mailbox_flr_work would cause duplicate recover in TDR.
TDR's gpu_recover would be triggered by amdgpu_job_timedout,
that could avoid vk-cts failure by unexpected recover.

Change-Id: Ifcba4ac43a0229ae19061aad3b0ddc96957ff9c6
Signed-off-by: wentalou <Wentao.Lou at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
index b11a1c17..f227633 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
@@ -266,7 +266,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
 	}
 
 	/* Trigger recovery for world switch failure if no TDR */
-	if (amdgpu_device_should_recover_gpu(adev))
+	if (amdgpu_device_should_recover_gpu(adev) && amdgpu_lockup_timeout == 0)
 		amdgpu_device_gpu_recover(adev, NULL);
 }
 
-- 
2.7.4



More information about the amd-gfx mailing list