diff options
| author | Xiang Liu <[email protected]> | 2025-02-19 04:21:59 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-02-19 20:16:33 +0000 |
| commit | 663a87763b570d4e92d821b30508bed0025fa285 (patch) | |
| tree | 360cf1c206281d13f2190f49b9dd89ab834c4533 /drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | |
| parent | drm/amdgpu: Use firmware supported NPS modes (diff) | |
| download | kernel-663a87763b570d4e92d821b30508bed0025fa285.tar.gz kernel-663a87763b570d4e92d821b30508bed0025fa285.zip | |
drm/amdgpu: Check aca enabled inside cper init/fini func
Move code about checking aca enabled to the cper init/fini function
to make code clean.
Signed-off-by: Xiang Liu <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c index 8805381e19b9..20c474a32852 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c @@ -538,6 +538,9 @@ static int amdgpu_cper_ring_init(struct amdgpu_device *adev) int amdgpu_cper_init(struct amdgpu_device *adev) { + if (!amdgpu_aca_is_enabled(adev)) + return 0; + mutex_init(&adev->cper.cper_lock); adev->cper.enabled = true; @@ -548,6 +551,9 @@ int amdgpu_cper_init(struct amdgpu_device *adev) int amdgpu_cper_fini(struct amdgpu_device *adev) { + if (!amdgpu_aca_is_enabled(adev)) + return 0; + adev->cper.enabled = false; amdgpu_ring_fini(&(adev->cper.ring_buf)); |
