drm/amdgpu: skip uniras block ECC query in GPU reset path
Subsystems (2)
PATCH 1/1 drm/amdgpu: skip uniras block ECC query in GPU reset path
amdgpu_uniras_query_block_ecc doesn't support being called during GPU reset.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -0
@@ -3770,6 +3770,10 @@ static int amdgpu_persistent_edc_harvesting(struct amdgpu_device *adev,if (!amdgpu_persistent_edc_harvesting_supported (adev))return 0 ; +if ((amdgpu_in_reset (adev) ||amdgpu_ras_in_recovery (adev)) && +amdgpu_uniras_enabled (adev)) +return 0 ; +if (amdgpu_ras_query_error_status (adev, &info) !=0 )drm_warn (adev_to_drm (adev),"RAS init query failure" );
Signature · 1 line
2.34.1
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] drm/amdgpu: incomplete reset check in amdgpu_persistent_edc_harvesting() - [Low] drm/amdgpu…
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [Medium] drm/amdgpu: incomplete reset check in amdgpu_persistent_edc_harvesting()
- [Low] drm/amdgpu: missing Fixes trailer for GPU reset ECC query regression
--
commit 6d9c0ce1b3d7514e06ab9efacbe9d580a60d6b1c
Author: Ce Sun <[email protected]>
Quoted 6 lines
drm/amdgpu: skip uniras block ECC query in GPU reset path
amdgpu_uniras_query_block_eccdoesn't support being called during GPU reset.Signed-off-by Ce Sun <[email protected]>Signed-off-by YiPeng Chai <[email protected]>
[Severity: Low]
This fixes the GPU reset timeout introduced when amdgpu_ras_query_error_status() was wired to amdgpu_uniras_query_block_ecc(). Should it carry:
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c static int amdgpu_persistent_edc_harvesting(struct amdgpu_device *adev, · line 3766
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4
-0@@ -3758,6 +3758,10 @@ static int amdgpu_persistent_edc_harvesting(struct amdgpu_device *adev,if (!amdgpu_persistent_edc_harvesting_supported (adev))return 0 ; +if ((amdgpu_in_reset (adev) ||amdgpu_ras_in_recovery (adev)) && +amdgpu_uniras_enabled (adev)) +return 0 ; +if (amdgpu_ras_query_error_status (adev, &info) !=0 )drm_warn (adev_to_drm (adev),"RAS init query failure" );
[Severity: Medium]
Should this skip GPU reset unconditionally instead of gating on amdgpu_uniras_enabled(adev), matching amdgpu_ras_reset_error_count()?
During XGMI reset-on-init (amdgpu_xgmi_reset_on_init_work()), the reset thread holds down_write(&adev->reset_domain->sem), while UniRAS is not enabled until amdgpu_ras_resume_after_reset() runs after the reset domain is unlocked. amdgpu_uniras_enabled(adev) also returns false during reset on SR-IOV VFs (via amdgpu_virt_ras_remote_uniras_enabled()) and on non-UniRAS devices. When amdgpu_uniras_enabled(adev) is false here, amdgpu_ras_query_error_status() falls through to amdgpu_ras_query_error_status_with_event(), where down_read_trylock(&adev->reset_domain->sem) fails against the reset thread's own write lock and logs a false "RAS init query failure" warning for every RAS block.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1