[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Tao Zhou <tao.zh...@amd.com>

500ms is not a short time, not sure if we can decrease the delay or check pmfw 
status.

> -----Original Message-----
> From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> On Behalf Of
> Stanley.Yang
> Sent: Friday, August 29, 2025 10:45 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Yang, Stanley <stanley.y...@amd.com>
> Subject: [PATCH Review 1/1] drm/amdgpu: wait pmfw polling mca bank info done
>
> wait 500ms to ensure pmfw polling mca bank info done.
>
> Change-Id: I50581f03929c86d75bf09d66238b64f2806697f0
> Signed-off-by: Stanley.Yang <stanley.y...@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 096881c90200..be0da05aa9a3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -2705,6 +2705,7 @@ static void amdgpu_ras_do_recovery(struct work_struct
> *work)
>       struct amdgpu_device *adev = ras->adev;
>       struct list_head device_list, *device_list_handle =  NULL;
>       struct amdgpu_hive_info *hive = amdgpu_get_xgmi_hive(adev);
> +     unsigned int error_query_mode;
>       enum ras_event_type type;
>
>       if (hive) {
> @@ -2733,6 +2734,13 @@ 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 (error_query_mode ==
> AMDGPU_RAS_FIRMWARE_ERROR_QUERY) {
> +                             /* wait 500ms to ensure pmfw polling mca bank 
> info
> done */
> +                             msleep(500);
> +                     }
> +             }
> +
>               type = amdgpu_ras_get_fatal_error_event(adev);
>               list_for_each_entry(remote_adev,
>                               device_list_handle, gmc.xgmi.head) {
> --
> 2.25.1

Reply via email to