drm/amdgpu: fix the calculation of RAS bad page number
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix the calculation of RAS bad page number
__amdgpu_ras_restore_bad_pages is responsible for the maintenance of bad page number, drop the unnecessary bad page number update in the error handling path of add_bad_pages.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -4
@@ -3263,8 +3263,6 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,/* deal with retire_unit records a time */ ret =__amdgpu_ras_convert_rec_array_from_rom (adev, &bps[i], &err_data, nps); -if (ret) - con->bad_page_num -= adev->umc.retire_unit; i += (adev->umc.retire_unit -1 ); }else {break ;
@@ -3277,8 +3275,6 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,for (; i < pages; i++) { ret =__amdgpu_ras_convert_rec_from_rom (adev, &bps[i], &err_data, nps); -if (ret) - con->bad_page_num -= adev->umc.retire_unit; } con->eh_data->count_saved = con->eh_data->count;
Signature · 1 line
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by Hawking Zhang <[email protected]>
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, November 19, 2025 15:28
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: fix the calculation of RAS bad page number
__amdgpu_ras_restore_bad_pages is responsible for the maintenance of bad page number, drop the unnecessary bad page number update in the error handling path of add_bad_pages.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -4
@@ -3263,8 +3263,6 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,/* deal with retire_unit records a time */ ret =__amdgpu_ras_convert_rec_array_from_rom (adev, &bps[i], &err_data, nps); -if (ret) - con->bad_page_num -= adev->umc.retire_unit; i += (adev->umc.retire_unit -1 ); }else {break ;
@@ -3277,8 +3275,6 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,for (; i < pages; i++) { ret =__amdgpu_ras_convert_rec_from_rom (adev, &bps[i], &err_data, nps); -if (ret) - con->bad_page_num -= adev->umc.retire_unit; } con->eh_data->count_saved = con->eh_data->count;
--
2.34.1