mirror of
https://github.com/torvalds/linux.git
synced 2026-04-24 17:42:27 -04:00
drm/amdgpu: Rework pcie_bif ras sw_init
pcie_bif ras blocks needs to be initialized as early as possible to handle fatal error detected in hw_init phase. also align the pcie_bif ras sw_init with other ras 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
da9d669eab
commit
fdc94d3a8c
@@ -22,6 +22,29 @@
|
||||
#include "amdgpu.h"
|
||||
#include "amdgpu_ras.h"
|
||||
|
||||
int amdgpu_nbio_ras_sw_init(struct amdgpu_device *adev)
|
||||
{
|
||||
int err;
|
||||
struct amdgpu_nbio_ras *ras;
|
||||
|
||||
if (!adev->nbio.ras)
|
||||
return 0;
|
||||
|
||||
ras = adev->nbio.ras;
|
||||
err = amdgpu_ras_register_ras_block(adev, &ras->ras_block);
|
||||
if (err) {
|
||||
dev_err(adev->dev, "Failed to register pcie_bif ras block!\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
strcpy(ras->ras_block.ras_comm.name, "pcie_bif");
|
||||
ras->ras_block.ras_comm.block = AMDGPU_RAS_BLOCK__PCIE_BIF;
|
||||
ras->ras_block.ras_comm.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
|
||||
adev->nbio.ras_if = &ras->ras_block.ras_comm;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int amdgpu_nbio_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block)
|
||||
{
|
||||
int r;
|
||||
|
||||
Reference in New Issue
Block a user