]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu/mes12: switch SET_SHADER_DEBUGGER pkt to mes schq pipe
authorJack Xiao <Jack.Xiao@amd.com>
Wed, 11 Sep 2024 08:24:35 +0000 (16:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:38:35 +0000 (16:38 +0200)
commit 3c75518cf27aa5a7e22e1f8f33339ded3779079b upstream.

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

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.11.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c

index 41c923b97293da2e2d9560e76ff4e78147fa4633..48b3c4e4b1cad821480bb2651de5c4e5b59a9586 100644 (file)
@@ -453,6 +453,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;
@@ -487,6 +492,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;
@@ -504,11 +510,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));