[Intel-xe] [PATCH v1 02/11] drm/xe: Add new helpers to log hardware errrors.
Himal Prasad Ghimiray
himal.prasad.ghimiray at intel.com
Thu Oct 19 13:25:25 UTC 2023
Introducing xe_gt_log_hw_err and xe_gt_log_hw_err helper to
report gt specific hardware errors.
Cc: 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 5991bcadd47e..10e5c4a23c34 100644
--- a/drivers/gpu/drm/xe/xe_gt_printk.h
+++ b/drivers/gpu/drm/xe/xe_gt_printk.h
@@ -43,4 +43,11 @@
#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 detected " fmt, gt->info.id, ##__VA_ARGS__)
+
#endif
--
2.25.1
More information about the Intel-xe
mailing list