]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Support MES suspend_all_sdma_gangs
authorAmber Lin <Amber.Lin@amd.com>
Mon, 23 Mar 2026 18:19:04 +0000 (14:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 May 2026 22:13:42 +0000 (18:13 -0400)
suspend_all_sdma_gangs is supported in new MES firmware for gfx 12.1

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michael Chen<michael.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c

index 610dc2ca67a2b8e6f9e1c38ca47632256100769c..c9467b26e42ce0e86c4ccf0e2f3c5db8022a32ff 100644 (file)
@@ -312,6 +312,9 @@ int amdgpu_mes_suspend(struct amdgpu_device *adev, u32 xcc_id)
        memset(&input, 0x0, sizeof(struct mes_suspend_gang_input));
        input.suspend_all_gangs = 1;
        input.xcc_id = xcc_id;
+       if ((amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 1, 0)) &&
+               ((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 0x71))
+               input.suspend_all_sdma_gangs = 1;
 
        /*
         * Avoid taking any other locks under MES lock to avoid circular
index 31cad8a5bb9fa291fbf8b39dbc2a5af4eff6b409..93990d4990f2e4eccd1b33694e6972bd5e68b53e 100644 (file)
@@ -298,6 +298,7 @@ struct mes_unmap_legacy_queue_input {
 struct mes_suspend_gang_input {
        uint32_t        xcc_id;
        bool            suspend_all_gangs;
+       bool            suspend_all_sdma_gangs;
        uint64_t        gang_context_addr;
        uint64_t        suspend_fence_addr;
        uint32_t        suspend_fence_value;
index 4217b3fea0f3d81984270f71d604fd77ae5df5e9..b169e577e58384ac6caf7c5355d61a05934a4f8e 100644 (file)
@@ -480,6 +480,7 @@ static int mes_v12_1_suspend_gang(struct amdgpu_mes *mes,
        mes_suspend_gang_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS;
 
        mes_suspend_gang_pkt.suspend_all_gangs = input->suspend_all_gangs;
+       mes_suspend_gang_pkt.suspend_all_sdma_gangs = input->suspend_all_sdma_gangs;
        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;