Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Handle Firmware reported Hardware Errors
@ 2025-06-23 10:01 Riana Tauro
  2025-06-23  9:42 ` ✗ CI.checkpatch: warning for Handle Firmware reported Hardware Errors (rev2) Patchwork
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Riana Tauro @ 2025-06-23 10:01 UTC (permalink / raw)
  To: intel-xe
  Cc: riana.tauro, anshuman.gupta, rodrigo.vivi, lucas.demarchi,
	aravind.iddamsetty, raag.jadav, umesh.nerlige.ramappa,
	frank.scarbrough

Add support to handle firmware reported errors. When CSC firmware
errors are encoutered, a error interrupt is received by the GFX device as
a MSI interrupt.

Device Source control registers indicates the source of the error as CSC
The HEC error status register indicates that the error is firmware reported
Depending on the type of firmware error, the error cause is written to the HEC
Firmware error register.

On encountering such CSC firmware errors, the graphics device is
non-recoverable from driver context. The only way to recover from these
errors is firmware flash.

Add a firmware flash method to the drm device wedged uevent. Send
this method along with the uevent to notify userspace of the wedged
state and the possible recovery method.

$ udevadm monitor --property --kernel
monitor will print the received events for:
KERNEL - the kernel uevent

KERNEL[754.709341] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card0
SUBSYSTEM=drm
WEDGED=firmware-flash
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=5973
MAJOR=226
MINOR=0

Bspec: 50875, 53073, 53074, 53075, 53076

fwupd PR: https://github.com/fwupd/fwupd/pull/8922
	  https://github.com/fwupd/fwupd/pull/8944

IGT: https://patchwork.freedesktop.org/patch/660122/

Rev2: add a fault injection for csc errors
      fix review comments

Riana Tauro (5):
  drm: Add a firmware flash method to device wedged uevent
  drm/xe: Add a helper function to set recovery method
  drm/xe: Add support to handle hardware errors
  drm/xe/xe_hw_error: Handle CSC Firmware reported Hardware errors
  drm/xe/xe_hw_error: Add fault injection to trigger csc error handler

 Documentation/gpu/drm-uapi.rst             |   6 +-
 drivers/gpu/drm/drm_drv.c                  |   2 +
 drivers/gpu/drm/xe/Makefile                |   1 +
 drivers/gpu/drm/xe/regs/xe_gsc_regs.h      |   2 +
 drivers/gpu/drm/xe/regs/xe_hw_error_regs.h |  20 +++
 drivers/gpu/drm/xe/regs/xe_irq_regs.h      |   1 +
 drivers/gpu/drm/xe/xe_debugfs.c            |   2 +
 drivers/gpu/drm/xe/xe_device.c             |  48 ++++--
 drivers/gpu/drm/xe/xe_device.h             |   1 +
 drivers/gpu/drm/xe/xe_device_types.h       |   5 +
 drivers/gpu/drm/xe/xe_hw_error.c           | 182 +++++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_error.h           |  15 ++
 drivers/gpu/drm/xe/xe_irq.c                |   4 +
 include/drm/drm_device.h                   |   1 +
 14 files changed, 271 insertions(+), 19 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/regs/xe_hw_error_regs.h
 create mode 100644 drivers/gpu/drm/xe/xe_hw_error.c
 create mode 100644 drivers/gpu/drm/xe/xe_hw_error.h

-- 
2.47.1


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

end of thread, other threads:[~2025-07-01 17:16 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 10:01 [PATCH v2 0/5] Handle Firmware reported Hardware Errors Riana Tauro
2025-06-23  9:42 ` ✗ CI.checkpatch: warning for Handle Firmware reported Hardware Errors (rev2) Patchwork
2025-06-23  9:44 ` ✓ CI.KUnit: success " Patchwork
2025-06-23 10:01 ` [PATCH v2 1/5] drm: Add a firmware flash method to device wedged uevent Riana Tauro
2025-06-24 12:26   ` Christian König
2025-06-24 14:03     ` Riana Tauro
2025-06-24 14:23       ` Christian König
2025-06-24 21:36         ` Rodrigo Vivi
2025-06-27 21:38           ` Rodrigo Vivi
2025-06-30  8:29             ` Christian König
2025-06-30 17:33               ` Rodrigo Vivi
2025-07-01 11:37                 ` Riana Tauro
2025-07-01 11:41                   ` Riana Tauro
2025-07-01 14:23                     ` Raag Jadav
2025-07-01 14:35                       ` Christian König
2025-07-01 16:02                         ` Raag Jadav
2025-07-01 16:44                           ` Riana Tauro
2025-07-01 17:15                             ` André Almeida
2025-06-23 10:01 ` [PATCH v2 2/5] drm/xe: Add a helper function to set recovery method Riana Tauro
2025-06-23 10:01 ` [PATCH v2 3/5] drm/xe: Add support to handle hardware errors Riana Tauro
2025-06-23 10:01 ` [PATCH v2 4/5] drm/xe/xe_hw_error: Handle CSC Firmware reported Hardware errors Riana Tauro
2025-06-23 10:01 ` [PATCH v2 5/5] drm/xe/xe_hw_error: Add fault injection to trigger csc error handler Riana Tauro
2025-06-23 10:02 ` ✗ CI.checksparse: warning for Handle Firmware reported Hardware Errors (rev2) Patchwork
2025-06-23 11:11 ` ✓ Xe.CI.BAT: success " Patchwork
2025-06-23 14:11 ` ✗ Xe.CI.Full: failure " Patchwork

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