]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/gfx11: Add fw minimum version check for usermode queue
authorArvind Yadav <Arvind.Yadav@amd.com>
Wed, 9 Apr 2025 10:11:59 +0000 (15:41 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Apr 2025 12:51:46 +0000 (08:51 -0400)
This patch is load usermode queue based on FW support for gfx11.
CP Ucode FW version: [PFP = 2530, ME = 2390, MEC = 2600, MES = 120]

v2: Addressed review comments from Alex.
    - Just check the firmware versions directly.
v3: Firmware version checks only for Navi3x(by Alex).

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Shashank Sharma <shashank.sharma@amd.com>
Cc: Sunil Khatri <sunil.khatri@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

index 496e83cb891778ccb6f529273cf9ca19d65677fe..ac7ac58e25a697871bc51b1bfa71e89adfaf6825 100644 (file)
@@ -1631,8 +1631,11 @@ static int gfx_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
        case IP_VERSION(11, 0, 2):
        case IP_VERSION(11, 0, 3):
 #ifdef CONFIG_DRM_AMDGPU_NAVI3X_USERQ
-               /* add firmware version checks here */
-               if (0 && !adev->gfx.disable_uq) {
+               if (!adev->gfx.disable_uq &&
+                   adev->gfx.me_fw_version  >= 2390 &&
+                   adev->gfx.pfp_fw_version >= 2530 &&
+                   adev->gfx.mec_fw_version >= 2600 &&
+                   adev->mes.fw_version[0] >= 120) {
                        adev->userq_funcs[AMDGPU_HW_IP_GFX] = &userq_mes_funcs;
                        adev->userq_funcs[AMDGPU_HW_IP_COMPUTE] = &userq_mes_funcs;
                }