Skip to contentSkip to conversation

drm/amdgpu/mes12: switch SET_SHADER_DEBUGGER pkt to mes schq pipe

PATCH In review Jack Xiao 2 participants 2 messages Sep 11, 2024

Subsystems (2)
lore
Share & tools
lore

Jack Xiao

author
#0 lore raw

PATCH 1/1 drm/amdgpu/mes12: switch SET_SHADER_DEBUGGER pkt to mes schq pipe

The SET_SHADER_DEBUGGER packet must work with the added hardware queue, switch the packet submitting to mes schq pipe.

---
 drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +6 -5
index e499b2857a01..ef05a4116230 100644
@@ -479,6 +479,11 @@ static int mes_v12_0_misc_op(struct amdgpu_mes *mes,
 	union MESAPI__MISC misc_pkt;
 	int pipe;
 
+	if (mes->adev->enable_uni_mes)
+		pipe = AMDGPU_MES_KIQ_PIPE;
+	else
+		pipe = AMDGPU_MES_SCHED_PIPE;
+
 	memset(&misc_pkt, 0, sizeof(misc_pkt));
 
 	misc_pkt.header.type = MES_API_TYPE_SCHEDULER;
@@ -513,6 +518,7 @@ static int mes_v12_0_misc_op(struct amdgpu_mes *mes,
 		misc_pkt.wait_reg_mem.reg_offset2 = input->wrm_reg.reg1;
 		break;
 	case MES_MISC_OP_SET_SHADER_DEBUGGER:
+		pipe = AMDGPU_MES_SCHED_PIPE;
 		misc_pkt.opcode = MESAPI_MISC__SET_SHADER_DEBUGGER;
 		misc_pkt.set_shader_debugger.process_context_addr =
 				input->set_shader_debugger.process_context_addr;
@@ -530,11 +536,6 @@ static int mes_v12_0_misc_op(struct amdgpu_mes *mes,
 		return -EINVAL;
 	}
 
-	if (mes->adev->enable_uni_mes)
-		pipe = AMDGPU_MES_KIQ_PIPE;
-	else
-		pipe = AMDGPU_MES_SCHED_PIPE;
-
 	return mes_v12_0_submit_pkt_and_poll_completion(mes, pipe,
 			&misc_pkt, sizeof(misc_pkt),
 			offsetof(union MESAPI__MISC, api_status));
Signature · 1 line
2.41.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jack Xiao

The SET_SHADER_DEBUGGER packet must work with the added hardware queue, switch the packet submitting to mes schq pipe.

Quoted 43 lines
---
 drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +6 -6
index e499b2857a01..ef05a4116230 100644
@@ -479,6 +479,11 @@ static int mes_v12_0_misc_op(struct amdgpu_mes *mes,
        union MESAPI__MISC misc_pkt;
        int pipe;
 
+       if (mes->adev->enable_uni_mes)
+               pipe = AMDGPU_MES_KIQ_PIPE;
+       else
+               pipe = AMDGPU_MES_SCHED_PIPE;
+
        memset(&misc_pkt, 0, sizeof(misc_pkt));
 
        misc_pkt.header.type = MES_API_TYPE_SCHEDULER;
@@ -513,6 +518,7 @@ static int mes_v12_0_misc_op(struct amdgpu_mes *mes,
                misc_pkt.wait_reg_mem.reg_offset2 = input->wrm_reg.reg1;
                break;
        case MES_MISC_OP_SET_SHADER_DEBUGGER:
+               pipe = AMDGPU_MES_SCHED_PIPE;
                misc_pkt.opcode = MESAPI_MISC__SET_SHADER_DEBUGGER;
                misc_pkt.set_shader_debugger.process_context_addr =
                                input->set_shader_debugger.process_context_addr;
@@ -530,11 +536,6 @@ static int mes_v12_0_misc_op(struct amdgpu_mes *mes,
                return -EINVAL;
        }
 
-       if (mes->adev->enable_uni_mes)
-               pipe = AMDGPU_MES_KIQ_PIPE;
-       else
-               pipe = AMDGPU_MES_SCHED_PIPE;
-
        return mes_v12_0_submit_pkt_and_poll_completion(mes, pipe,
                        &misc_pkt, sizeof(misc_pkt),
                        offsetof(union MESAPI__MISC, api_status));
--

2.41.0