Skip to content

Commit

Permalink
drm/amdgpu: add RAS poison consumption handler for AI SRIOV
Browse files Browse the repository at this point in the history
Send message to host and host will handle it.

v2: split the patch into two parts, one is for mxgpu ai and another one
is for common poison consumption handler.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Tao Zhou authored and Alex Deucher committed Dec 15, 2022
1 parent 331ea5d commit 8ede944
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ struct amdgpu_virt_ops {
int (*wait_reset)(struct amdgpu_device *adev);
void (*trans_msg)(struct amdgpu_device *adev, enum idh_request req,
u32 data1, u32 data2, u32 data3);
void (*ras_poison_handler)(struct amdgpu_device *adev);
};

/*
Expand Down
6 changes: 6 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,17 @@ static int xgpu_ai_request_init_data(struct amdgpu_device *adev)
return xgpu_ai_send_access_requests(adev, IDH_REQ_GPU_INIT_DATA);
}

static void xgpu_ai_ras_poison_handler(struct amdgpu_device *adev)
{
xgpu_ai_send_access_requests(adev, IDH_RAS_POISON);
}

const struct amdgpu_virt_ops xgpu_ai_virt_ops = {
.req_full_gpu = xgpu_ai_request_full_gpu_access,
.rel_full_gpu = xgpu_ai_release_full_gpu_access,
.reset_gpu = xgpu_ai_request_reset,
.wait_reset = NULL,
.trans_msg = xgpu_ai_mailbox_trans_msg,
.req_init_data = xgpu_ai_request_init_data,
.ras_poison_handler = xgpu_ai_ras_poison_handler,
};
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ enum idh_request {

IDH_LOG_VF_ERROR = 200,
IDH_READY_TO_RESET = 201,
IDH_RAS_POISON = 202,
};

enum idh_event {
Expand Down

0 comments on commit 8ede944

Please sign in to comment.