diff options
| author | yipechai <[email protected]> | 2022-02-17 07:40:12 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-03-02 23:40:06 +0000 |
| commit | 80e0c2cb37b6e00ec0b41c7670e24f72b2d54ceb (patch) | |
| tree | 5138cf1bc596eb741f5a4f73f4669046dda23de3 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
| parent | drm/amdgpu: Remove redundant calls of amdgpu_ras_block_late_fini in mca ras b... (diff) | |
| download | kernel-80e0c2cb37b6e00ec0b41c7670e24f72b2d54ceb.tar.gz kernel-80e0c2cb37b6e00ec0b41c7670e24f72b2d54ceb.zip | |
drm/amdgpu: Remove redundant .ras_fini initialization in some ras blocks
1. Define amdgpu_ras_block_late_fini_default in amdgpu_ras.c as
.ras_fini common function, which is called when
.ras_fini of ras block isn't initialized.
2. Remove the code of using amdgpu_ras_block_late_fini to
initialize .ras_fini in ras blocks.
Signed-off-by: yipechai <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index bbbf22860c41..d78c2970e558 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -2477,6 +2477,12 @@ void amdgpu_ras_block_late_fini(struct amdgpu_device *adev, amdgpu_ras_interrupt_remove_handler(adev, ras_block); } +static void amdgpu_ras_block_late_fini_default(struct amdgpu_device *adev, + struct ras_common_if *ras_block) +{ + return amdgpu_ras_block_late_fini(adev, ras_block); +} + /* do some init work after IP late init as dependence. * and it runs in resume/gpu reset/booting up cases. */ @@ -2584,6 +2590,8 @@ int amdgpu_ras_fini(struct amdgpu_device *adev) if (amdgpu_ras_is_supported(adev, obj->ras_comm.block) && obj->ras_fini) obj->ras_fini(adev, &obj->ras_comm); + else + amdgpu_ras_block_late_fini_default(adev, &obj->ras_comm); } /* Clear ras blocks from ras_list and free ras block list node */ |
