drm/amd/amdgpu: Add ready_to_reset resp for vega10
authorYuBiao Wang <YuBiao.Wang@amd.com>
Fri, 27 Aug 2021 06:48:51 +0000 (14:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Aug 2021 18:59:33 +0000 (14:59 -0400)
Send response to host after received the flr notification from host.
Port NV change to vega10.

Signed-off-by: YuBiao Wang <YuBiao.Wang@amd.com>
Reviewed-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h

index ff2307d..23b066b 100644 (file)
@@ -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;
index 5057263..bd3b231 100644 (file)
@@ -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 {