Skip to content

Commit a25cf4a

Browse files
Tao ZhouSasha Levin
authored andcommitted
drm/amdgpu: fix the calculation of RAS bad page number
[ Upstream commit f752e79 ] __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 <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 276028f commit a25cf4a

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3056,8 +3056,6 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,
30563056
/* deal with retire_unit records a time */
30573057
ret = __amdgpu_ras_convert_rec_array_from_rom(adev,
30583058
&bps[i], &err_data, nps);
3059-
if (ret)
3060-
con->bad_page_num -= adev->umc.retire_unit;
30613059
i += (adev->umc.retire_unit - 1);
30623060
} else {
30633061
break;
@@ -3070,8 +3068,6 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,
30703068
for (; i < pages; i++) {
30713069
ret = __amdgpu_ras_convert_rec_from_rom(adev,
30723070
&bps[i], &err_data, nps);
3073-
if (ret)
3074-
con->bad_page_num -= adev->umc.retire_unit;
30753071
}
30763072

30773073
con->eh_data->count_saved = con->eh_data->count;

0 commit comments

Comments
 (0)