RE: [PATCH] drm/amd/ras: wait for PMFW MCA polling in UniRAS recovery
"Chai, Thomas" <[email protected]> Fri, 31 Jul 2026 07:12:01 +0000
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <BN9PR12MB530691A447278E095B2E7639FCC82@BN9PR12MB5306.namprd12.prod.outlook.com> |
AMD General If this delay is only intended for fatal recovery, should it also be conditioned on gpu_reset_flags & AMDGPU_RAS_GPU_RESET_MODE1_RESET? An unconditional msleep here would unnecessarily impact other reset paths (e.g., mode2 reset). Best Regards, Thomas -----Original Message----- From: Liu, Xiang(Dean) <[email protected]> Sent: Friday, July 31, 2026 1:44 PM To: [email protected] Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Liu, Xiang(Dean) <[email protected]> Subject: [PATCH] drm/amd/ras: wait for PMFW MCA polling in UniRAS recovery UniRAS fatal recovery reads MCA-derived ECC data through PMFW, but direct query mode bypasses the existing firmware-query delay. The recovery worker can therefore query before PMFW has finished polling the MCA banks, causing the first fatal injection to miss its UE count or time out. Apply the same 500 ms settle delay whenever UniRAS is enabled before harvesting ECC data. Signed-off-by: Xiang Liu <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index d247d0ad063f..ad9a9545b1d6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -2755,7 +2755,10 @@ static void amdgpu_ras_do_recovery(struct work_struct *work) device_list_handle = &device_list; } - if (amdgpu_ras_get_error_query_mode(adev, &error_query_mode)) { + if (amdgpu_uniras_enabled(adev)) { + /* wait 500ms to ensure pmfw polling mca bank info done */ + msleep(500); + } else if (amdgpu_ras_get_error_query_mode(adev, &error_query_mode)) +{ if (error_query_mode == AMDGPU_RAS_FIRMWARE_ERROR_QUERY) { /* wait 500ms to ensure pmfw polling mca bank info done */ msleep(500); -- 2.34.1