drm/amdgpu: Add support for RAS table at 0x40000
authorjsg <jsg@openbsd.org>
Thu, 14 Dec 2023 05:30:17 +0000 (05:30 +0000)
committerjsg <jsg@openbsd.org>
Thu, 14 Dec 2023 05:30:17 +0000 (05:30 +0000)
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

index 6a44557..4356873 100644 (file)
@@ -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: