mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: Move umc ras block init to gmc ras sw_init
Initialize umc ras block only when umc ip block supports ras. Driver queries ras capabilities after early_init, ras block init needs to be moved to sw_init. 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
f81c31d975
commit
a6dcf9a7cc
@@ -208,6 +208,36 @@ int amdgpu_umc_process_ras_data_cb(struct amdgpu_device *adev,
|
||||
return amdgpu_umc_do_page_retirement(adev, ras_error_status, entry, true);
|
||||
}
|
||||
|
||||
int amdgpu_umc_ras_sw_init(struct amdgpu_device *adev)
|
||||
{
|
||||
int err;
|
||||
struct amdgpu_umc_ras *ras;
|
||||
|
||||
if (!adev->umc.ras)
|
||||
return 0;
|
||||
|
||||
ras = adev->umc.ras;
|
||||
|
||||
err = amdgpu_ras_register_ras_block(adev, &ras->ras_block);
|
||||
if (err) {
|
||||
dev_err(adev->dev, "Failed to register umc ras block!\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
strcpy(adev->umc.ras->ras_block.ras_comm.name, "umc");
|
||||
ras->ras_block.ras_comm.block = AMDGPU_RAS_BLOCK__UMC;
|
||||
ras->ras_block.ras_comm.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
|
||||
adev->umc.ras_if = &ras->ras_block.ras_comm;
|
||||
|
||||
if (!ras->ras_block.ras_late_init)
|
||||
ras->ras_block.ras_late_init = amdgpu_umc_ras_late_init;
|
||||
|
||||
if (ras->ras_block.ras_cb)
|
||||
ras->ras_block.ras_cb = amdgpu_umc_process_ras_data_cb;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int amdgpu_umc_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block)
|
||||
{
|
||||
int r;
|
||||
|
||||
Reference in New Issue
Block a user