[PATCH 2/2] drm/amdgpu: Reserve bad pages after ASIC was reset.

Andrey Grodzovsky andrey.grodzovsky at amd.com
Wed Nov 13 22:45:25 UTC 2019


Problem:
There is no point to reserve bad pages before GPU reset as
it was done untill now since we need to do it after ASIC was
reset as we lose all reservation during ASIC reset.

Fix:
Call amdgpu_ras_reserve_bad_pages after ASIC is reset and not before.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index f2feff4..eaac2b7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3804,6 +3804,10 @@ static int amdgpu_do_asic_reset(struct amdgpu_hive_info *hive,
 						break;
 				}
 			}
+
+			/* Mark vram pages with errors as bad after ASIC was reset */
+			list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head)
+			       amdgpu_ras_reserve_bad_pages(tmp_adev);
 		}
 	}
 
-- 
2.7.4



More information about the amd-gfx mailing list