Skip to contentSkip to conversation

drm/amd/amdgpu: Add ready_to_reset resp for vega10

PATCH In review YuBiao Wang 2 participants 2 messages Aug 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: Add ready_to_reset resp for vega10

Send response to host after received the flr notification from host. Port NV change to vega10.

---
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 1 +
 2 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +2 -0
index ff2307d7ee0f..23b066bcffb2 100644
@@ -258,6 +258,8 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
 	amdgpu_virt_fini_data_exchange(adev);
 	atomic_set(&adev->in_gpu_reset, 1);
 
+	xgpu_ai_mailbox_trans_msg(adev, IDH_READY_TO_RESET, 0, 0, 0);
+
 	do {
 		if (xgpu_ai_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL)
 			goto flr_done;
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h +1 -0
index 50572635d0f8..bd3b23171579 100644
@@ -37,6 +37,7 @@ enum idh_request {
 	IDH_REQ_GPU_RESET_ACCESS,
 
 	IDH_LOG_VF_ERROR       = 200,
+	IDH_READY_TO_RESET 	= 201,
 };
 
 enum idh_event {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 37 lines · YuBiao Wang

Send response to host after received the flr notification from host. Port NV change to vega10.

---
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 ++
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 1 +
 2 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +2 -0
index ff2307d7ee0f..23b066bcffb2 100644
@@ -258,6 +258,8 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
 	amdgpu_virt_fini_data_exchange(adev);
 	atomic_set(&adev->in_gpu_reset, 1);
 
+	xgpu_ai_mailbox_trans_msg(adev, IDH_READY_TO_RESET, 0, 0, 0);
+
 	do {
 		if (xgpu_ai_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL)
 			goto flr_done;
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h +1 -0
index 50572635d0f8..bd3b23171579 100644
@@ -37,6 +37,7 @@ enum idh_request {
 	IDH_REQ_GPU_RESET_ACCESS,
 
 	IDH_LOG_VF_ERROR       = 200,
+	IDH_READY_TO_RESET 	= 201,
 };
 
 enum idh_event {
Signature · 1 line
2.25.1