diff options
| author | yipechai <[email protected]> | 2022-01-05 07:39:13 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-01-14 22:52:00 +0000 |
| commit | b0e2062dc8978869c1dd96d92027f74b361d5eb7 (patch) | |
| tree | 0931bf55b23914b6e2992c936ac5e2d5b78de97f /drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | |
| parent | drm/amdgpu: Modify sdma block to fit for the unified ras block data and ops (diff) | |
| download | kernel-b0e2062dc8978869c1dd96d92027f74b361d5eb7.tar.gz kernel-b0e2062dc8978869c1dd96d92027f74b361d5eb7.zip | |
drm/amdgpu: Modify mca block to fit for the unified ras block data and ops
1.Modify mca block to fit for the unified ras block data and ops.
2.Define special .ras_block_match function for mca block to identify itself.
3.Change amdgpu_mca_ras_funcs to amdgpu_mca_ras_block(amdgpu_mca_ras had been used), and the corresponding variable name remove _funcs suffix.
4.Remove the const flag of cma ras variable so that cma ras block can be able to be inserted into amdgpu device ras block link list.
5.Invoke amdgpu_ras_register_ras_block function to register cma ras block into amdgpu device ras block link list.
6.Remove the redundant code about cma in amdgpu_ras.c after using the unified ras block.
Signed-off-by: yipechai <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Reviewed-by: John Clements <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index de0ef21e1501..a0a9abd23a7b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -469,23 +469,20 @@ int amdgpu_gmc_ras_late_init(struct amdgpu_device *adev) return r; } - if (adev->mca.mp0.ras_funcs && - adev->mca.mp0.ras_funcs->ras_late_init) { - r = adev->mca.mp0.ras_funcs->ras_late_init(adev); + if (adev->mca.mp0.ras && adev->mca.mp0.ras->ras_block.ras_late_init) { + r = adev->mca.mp0.ras->ras_block.ras_late_init(adev, NULL); if (r) return r; } - if (adev->mca.mp1.ras_funcs && - adev->mca.mp1.ras_funcs->ras_late_init) { - r = adev->mca.mp1.ras_funcs->ras_late_init(adev); + if (adev->mca.mp1.ras && adev->mca.mp1.ras->ras_block.ras_late_init) { + r = adev->mca.mp1.ras->ras_block.ras_late_init(adev, NULL); if (r) return r; } - if (adev->mca.mpio.ras_funcs && - adev->mca.mpio.ras_funcs->ras_late_init) { - r = adev->mca.mpio.ras_funcs->ras_late_init(adev); + if (adev->mca.mpio.ras && adev->mca.mpio.ras->ras_block.ras_late_init) { + r = adev->mca.mpio.ras->ras_block.ras_late_init(adev, NULL); if (r) return r; } |
