mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
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 <xiang.liu@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f2510355fb
commit
ff930483af
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user