From: Alex Deucher Date: Wed, 19 Mar 2025 13:56:00 +0000 (-0400) Subject: drm/amdgpu/mes: optimize compute loop handling X-Git-Tag: v6.15-rc1~120^2~1^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5608ddf6e94c41a673170b2a7e3aad485fd8b88a;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu/mes: optimize compute loop handling Break when we get to the end of the supported pipes rather than continuing the loop. Reviewed-by: Shaoyun.liu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c index b4eef396d419c..e886d3d441d2e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c @@ -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; }