Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Add support for RAS table at 0x40000

Add support for RAS table at I2C EEPROM address of 0x40000, since on some
ASICs it is not at 0, but at 0x40000.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Kent Russell <kent.russell@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Tested-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Luben Tuikov and committed by
Alex Deucher
64a3dbb0 0dbf2c56

+6 -1
+6 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
··· 157 157 static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, 158 158 struct amdgpu_ras_eeprom_control *control) 159 159 { 160 + struct atom_context *atom_ctx = adev->mode_info.atom_context; 160 161 u8 i2c_addr; 161 162 162 163 if (!control) ··· 191 190 break; 192 191 193 192 case CHIP_ALDEBARAN: 194 - control->i2c_address = EEPROM_I2C_MADDR_0; 193 + if (strnstr(atom_ctx->vbios_version, "D673", 194 + sizeof(atom_ctx->vbios_version))) 195 + control->i2c_address = EEPROM_I2C_MADDR_4; 196 + else 197 + control->i2c_address = EEPROM_I2C_MADDR_0; 195 198 break; 196 199 197 200 case CHIP_IP_DISCOVERY: