Skip to content

Commit fce0afc

Browse files
ganglxiealexdeucher
authored andcommitted
drm/amdgpu: Get mca address for old eeprom records
after getting mca address for old eeprom records with 'address==0', it can be correctly parsed under none-nps1, or it will be dropped. Signed-off-by: ganglxie <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 31e837d commit fce0afc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,6 +2859,15 @@ static int __amdgpu_ras_convert_rec_array_from_rom(struct amdgpu_device *adev,
28592859
return -EINVAL;
28602860
}
28612861
} else {
2862+
if (bps[0].address == 0) {
2863+
/* for specific old eeprom data, mca address is not stored,
2864+
* calc it from pa
2865+
*/
2866+
if (amdgpu_umc_pa2mca(adev, bps[0].retired_page << AMDGPU_GPU_PAGE_SHIFT,
2867+
&(bps[0].address), AMDGPU_NPS1_PARTITION_MODE))
2868+
return -EINVAL;
2869+
}
2870+
28622871
if (amdgpu_ras_mca2pa(adev, &bps[0], err_data)) {
28632872
if (nps == AMDGPU_NPS1_PARTITION_MODE)
28642873
memcpy(err_data->err_addr, bps,

0 commit comments

Comments
 (0)