OSDN Git Service

drm/amdgpu: move umc ras init to umc block
authorTao Zhou <tao.zhou1@amd.com>
Thu, 5 Sep 2019 11:25:18 +0000 (19:25 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Sep 2019 15:06:12 +0000 (10:06 -0500)
move umc ras init from ras module to umc block, generic ras module
should pay less attention to specific ras block.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c

index e461386..3268f54 100644 (file)
@@ -1655,10 +1655,6 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
        if (amdgpu_ras_fs_init(adev))
                goto fs_out;
 
-       /* ras init for each ras block */
-       if (adev->umc.funcs->ras_init)
-               adev->umc.funcs->ras_init(adev);
-
        DRM_INFO("RAS INFO: ras initialized successfully, "
                        "hardware ability[%x] ras_mask[%x]\n",
                        con->hw_supported, con->supported);
index c8de127..5683c51 100644 (file)
@@ -62,6 +62,10 @@ int amdgpu_umc_ras_late_init(struct amdgpu_device *adev, void *ras_ih_info)
                goto free;
        }
 
+       /* ras init of specific umc version */
+       if (adev->umc.funcs && adev->umc.funcs->ras_init)
+               adev->umc.funcs->ras_init(adev);
+
        return 0;
 
 late_fini: