From: Soham Purkait <soham.purkait@intel.com>
To: intel-xe@lists.freedesktop.org, riana.tauro@intel.com,
anshuman.gupta@intel.com, aravind.iddamsetty@linux.intel.com,
badal.nilawar@intel.com, raag.jadav@intel.com,
ravi.kishore.koppuravuri@intel.com, mallesh.koujalagi@intel.com
Cc: soham.purkait@intel.com, anoop.c.vijay@intel.com
Subject: [PATCH 2/3] drm/xe/xe_ras: Add structures and commands for RAS GPU health indicator
Date: Mon, 9 Mar 2026 10:47:04 +0530 [thread overview]
Message-ID: <20260309051705.980155-3-soham.purkait@intel.com> (raw)
In-Reply-To: <20260309051705.980155-1-soham.purkait@intel.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=yes, Size: 3366 bytes --]
Add the sysctrl commands and response structures for GPU health
indicator supported by RAS.
Signed-off-by: Soham Purkait <soham.purkait@intel.com>
---
drivers/gpu/drm/xe/xe_ras_types.h | 65 +++++++++++++++++++
drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h | 15 +++++
2 files changed, 80 insertions(+)
create mode 100644 drivers/gpu/drm/xe/xe_ras_types.h
diff --git a/drivers/gpu/drm/xe/xe_ras_types.h b/drivers/gpu/drm/xe/xe_ras_types.h
new file mode 100644
index 000000000000..a05cfd971acd
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_ras_types.h
@@ -0,0 +1,65 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#ifndef _XE_RAS_TYPES_H_
+#define _XE_RAS_TYPES_H_
+
+#include <linux/types.h>
+
+/**
+ * typedef xe_ras_health_status_t - Device health status values (8-bit)
+ *
+ * Three-state health indicator value reported by system controller commands.
+ *
+ * The expected values are:
+ * - 0: ok - The device is healthy and operating within normal parameters.
+ * - 1: warning - The device is experiencing minor issues but is still operational.
+ * - 2: critical - The device is in a critical state and may not be operational.
+ */
+typedef u8 xe_ras_health_status_t;
+
+/**
+ * struct xe_ras_health_get_input - Input for XE_SYSCTRL_CMD_GET_HEALTH
+ */
+struct xe_ras_health_get_input {
+ /** @reserved: Reserved for future use, must be 0 */
+ u32 reserved[2];
+} __packed;
+
+/**
+ * struct xe_ras_health_get_response - Response for XE_SYSCTRL_CMD_GET_HEALTH
+ */
+struct xe_ras_health_get_response {
+ /** @current_health: Current health status (OK/WARNING/CRITICAL) */
+ xe_ras_health_status_t current_health;
+ /** @reserved: Reserved for alignment */
+ u8 reserved[3];
+} __packed;
+
+/**
+ * struct xe_ras_health_set_input - Input for XE_SYSCTRL_CMD_SET_HEALTH
+ */
+struct xe_ras_health_set_input {
+ /** @new_health: New health status to set */
+ xe_ras_health_status_t new_health;
+ /** @reserved: Reserved for alignment */
+ u8 reserved[3];
+} __packed;
+
+/**
+ * struct xe_ras_health_set_response - Response for XE_SYSCTRL_CMD_SET_HEALTH
+ */
+struct xe_ras_health_set_response {
+ /** @operation_status: Status of set operation (RAS_STATUS_*) */
+ u32 operation_status;
+ /** @current_health: Health status after this change */
+ xe_ras_health_status_t current_health;
+ /** @reserved: Reserved for alignment */
+ u8 reserved[3];
+ /** @reserved_2: Reserved for future expansion */
+ u32 reserved_2[2];
+} __packed;
+
+#endif /* _XE_RAS_TYPES_H_ */
diff --git a/drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h b/drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h
index 32c35a6da1cb..a4d6dd0aaff5 100644
--- a/drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h
+++ b/drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h
@@ -10,6 +10,21 @@
#include "abi/xe_sysctrl_abi.h"
+/**
+ * enum xe_sysctrl_mailbox_command_id - RAS Command ID's for GFSP group
+ *
+ * @XE_SYSCTRL_CMD_GET_HEALTH: Get current health status
+ * @XE_SYSCTRL_CMD_SET_HEALTH: Set new health status
+ */
+enum xe_sysctrl_mailbox_command_id {
+ XE_SYSCTRL_CMD_GET_HEALTH = 0x0B,
+ XE_SYSCTRL_CMD_SET_HEALTH = 0x0C
+};
+
+enum xe_sysctrl_group {
+ XE_SYSCTRL_GROUP_GFSP = 1
+};
+
/**
* struct xe_sysctrl_mailbox_command - System Controller mailbox command
* @header: Application message header containing command information
--
2.43.0
next prev parent reply other threads:[~2026-03-09 5:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 5:17 [PATCH 0/3] drm/xe: Add support for GPU health indicator Soham Purkait
2026-03-09 5:17 ` [PATCH 1/3] From: Anoop Vijay <anoop.c.vijay@intel.com> Soham Purkait
2026-03-09 5:17 ` Soham Purkait [this message]
2026-03-09 5:17 ` [PATCH 3/3] drm/xe/xe_ras: Add RAS support for GPU health indicator Soham Purkait
2026-04-08 11:49 ` Nilawar, Badal
2026-04-14 11:16 ` Purkait, Soham
2026-03-09 5:28 ` ✗ CI.checkpatch: warning for drm/xe: Add " Patchwork
2026-03-09 5:30 ` ✓ CI.KUnit: success " Patchwork
2026-03-09 6:36 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-09 8:31 ` ✗ Xe.CI.FULL: failure " Patchwork
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=20260309051705.980155-3-soham.purkait@intel.com \
--to=soham.purkait@intel.com \
--cc=anoop.c.vijay@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=raag.jadav@intel.com \
--cc=ravi.kishore.koppuravuri@intel.com \
--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