From b8e9449627b11d1eda89a150e346a73863209240 Mon Sep 17 00:00:00 2001 From: Tao Zhou Date: Mon, 6 Jul 2026 16:16:34 +0800 Subject: [PATCH] drm/amd/ras: send RMA event in RAS init stage Previously the event was only raised at runtime, also raise it during RAS init when threshold is exceeded and eeprom header is tagged bad, so we can get related cper at boot time. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c b/drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c index 62d1a319c08c..3b1883a04179 100644 --- a/drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c +++ b/drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c @@ -1261,6 +1261,11 @@ int ras_eeprom_check_storage_status(struct ras_core_context *ras_core) } else { RAS_DEV_ERR(ras_core->dev, "RAS records:%d exceed threshold:%d", bad_page_count, control->record_threshold_count); + /* send the event when threshold is exceeded, and ignore the + * return value here + */ + ras_core_event_notify(ras_core, RAS_EVENT_ID__DEVICE_RMA, NULL); + if ((control->record_threshold_config == WARN_NONSTOP_OVER_THRESHOLD) || (control->record_threshold_config == NONSTOP_OVER_THRESHOLD)) { RAS_DEV_WARN(ras_core->dev,