]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: enable mes v12 self test
authorJack Xiao <Jack.Xiao@amd.com>
Mon, 7 Aug 2023 07:54:44 +0000 (15:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 20:18:10 +0000 (16:18 -0400)
1. fix available compute queue to use
2. enable mes v12 self test

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c

index 02ce69e3d1ddce5a4f4b81fb339e82c6bb44ecc6..ea06f8be133e0c761d69994efd06346197f8f6f5 100644 (file)
@@ -156,7 +156,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
 
        for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {
                /* use only 1st MEC pipes */
-               if (i >= 4)
+               if (i >= adev->gfx.mec.num_pipe_per_mec)
                        continue;
                adev->mes.compute_hqd_mask[i] = 0xc;
        }
index a9bf06ad0202b7d871947fc45ca448d0a5286cdc..d20bb78280b15b05bdf959bfb7a7922a26d83010 100644 (file)
@@ -1301,6 +1301,12 @@ static int mes_v12_0_early_init(void *handle)
 
 static int mes_v12_0_late_init(void *handle)
 {
+       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
+       /* it's only intended for use in mes_self_test case, not for s0ix and reset */
+       if (!amdgpu_in_reset(adev) && !adev->in_s0ix && !adev->in_suspend)
+               amdgpu_mes_self_test(adev);
+
        return 0;
 }