[PATCH 02/10] drm/xe: Add new helpers to log hardware errrors.
Aravind Iddamsetty
aravind.iddamsetty at linux.intel.com
Wed Jul 30 05:48:06 UTC 2025
From: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
Introducing xe_gt_log_hw_err and xe_gt_log_hw_err helper to
report gt specific hardware errors.
v2
- use _gt and _fmt instead of gt and fmt.
- Messages should be same.
Cc: Aravind Iddamsetty <aravind.iddamsetty at linux.intel.com>
Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty at linux.intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
---
drivers/gpu/drm/xe/xe_gt_printk.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_gt_printk.h b/drivers/gpu/drm/xe/xe_gt_printk.h
index 11da0228cea7..2f9baf7d191b 100644
--- a/drivers/gpu/drm/xe/xe_gt_printk.h
+++ b/drivers/gpu/drm/xe/xe_gt_printk.h
@@ -46,6 +46,13 @@
#define xe_gt_WARN_ON_ONCE(_gt, _condition) \
xe_gt_WARN_ONCE((_gt), _condition, "%s(%s)", "gt_WARN_ON_ONCE", __stringify(_condition))
+#define xe_gt_log_hw_err(_gt, _fmt, ...) \
+ drm_err_ratelimited(>_to_xe(_gt)->drm, HW_ERR "GT%d reported " _fmt, \
+ (_gt)->info.id, ##__VA_ARGS__)
+
+#define xe_gt_log_hw_warn(_gt, _fmt, ...) \
+ drm_warn(>_to_xe(_gt)->drm, HW_ERR "GT%d reported " _fmt, (_gt)->info.id, ##__VA_ARGS__)
+
static inline void __xe_gt_printfn_err(struct drm_printer *p, struct va_format *vaf)
{
struct xe_gt *gt = p->arg;
--
2.25.1
More information about the Intel-xe
mailing list