mirror of
https://github.com/torvalds/linux.git
synced 2026-04-22 16:53:59 -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
@@ -2554,21 +2554,24 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
|
||||
/* initialize nbio ras function ahead of any other
|
||||
* ras functions so hardware fatal error interrupt
|
||||
* can be enabled as early as possible */
|
||||
switch (adev->asic_type) {
|
||||
case CHIP_VEGA20:
|
||||
case CHIP_ARCTURUS:
|
||||
case CHIP_ALDEBARAN:
|
||||
if (!adev->gmc.xgmi.connected_to_cpu) {
|
||||
switch (adev->ip_versions[NBIO_HWIP][0]) {
|
||||
case IP_VERSION(7, 4, 0):
|
||||
case IP_VERSION(7, 4, 1):
|
||||
case IP_VERSION(7, 4, 4):
|
||||
if (!adev->gmc.xgmi.connected_to_cpu)
|
||||
adev->nbio.ras = &nbio_v7_4_ras;
|
||||
amdgpu_ras_register_ras_block(adev, &adev->nbio.ras->ras_block);
|
||||
adev->nbio.ras_if = &adev->nbio.ras->ras_block.ras_comm;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* nbio ras is not available */
|
||||
break;
|
||||
}
|
||||
|
||||
/* nbio ras block needs to be enabled ahead of other ras blocks
|
||||
* to handle fatal error */
|
||||
r = amdgpu_nbio_ras_sw_init(adev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (adev->nbio.ras &&
|
||||
adev->nbio.ras->init_ras_controller_interrupt) {
|
||||
r = adev->nbio.ras->init_ras_controller_interrupt(adev);
|
||||
|
||||
Reference in New Issue
Block a user