Skip to contentSkip to conversation

drm/amd/ras: Sync bad page count on EEPROM update

PATCH In review Xiang Liu 2 participants 2 messages Jun 12

Subsystems (2)
lore
Share & tools
lore

Xiang Liu

author
#0 lore raw

PATCH 1/1 drm/amd/ras: Sync bad page count on EEPROM update

The rascore EEPROM runtime append path updates the saved bad page count in memory and EEPROM. Keep the SMU bad page count in sync when the EEPROM header is updated so firmware sees the latest count from the runtime threshold path.

Notify UPDATE_BAD_PAGE_NUM after computing the rascore UMC bad page count.

---
 drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c +3 -0
index 3a0ea036c9be..62d1a319c08c 100644
@@ -746,6 +746,9 @@ static int ras_eeprom_update_header(struct ras_eeprom_control *control)
 	int res;
 
 	bad_page_count = ras_umc_get_badpage_count(ras_core);
+	ras_core_event_notify(ras_core, RAS_EVENT_ID__UPDATE_BAD_PAGE_NUM,
+			      &bad_page_count);
+
 	/* Modify the header if it exceeds.
 	 */
 	if (threshold_config != 0 &&
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

AMD General

Quoted 40 lines

-----Original Message-----
From: Liu, Xiang(Dean) <[email protected]>
Sent: Friday, June 12, 2026 3:14 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Liu, Xiang(Dean) <[email protected]>
Subject: [PATCH] drm/amd/ras: Sync bad page count on EEPROM update

The rascore EEPROM runtime append path updates the saved bad page count in memory and EEPROM. Keep the SMU bad page count in sync when the EEPROM header is updated so firmware sees the latest count from the runtime threshold path.

Notify UPDATE_BAD_PAGE_NUM after computing the rascore UMC bad page count.

---
 drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c +3 -0
index 3a0ea036c9be..62d1a319c08c 100644
@@ -746,6 +746,9 @@ static int ras_eeprom_update_header(struct
 ras_eeprom_control *control)
      int res;
 
      bad_page_count = ras_umc_get_badpage_count(ras_core);
+     ras_core_event_notify(ras_core,
 RAS_EVENT_ID__UPDATE_BAD_PAGE_NUM,
+                           &bad_page_count);
+
      /* Modify the header if it exceeds.
       */
      if (threshold_config != 0 &&

--
2.34.1