]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu/mes11: set doorbell offset for suspending userq
authorPrike Liang <Prike.Liang@amd.com>
Thu, 25 Jun 2026 02:31:00 +0000 (10:31 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 15:54:18 +0000 (11:54 -0400)
Updating the union MESAPI__SUSPEND and union MESAPI__RESUME to
add the doorbell offset for suspending userq.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
drivers/gpu/drm/amd/include/mes_v11_api_def.h

index 76e6769cf7ac351b14ac3271b3cdecd2cfed1a1c..2c2df80c1ffc01c3d768b04564244c499dbc64bb 100644 (file)
@@ -785,6 +785,7 @@ static int mes_v11_0_suspend_gang(struct amdgpu_mes *mes,
        mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr;
        mes_suspend_gang_pkt.suspend_fence_addr = input->suspend_fence_addr;
        mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value;
+       mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset;
 
        return mes_v11_0_submit_pkt_and_poll_completion(mes,
                        &mes_suspend_gang_pkt, sizeof(mes_suspend_gang_pkt),
@@ -804,6 +805,7 @@ static int mes_v11_0_resume_gang(struct amdgpu_mes *mes,
 
        mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs;
        mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr;
+       mes_resume_gang_pkt.doorbell_offset = input->doorbell_offset;
 
        return mes_v11_0_submit_pkt_and_poll_completion(mes,
                        &mes_resume_gang_pkt, sizeof(mes_resume_gang_pkt),
index 6644fabeb0b780458a0cd2e7823b04f91fee8d86..b06412ac8583aa9ea24ae276dc252178ee355309 100644 (file)
@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {
                uint32_t                suspend_fence_value;
 
                struct MES_API_STATUS   api_status;
+               uint32_t                doorbell_offset;
        };
 
        uint32_t        max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
@@ -445,6 +446,7 @@ union MESAPI__RESUME {
                uint64_t                gang_context_addr;
 
                struct MES_API_STATUS   api_status;
+               uint32_t                doorbell_offset;
        };
 
        uint32_t        max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];