[PATCH 0/5] Add get-error-counter support for CRI

Riana Tauro
2026-03-20T09:53:56Z

Add support to query error counter for CRI in XE DRM RAS.
This patch adds the necessary structures and commands to query error counter
from the System controller. It also integrates with the existing XE DRM
RAS framework to allow userspace to retrieve error counter vaue.

Example: Query error counter using ynl tool

$ sudo ynl --family drm_ras --dump get-error-counter \
--json '{"node-id":1}'
[{"error-id": 1, "error-name": "core-compute", "error-value": 0},
{"error-id": 2, "error-name": "soc-internal", "error-value": 0},
{"error-id": 3, "error-name": "device-memory", "error-value": 0},
{"error-id": 4, "error-name": "pcie", "error-value": 0},
{"error-id": 5, "error-name": "fabric", "error-value": 0},]

Query single error counter

$ sudo ynl --family drm_ras --do get-error-counter --json \
'{"node-id":1, "error-id":1}'
{'error-id': 1, 'error-name': 'core-compute', 'error-value': 2}

Anoop Vijay (1):
drm/xe/xe_sysctrl: Add System controller patch

Riana Tauro (4):
drm/xe/uapi: Add additional error components to XE DRM RAS
drm/xe/ras: Add flag for Xe RAS
drm/xe/xe_ras: Add structures and commands for get counter
drm/xe/xe_ras: Add support to query error counter for CRI

drivers/gpu/drm/xe/Makefile | 3 +
drivers/gpu/drm/xe/abi/xe_sysctrl_abi.h | 74 ++++
drivers/gpu/drm/xe/regs/xe_sysctrl_regs.h | 36 ++
drivers/gpu/drm/xe/xe_device.c | 5 +
drivers/gpu/drm/xe/xe_device_types.h | 8 +
drivers/gpu/drm/xe/xe_drm_ras.c | 22 +-
drivers/gpu/drm/xe/xe_hw_error.c | 2 +-
drivers/gpu/drm/xe/xe_pci.c | 5 +
drivers/gpu/drm/xe/xe_pci_types.h | 2 +
drivers/gpu/drm/xe/xe_pm.c | 11 +
drivers/gpu/drm/xe/xe_ras.c | 111 ++++++
drivers/gpu/drm/xe/xe_ras.h | 16 +
drivers/gpu/drm/xe/xe_ras_types.h | 151 +++++++
drivers/gpu/drm/xe/xe_sysctrl.c | 128 ++++++
drivers/gpu/drm/xe/xe_sysctrl.h | 23 ++
drivers/gpu/drm/xe/xe_sysctrl_mailbox.c | 369 ++++++++++++++++++
drivers/gpu/drm/xe/xe_sysctrl_mailbox.h | 31 ++
drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h | 40 ++
drivers/gpu/drm/xe/xe_sysctrl_types.h | 32 ++
include/uapi/drm/xe_drm.h | 11 +-
20 files changed, 1070 insertions(+), 10 deletions(-)
create mode 100644 drivers/gpu/drm/xe/abi/xe_sysctrl_abi.h
create mode 100644 drivers/gpu/drm/xe/regs/xe_sysctrl_regs.h
create mode 100644 drivers/gpu/drm/xe/xe_ras.c
create mode 100644 drivers/gpu/drm/xe/xe_ras.h
create mode 100644 drivers/gpu/drm/xe/xe_ras_types.h
create mode 100644 drivers/gpu/drm/xe/xe_sysctrl.c
create mode 100644 drivers/gpu/drm/xe/xe_sysctrl.h
create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_mailbox.c
create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_mailbox.h
create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_mailbox_types.h
create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_types.h

--
2.47.1