Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: riana.tauro@intel.com, Raag Jadav <raag.jadav@intel.com>
Subject: [PATCH v1] drm/xe/ras: Fix sysctrl and drm-ras discrepancy
Date: Tue,  8 Sep 2026 13:34:43 +0530	[thread overview]
Message-ID: <20260908080443.2255617-1-raag.jadav@intel.com> (raw)

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


             reply	other threads:[~2026-09-08  8:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  8:04 Raag Jadav [this message]
2026-09-08  8:25 ` ✓ CI.KUnit: success for drm/xe/ras: Fix sysctrl and drm-ras discrepancy 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260908080443.2255617-1-raag.jadav@intel.com \
    --to=raag.jadav@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=riana.tauro@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox