]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
Merge tag 'ktest-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_ras_eeprom.c
index e2ec71321c7a9da43dd53e88388ee82ca0aa6fcb..f40c871da0c623d584953d23b292b5772f91432f 100644 (file)
@@ -31,6 +31,7 @@
 #define EEPROM_I2C_TARGET_ADDR_ARCTURUS                0xA8
 #define EEPROM_I2C_TARGET_ADDR_ARCTURUS_D342   0xA0
 #define EEPROM_I2C_TARGET_ADDR_SIENNA_CICHLID   0xA0
+#define EEPROM_I2C_TARGET_ADDR_ALDEBARAN        0xA0
 
 /*
  * The 2 macros bellow represent the actual size in bytes that
@@ -64,7 +65,8 @@ static bool __is_ras_eeprom_supported(struct amdgpu_device *adev)
 {
        if ((adev->asic_type == CHIP_VEGA20) ||
            (adev->asic_type == CHIP_ARCTURUS) ||
-           (adev->asic_type == CHIP_SIENNA_CICHLID))
+           (adev->asic_type == CHIP_SIENNA_CICHLID) ||
+           (adev->asic_type == CHIP_ALDEBARAN))
                return true;
 
        return false;
@@ -106,6 +108,10 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
                *i2c_addr = EEPROM_I2C_TARGET_ADDR_SIENNA_CICHLID;
                break;
 
+       case CHIP_ALDEBARAN:
+               *i2c_addr = EEPROM_I2C_TARGET_ADDR_ALDEBARAN;
+               break;
+
        default:
                return false;
        }
@@ -441,7 +447,14 @@ bool amdgpu_ras_eeprom_check_err_threshold(struct amdgpu_device *adev)
        if (!__is_ras_eeprom_supported(adev))
                return false;
 
-       if (con && (con->eeprom_control.tbl_hdr.header == EEPROM_TABLE_HDR_BAD)) {
+       /* skip check eeprom table for VEGA20 Gaming */
+       if (!con)
+               return false;
+       else
+               if (!(con->features & BIT(AMDGPU_RAS_BLOCK__UMC)))
+                       return false;
+
+       if (con->eeprom_control.tbl_hdr.header == EEPROM_TABLE_HDR_BAD) {
                dev_warn(adev->dev, "This GPU is in BAD status.");
                dev_warn(adev->dev, "Please retire it or setting one bigger "
                                "threshold value when reloading driver.\n");
This page took 0.035556 seconds and 4 git commands to generate.