From b7228570bb4767c03275fdf2fda19eab12b233ec Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 14 Dec 2023 05:30:17 +0000 Subject: [PATCH] drm/amdgpu: Add support for RAS table at 0x40000 From Luben Tuikov 30289057ef8f8accd98ee41221c859a471f20c5c in linux-6.1.y/6.1.68 64a3dbb06ad88d89a0958ccafc4f01611657f641 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c index 6a445573737..43568735eca 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c @@ -161,6 +161,7 @@ static bool __get_eeprom_i2c_addr_ip_discovery(struct amdgpu_device *adev, static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, struct amdgpu_ras_eeprom_control *control) { + struct atom_context *atom_ctx = adev->mode_info.atom_context; u8 i2c_addr; if (!control) @@ -194,7 +195,16 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, break; case CHIP_ALDEBARAN: +#ifdef notyet + if (strnstr(atom_ctx->vbios_version, "D673", + sizeof(atom_ctx->vbios_version))) + control->i2c_address = EEPROM_I2C_MADDR_4; + else + control->i2c_address = EEPROM_I2C_MADDR_0; +#else + STUB(); control->i2c_address = EEPROM_I2C_MADDR_0; +#endif break; case CHIP_IP_DISCOVERY: -- 2.20.1