diff options
| author | Xiang Liu <[email protected]> | 2025-02-24 15:01:06 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-02-25 16:45:12 +0000 |
| commit | ff930483af93753cc3ba252e13f3cd92e505f0f0 (patch) | |
| tree | a95953e85a6cb3c61808322fdceea7c10cbe807d /drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c | |
| parent | drm/amdgpu: Save nps to eeprom (diff) | |
| download | kernel-ff930483af93753cc3ba252e13f3cd92e505f0f0.tar.gz kernel-ff930483af93753cc3ba252e13f3cd92e505f0f0.zip | |
drm/amdgpu: Set CPER enabled flag after ring initiailized
Setting cper.enabled to be true only after cper ring is successfully
created.
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 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c index 20c474a32852..5b6bdabb8012 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c @@ -538,15 +538,23 @@ static int amdgpu_cper_ring_init(struct amdgpu_device *adev) int amdgpu_cper_init(struct amdgpu_device *adev) { + int r; + if (!amdgpu_aca_is_enabled(adev)) return 0; + r = amdgpu_cper_ring_init(adev); + if (r) { + dev_err(adev->dev, "fail to initiailize cper ring, r = %d\n", r); + return r; + } + mutex_init(&adev->cper.cper_lock); adev->cper.enabled = true; adev->cper.max_count = CPER_MAX_ALLOWED_COUNT; - return amdgpu_cper_ring_init(adev); + return 0; } int amdgpu_cper_fini(struct amdgpu_device *adev) |
