]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu/mes: optimize compute loop handling
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Mar 2025 13:56:00 +0000 (09:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Mar 2025 16:16:34 +0000 (12:16 -0400)
Break when we get to the end of the supported pipes
rather than continuing the loop.

Reviewed-by: Shaoyun.liu <Shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

index b4eef396d419cd7f8afad0afe56b01a911d54bf2..e886d3d441d2e0ef6a67b773687839834b1b1ca9 100644 (file)
@@ -147,7 +147,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 >= adev->gfx.mec.num_pipe_per_mec)
-                       continue;
+                       break;
                adev->mes.compute_hqd_mask[i] = 0xc;
        }