Commit 27c5f295 authored by Tao Zhou's avatar Tao Zhou Committed by Alex Deucher

drm/amdgpu: reorganize RAS injection flow

So GFX RAS injection could use default function if it doesn't define its
own injection interface.
Signed-off-by: default avatarTao Zhou <tao.zhou1@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarStanley.Yang <Stanley.Yang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2c22ed0b
...@@ -1123,16 +1123,15 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev, ...@@ -1123,16 +1123,15 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
block_info.address); block_info.address);
} }
if (info->head.block == AMDGPU_RAS_BLOCK__GFX) { if (block_obj->hw_ops->ras_error_inject) {
if (block_obj->hw_ops->ras_error_inject) if (info->head.block == AMDGPU_RAS_BLOCK__GFX)
ret = block_obj->hw_ops->ras_error_inject(adev, info, info->instance_mask); ret = block_obj->hw_ops->ras_error_inject(adev, info, info->instance_mask);
} else { else /* Special ras_error_inject is defined (e.g: xgmi) */
/* If defined special ras_error_inject(e.g: xgmi), implement special ras_error_inject */
if (block_obj->hw_ops->ras_error_inject)
ret = block_obj->hw_ops->ras_error_inject(adev, &block_info, ret = block_obj->hw_ops->ras_error_inject(adev, &block_info,
info->instance_mask); info->instance_mask);
else /*If not defined .ras_error_inject, use default ras_error_inject*/ } else {
ret = psp_ras_trigger_error(&adev->psp, &block_info, info->instance_mask); /* default path */
ret = psp_ras_trigger_error(&adev->psp, &block_info, info->instance_mask);
} }
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment