diff options
| author | yipechai <[email protected]> | 2022-02-14 06:38:02 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-02-17 20:59:05 +0000 |
| commit | caae42f00924498e78da8a960561936aa7eba503 (patch) | |
| tree | 575319ccdb26080c07322c8da6e0d4da5faab9f0 /drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | |
| parent | drm/amdgpu: Remove redundant calls of ras_late_init in mca ras block (diff) | |
| download | kernel-caae42f00924498e78da8a960561936aa7eba503.tar.gz kernel-caae42f00924498e78da8a960561936aa7eba503.zip | |
drm/amdgpu: Optimize xxx_ras_late_init function of each ras block
1. Move calling ras block instance members from module internal
function to the top calling xxx_ras_late_init.
2. Module internal function calls can only use parameter variables
of xxx_ras_late_init instead of ras block instance members.
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_nbio.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c index 92fd4ffa7779..f09ad80f0772 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c @@ -25,11 +25,11 @@ int amdgpu_nbio_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block) { int r; - r = amdgpu_ras_block_late_init(adev, adev->nbio.ras_if); + r = amdgpu_ras_block_late_init(adev, ras_block); if (r) return r; - if (amdgpu_ras_is_supported(adev, adev->nbio.ras_if->block)) { + if (amdgpu_ras_is_supported(adev, ras_block->block)) { r = amdgpu_irq_get(adev, &adev->nbio.ras_controller_irq, 0); if (r) goto late_fini; @@ -40,7 +40,7 @@ int amdgpu_nbio_ras_late_init(struct amdgpu_device *adev, struct ras_common_if * return 0; late_fini: - amdgpu_ras_block_late_fini(adev, adev->nbio.ras_if); + amdgpu_ras_block_late_fini(adev, ras_block); return r; } |
