]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: wait pmfw polling mca bank info done
authorStanley.Yang <Stanley.Yang@amd.com>
Thu, 21 Aug 2025 08:05:42 +0000 (16:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Sep 2025 20:55:27 +0000 (16:55 -0400)
wait 500ms to ensure pmfw polling mca bank info done.

Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index 7fe5b1940df8323a366dd6f6fea729ee125127ee..663b96583bfd7ffd41da82307ae2b612b3522885 100644 (file)
@@ -2702,6 +2702,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) {
@@ -2730,6 +2731,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) {