Commit 8ede944d authored by Tao Zhou's avatar Tao Zhou Committed by Alex Deucher
Browse files

drm/amdgpu: add RAS poison consumption handler for AI SRIOV



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: default avatarTao Zhou <tao.zhou1@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 331ea5d1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
};

/*
+6 −0
Original line number Diff line number Diff line
@@ -404,6 +404,11 @@ 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,
@@ -411,4 +416,5 @@ const struct amdgpu_virt_ops xgpu_ai_virt_ops = {
	.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 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ enum idh_request {

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

enum idh_event {