diff options
| author | Yang Wang <[email protected]> | 2024-01-24 02:15:10 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-01-25 19:58:02 +0000 |
| commit | c0c48f0d61ff94864947aa12074f4614b7e989e5 (patch) | |
| tree | b7e89de1f7750d25c943a19054cfea5ca0cf239d /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
| parent | drm/amdgpu: add aca sysfs remove support (diff) | |
| download | kernel-c0c48f0d61ff94864947aa12074f4614b7e989e5.tar.gz kernel-c0c48f0d61ff94864947aa12074f4614b7e989e5.zip | |
drm/amdgpu: adjust aca init/fini sequence to match gpu reset
- move aca init/fini function into ras init/fini to adapt gpu reset
sequence.
- add new function amdgpu_aca_reset()
Signed-off-by: Yang Wang <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 80816c4ec1f1..ebcd1cb60052 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -3344,10 +3344,18 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev) if (amdgpu_sriov_vf(adev)) return 0; - if (amdgpu_aca_is_enabled(adev)) + if (amdgpu_aca_is_enabled(adev)) { + if (amdgpu_in_reset(adev)) + r = amdgpu_aca_reset(adev); + else + r = amdgpu_aca_init(adev); + if (r) + return r; + amdgpu_ras_set_aca_debug_mode(adev, false); - else + } else { amdgpu_ras_set_mca_debug_mode(adev, false); + } list_for_each_entry_safe(node, tmp, &adev->ras_list, node) { obj = node->ras_obj; @@ -3416,6 +3424,9 @@ int amdgpu_ras_fini(struct amdgpu_device *adev) amdgpu_ras_fs_fini(adev); amdgpu_ras_interrupt_remove_all(adev); + if (amdgpu_aca_is_enabled(adev)) + amdgpu_aca_fini(adev); + WARN(AMDGPU_RAS_GET_FEATURES(con->features), "Feature mask is not cleared"); if (AMDGPU_RAS_GET_FEATURES(con->features)) |
