Skip to contentSkip to conversation

drm/amdgpu/ras: added RAS EEPROM device support check

PATCH In review Ce Sun 2 participants 3 messages Jun 6 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Ce Sun

author
#1 lore raw

PATCH 1/2 drm/amdgpu/ras: added RAS EEPROM device support check

Added RAS EEPROM device support check

---
 .../gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c   | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +17 -1
index ef09a6fad659..26f554a80e1a 100644
@@ -142,6 +142,21 @@ static int amdgpu_ras_mgr_init_eeprom_config(struct amdgpu_device *adev,
 	return 0;
 }
 
+static bool amdgpu_ras_mgr_eeprom_is_supported(struct amdgpu_device *adev)
+{
+	if (amdgpu_sriov_vf(adev))
+		return false;
+
+	switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
+	case IP_VERSION(13, 0, 6):
+	case IP_VERSION(13, 0, 12):
+	case IP_VERSION(13, 0, 14):
+		return (adev->gmc.is_app_apu) ? false : true;
+	default:
+		return false;
+	}
+}
+
 static int amdgpu_ras_mgr_init_mp1_config(struct amdgpu_device *adev,
 		struct ras_core_config *config)
 {
@@ -266,7 +281,8 @@ static struct ras_core_context *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev
 		init_config.aca_ip_version = IP_VERSION(1, 0, 0);
 
 	init_config.sys_fn = &amdgpu_ras_sys_fn;
-	init_config.ras_eeprom_supported = true;
+	init_config.ras_eeprom_supported =
+		amdgpu_ras_mgr_eeprom_is_supported(adev);
 	init_config.poison_supported =
 		amdgpu_ras_is_poison_mode_supported(adev);
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/2
#2 lore raw

AMD General

Series is

Regards,
Hawking
-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Saturday, June 6, 2026 9:31 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH v1 1/2] drm/amdgpu/ras: added RAS EEPROM device support check

Added RAS EEPROM device support check

---
 .../gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c   | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +17 -1
index ef09a6fad659..26f554a80e1a 100644
@@ -142,6 +142,21 @@ static int amdgpu_ras_mgr_init_eeprom_config(struct amdgpu_device *adev,
        return 0;
 }
 
+static bool amdgpu_ras_mgr_eeprom_is_supported(struct amdgpu_device
+*adev) {
+       if (amdgpu_sriov_vf(adev))
+               return false;
+
+       switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
+       case IP_VERSION(13, 0, 6):
+       case IP_VERSION(13, 0, 12):
+       case IP_VERSION(13, 0, 14):
+               return (adev->gmc.is_app_apu) ? false : true;
+       default:
+               return false;
+       }
+}
+
 static int amdgpu_ras_mgr_init_mp1_config(struct amdgpu_device *adev,
                struct ras_core_config *config)
 {
@@ -266,7 +281,8 @@ static struct ras_core_context *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev
                init_config.aca_ip_version = IP_VERSION(1, 0, 0);
 
        init_config.sys_fn = &amdgpu_ras_sys_fn;
-       init_config.ras_eeprom_supported = true;
+       init_config.ras_eeprom_supported =
+               amdgpu_ras_mgr_eeprom_is_supported(adev);
        init_config.poison_supported =
                amdgpu_ras_is_poison_mode_supported(adev);
 

--
2.34.1

author
#3 lore raw

PATCH 2/2 drm/amdgpu/ras: Add flag to make VBIOS read optional

In reply to a message not in the archive

Add flag to make VBIOS read optional

---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_eeprom_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_eeprom_i2c.c +1 -1
index 3ed3ff42b7e1..9c6d0024210d 100644
@@ -67,7 +67,7 @@ static int ras_eeprom_i2c_config(struct ras_core_context *ras_core)
 	struct ras_eeprom_control *control = &ras_core->ras_eeprom;
 	u8 i2c_addr;
 
-	if (amdgpu_atomfirmware_ras_rom_addr(adev, &i2c_addr)) {
+	if (adev->bios && amdgpu_atomfirmware_ras_rom_addr(adev, &i2c_addr)) {
 		/* The address given by VBIOS is an 8-bit, wire-format
 		 * address, i.e. the most significant byte.
 		 *
Signature · 1 line
2.34.1