From 88bc3cd8450b73ad37c9de4b48c315e6c8002f03 Mon Sep 17 00:00:00 2001 From: yipechai Date: Tue, 8 Feb 2022 10:38:36 +0800 Subject: drm/amdgpu: Optimize amdgpu_mca_ras_late_init/amdgpu_mca_ras_fini function code Optimize amdgpu_mca_ras_late_init/amdgpu_mca_ras_fini function code. Signed-off-by: yipechai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/mca_v3_0.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/gpu/drm/amd/amdgpu/mca_v3_0.c') diff --git a/drivers/gpu/drm/amd/amdgpu/mca_v3_0.c b/drivers/gpu/drm/amd/amdgpu/mca_v3_0.c index 386416378a82..c442b34b9472 100644 --- a/drivers/gpu/drm/amd/amdgpu/mca_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mca_v3_0.c @@ -71,6 +71,7 @@ struct amdgpu_mca_ras_block mca_v3_0_mp0_ras = { .ras_comm = { .block = AMDGPU_RAS_BLOCK__MCA, .sub_block_index = AMDGPU_RAS_MCA_BLOCK__MP0, + .type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE, .name = "mp0", }, .hw_ops = &mca_v3_0_mp0_hw_ops, @@ -108,6 +109,7 @@ struct amdgpu_mca_ras_block mca_v3_0_mp1_ras = { .ras_comm = { .block = AMDGPU_RAS_BLOCK__MCA, .sub_block_index = AMDGPU_RAS_MCA_BLOCK__MP1, + .type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE, .name = "mp1", }, .hw_ops = &mca_v3_0_mp1_hw_ops, @@ -145,6 +147,7 @@ struct amdgpu_mca_ras_block mca_v3_0_mpio_ras = { .ras_comm = { .block = AMDGPU_RAS_BLOCK__MCA, .sub_block_index = AMDGPU_RAS_MCA_BLOCK__MPIO, + .type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE, .name = "mpio", }, .hw_ops = &mca_v3_0_mpio_hw_ops, @@ -165,6 +168,9 @@ static void mca_v3_0_init(struct amdgpu_device *adev) amdgpu_ras_register_ras_block(adev, &mca->mp0.ras->ras_block); amdgpu_ras_register_ras_block(adev, &mca->mp1.ras->ras_block); amdgpu_ras_register_ras_block(adev, &mca->mpio.ras->ras_block); + mca->mp0.ras_if = &mca->mp0.ras->ras_block.ras_comm; + mca->mp1.ras_if = &mca->mp1.ras->ras_block.ras_comm; + mca->mpio.ras_if = &mca->mpio.ras->ras_block.ras_comm; } const struct amdgpu_mca_funcs mca_v3_0_funcs = { -- cgit v1.2.3