mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 08:13:56 -04:00
drm/amdgpu: Rework xgmi_wafl_pcs ras sw_init
To align with other IP blocks. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Stanley Yang <Stanley.Yang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
7f544c5488
commit
da9d669eab
@@ -1048,12 +1048,30 @@ struct amdgpu_ras_block_hw_ops xgmi_ras_hw_ops = {
|
||||
|
||||
struct amdgpu_xgmi_ras xgmi_ras = {
|
||||
.ras_block = {
|
||||
.ras_comm = {
|
||||
.name = "xgmi_wafl",
|
||||
.block = AMDGPU_RAS_BLOCK__XGMI_WAFL,
|
||||
.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE,
|
||||
},
|
||||
.hw_ops = &xgmi_ras_hw_ops,
|
||||
.ras_late_init = amdgpu_xgmi_ras_late_init,
|
||||
},
|
||||
};
|
||||
|
||||
int amdgpu_xgmi_ras_sw_init(struct amdgpu_device *adev)
|
||||
{
|
||||
int err;
|
||||
struct amdgpu_xgmi_ras *ras;
|
||||
|
||||
if (!adev->gmc.xgmi.ras)
|
||||
return 0;
|
||||
|
||||
ras = adev->gmc.xgmi.ras;
|
||||
err = amdgpu_ras_register_ras_block(adev, &ras->ras_block);
|
||||
if (err) {
|
||||
dev_err(adev->dev, "Failed to register xgmi_wafl_pcs ras block!\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
strcpy(ras->ras_block.ras_comm.name, "xgmi_wafl_pcs");
|
||||
ras->ras_block.ras_comm.block = AMDGPU_RAS_BLOCK__XGMI_WAFL;
|
||||
ras->ras_block.ras_comm.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
|
||||
adev->gmc.xgmi.ras_if = &ras->ras_block.ras_comm;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user