[Intel-xe] [PATCH 4/4] drm/xe/guc: Print doorbell ID in GuC engine debugfs / error capture

Matthew Brost matthew.brost at intel.com
Thu Jun 8 20:08:57 UTC 2023


This information is helpful so print it.

Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
 drivers/gpu/drm/xe/xe_guc_submit.c       | 2 ++
 drivers/gpu/drm/xe/xe_guc_submit_types.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 5d503ca50b27..a3961974f01c 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1966,6 +1966,7 @@ xe_guc_engine_snapshot_capture(struct xe_engine *e)
 	snapshot->sched_props.timeslice_us = e->sched_props.timeslice_us;
 	snapshot->sched_props.preempt_timeout_us =
 		e->sched_props.preempt_timeout_us;
+	snapshot->doorbell_id = e->guc->doorbell_id;
 
 	snapshot->lrc = kmalloc_array(e->width, sizeof(struct lrc_snapshot),
 				      GFP_ATOMIC);
@@ -2048,6 +2049,7 @@ xe_guc_engine_snapshot_print(struct xe_guc_submit_engine_snapshot *snapshot,
 		   snapshot->sched_props.timeslice_us);
 	drm_printf(p, "\tPreempt timeout: %u (us)\n",
 		   snapshot->sched_props.preempt_timeout_us);
+	drm_printf(p, "\tDoorbell ID: %u\n", snapshot->doorbell_id);
 
 	for (i = 0; snapshot->lrc && i < snapshot->width; ++i) {
 		drm_printf(p, "\tHW Context Desc: 0x%08x\n",
diff --git a/drivers/gpu/drm/xe/xe_guc_submit_types.h b/drivers/gpu/drm/xe/xe_guc_submit_types.h
index 6765b2c6eab1..b44210bfb794 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit_types.h
+++ b/drivers/gpu/drm/xe/xe_guc_submit_types.h
@@ -92,6 +92,8 @@ struct xe_guc_submit_engine_snapshot {
 	u32 logical_mask;
 	/** @width: width (number BB submitted per exec) of this engine */
 	u16 width;
+	/** @doorbell_id: doorbell id */
+	u16 doorbell_id;
 	/** @refcount: ref count of this engine */
 	u32 refcount;
 	/**
-- 
2.34.1



More information about the Intel-xe mailing list