drm/amdkfd: enable cooperative launch on gfx12
authorJonathan Kim <jonathan.kim@amd.com>
Fri, 21 Feb 2025 14:39:27 +0000 (09:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Feb 2025 16:45:12 +0000 (11:45 -0500)
Even though GWS no longer exists, to maintain runtime usage for
cooperative launch, SW set legacy GWS size.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Acked-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Harish Kasiviswanathan <harish.kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c

index 9d20e169ec4a4fbffa56217f7fe6fe7e4515034e..095e73790dc483e83bc93fc3a0eabc81ba202356 100644 (file)
@@ -590,9 +590,13 @@ static int kfd_gws_init(struct kfd_node *node)
                        && kfd->mec2_fw_version >= 0x6b) ||
                (KFD_GC_VERSION(node) >= IP_VERSION(11, 0, 0)
                        && KFD_GC_VERSION(node) < IP_VERSION(12, 0, 0)
-                       && mes_rev >= 68))))
+                       && mes_rev >= 68) ||
+               (KFD_GC_VERSION(node) >= IP_VERSION(12, 0, 0))))) {
+               if (KFD_GC_VERSION(node) >= IP_VERSION(12, 0, 0))
+                       node->adev->gds.gws_size = 64;
                ret = amdgpu_amdkfd_alloc_gws(node->adev,
                                node->adev->gds.gws_size, &node->gws);
+       }
 
        return ret;
 }