Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/xe/ras: Fix sysctrl and drm-ras discrepancy
@ 2026-09-08  8:04 Raag Jadav
  2026-09-08  8:25 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Raag Jadav @ 2026-09-08  8:04 UTC (permalink / raw)
  To: intel-xe; +Cc: riana.tauro, Raag Jadav

There are cases where a reported error is valid for sysctrl but it's not
exposed as a valid uapi through drm-ras. We allow such error to be logged
but it's redundant to try to send an error-event for it. Early return such
cases and prevent misleading drm-ras error-event failures.

Fixes: 6a9493e47075 ("drm/xe/xe_ras: Report correctable/uncorrectable error events to userspace")
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
 drivers/gpu/drm/xe/xe_ras.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
index 7a85735c57d5..522d891da4a0 100644
--- a/drivers/gpu/drm/xe/xe_ras.c
+++ b/drivers/gpu/drm/xe/xe_ras.c
@@ -288,6 +288,13 @@ static void ras_send_error_event(struct xe_device *xe, u8 severity, u8 component
 	u32 value;
 	int ret;
 
+	drm_severity = xe_to_drm_ras_severity(severity);
+	drm_component = xe_to_drm_ras_component(component);
+
+	/* Not all sysctrl reported errors are valid uapi */
+	if (drm_severity == DRM_XE_RAS_ERR_SEV_MAX || drm_component == DRM_XE_RAS_ERR_COMP_MAX)
+		return;
+
 	counter.common.severity = severity;
 	counter.common.component = component;
 
@@ -295,9 +302,6 @@ static void ras_send_error_event(struct xe_device *xe, u8 severity, u8 component
 	if (ret)
 		return;
 
-	drm_severity = xe_to_drm_ras_severity(severity);
-	drm_component = xe_to_drm_ras_component(component);
-
 	xe_drm_ras_event(xe, drm_component, drm_severity, value);
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-09  5:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08  8:04 [PATCH v1] drm/xe/ras: Fix sysctrl and drm-ras discrepancy Raag Jadav
2026-09-08  8:25 ` ✓ CI.KUnit: success for " Patchwork
2026-09-08  9:08 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-08 11:19 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-09  5:03 ` [PATCH v1] " Tauro, Riana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox