Skip to contentSkip to conversation

drm/amdgpu/mes12_1: add cooperative dispatch support

PATCH New Alex Deucher 1 participant 2 messages Nov 25, 2025

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/2 drm/amdgpu/mes12_1: add cooperative dispatch support

From: Jack Xiao <[email protected]>

Add initial cooperative dispatch MES support.
a. set shared cmd buffer for the group of cooperative dispatch mes. b. automatically dispatch add_hw_queue/remove_hw_queue to master mes.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h |  6 +++
 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c  | 66 +++++++++++++++++++++++--
 2 files changed, 69 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h +6 -0
index 941d6f805b028..d503127e45d5e 100644
@@ -165,6 +165,12 @@ struct amdgpu_mes {
 	struct amdgpu_bo		*hung_queue_db_array_gpu_obj[AMDGPU_MAX_MES_PIPES];
 	uint64_t			hung_queue_db_array_gpu_addr[AMDGPU_MAX_MES_PIPES];
 	void				*hung_queue_db_array_cpu_addr[AMDGPU_MAX_MES_PIPES];
+
+	/* cooperative dispatch */
+	bool                enable_coop_mode;
+	int                 master_xcc_ids[AMDGPU_MAX_MES_INST_PIPES];
+	struct amdgpu_bo    *shared_cmd_buf_obj[AMDGPU_MAX_MES_INST_PIPES];
+	uint64_t            shared_cmd_buf_gpu_addr[AMDGPU_MAX_MES_INST_PIPES];
 };
 
 struct amdgpu_mes_gang {
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +63 -3

138 lines not on this page · raw message

Signature · 1 line
2.51.1
author maintainer
#1 lore raw

PATCH 2/2 drm/amdgpu/mes12_1: set multi-xcc mes log address

From: Michael Chen <[email protected]>

Set mes event log address based on xcc id and pipe.

---
 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +1 -1
index b12a1256989b7..466339ef016c7 100644
@@ -708,7 +708,7 @@ static int mes_v12_1_set_hw_resources(struct amdgpu_mes *mes,
 	if (amdgpu_mes_log_enable) {
 		mes_set_hw_res_pkt.enable_mes_event_int_logging = 1;
 		mes_set_hw_res_pkt.event_intr_history_gpu_mc_ptr =
-			mes->event_log_gpu_addr + pipe * AMDGPU_MES_LOG_BUFFER_SIZE;
+			mes->event_log_gpu_addr + MES_PIPE_INST(xcc_id, pipe) * AMDGPU_MES_LOG_BUFFER_SIZE;
 	}
 
 	if (adev->enforce_isolation[0] == AMDGPU_ENFORCE_ISOLATION_ENABLE)
Signature · 1 line
2.51.1