summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
diff options
context:
space:
mode:
authoryipechai <YiPeng.Chai@amd.com>2022-01-19 11:49:42 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-01-26 02:00:34 +0300
commite9287ef8d46cee538c9a71bb8978b2f7e975c452 (patch)
tree43a2e8214f0c6dfa77a6485db2f73146af0e45f2 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
parent1f33bd18d703ecdf7b664168d640439e867d1605 (diff)
downloadlinux-e9287ef8d46cee538c9a71bb8978b2f7e975c452.tar.xz
Revert "drm/amdgpu: No longer insert ras blocks into ras_list if it already exists in ras_list"
This reverts commit df4f0041c6ef497e598a67e367db835489162754. Xgmi ras initialization had been moved from .late_init to early_init, the defect of repeated calling amdgpu_ras_register_ras_block had been fixed, so revert this patch. Signed-off-by: yipechai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 4992bc554c0c..d4e07d0acb66 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -2763,19 +2763,12 @@ int amdgpu_ras_reset_gpu(struct amdgpu_device *adev)
int amdgpu_ras_register_ras_block(struct amdgpu_device *adev,
struct amdgpu_ras_block_object *ras_block_obj)
{
- struct amdgpu_ras_block_object *obj, *tmp;
if (!adev || !ras_block_obj)
return -EINVAL;
if (!amdgpu_ras_asic_supported(adev))
return 0;
- /* If the ras object is in ras_list, don't add it again */
- list_for_each_entry_safe(obj, tmp, &adev->ras_list, node) {
- if (obj == ras_block_obj)
- return 0;
- }
-
INIT_LIST_HEAD(&ras_block_obj->node);
list_add_tail(&ras_block_obj->node, &adev->ras_list);