drm/amdgpu: reserve bad pages during recovery
authorxinhui pan <xinhui.pan@amd.com>
Mon, 21 Jan 2019 12:33:48 +0000 (20:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:50 +0000 (15:36 -0500)
Mark vram pages with errors as bad and prevent the driver
from using them.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 1eb21981ede5166aa0e9391b1254bc559a6295af..8b3978aad5cacfc77d38432863cd87ce94f4cd77 100644 (file)
@@ -3399,6 +3399,11 @@ static int amdgpu_do_asic_reset(struct amdgpu_hive_info *hive,
                                                break;
                                }
                        }
+
+                       list_for_each_entry(tmp_adev, device_list_handle,
+                                       gmc.xgmi.head) {
+                               amdgpu_ras_reserve_bad_pages(tmp_adev);
+                       }
                }
        }