Skip to contentSkip to conversation

drm/amdgpu: wire mes_dbgext on mes12.1

PATCH New Yongqiang Sun 1 participant 1 message Oct 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/amdgpu: wire mes_dbgext on mes12.1

Add the per-IP hardware wiring that drives the mes_dbgext core on mes12.1 (mes_v12_1 / gfx_v12_1): handle MES_MISC_OP_SETUP_MES_DBGEXT in the misc-op path, unmask the MES host (TIME_STAMP) interrupt across both me3 pipes via the XCC-aware GRBM select, select the zoned buffer format in sw_init(), start/stop the feature from hw_init()/hw_fini(), and drain the log from the me3 EOP interrupt handler while the feature is active.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 19 +++++++
 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 68 ++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +19 -0
index 147bed75261c..52a8c5022da8 100644
@@ -3489,6 +3489,25 @@ static int gfx_v12_1_eop_irq(struct amdgpu_device *adev,
 
 	DRM_DEBUG("IH: CP EOP\n");
 
+	if (((entry->ring_id & 0x0c) >> 2) == 3) {
+		u32 type = amdgpu_mes_ih_int_type(doorbell_offset);
+
+		switch (type) {
+		case AMDGPU_MES_IH_INT_TYPE_DBGMSG:
+			/*
+			 * MES firmware debug-extension ("mes_dbgext") messages are
+			 * delivered as an EOP interrupt from the MES scheduler pipe
+			 * (me 3).  Type is in context dword bits 31:26 (MES_DBGMSG = 7).
+			 */
+			if (adev->mes.dbgext_active)
+				amdgpu_mes_dbgext_notify(adev, doorbell_offset);
+			break;
+		default:
+			break;
+		}
+		return 0;
+	}
+
 	if (adev->enable_mes && doorbell_offset) {
 		amdgpu_userq_process_fence_irq(adev, doorbell_offset);
 	} else {
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +68 -0

109 lines not on this page · raw message

Signature · 1 line
2.43.0