drm/amdgpu/mes: optimize compute loop handling
Subsystems (2)
Alex Deucher
maintainerPATCH 1/2 drm/amdgpu/mes: optimize compute loop handling
Break when we get to the end of the supported pipes rather than continuing the loop.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
@@ -111,7 +111,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 ; }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 2/2 drm/amdgpu/mes: enable compute pipes across all MEC
Enable pipes on both MECs for MES.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -2
@@ -109,8 +109,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev) adev->mes.vmid_mask_gfxhub =0xffffff00 ;for (i =0 ; i <AMDGPU_MES_MAX_COMPUTE_PIPES ; i++) { -/* use only 1st MEC pipes */ -if (i >= adev->gfx.mec.num_pipe_per_mec) +if (i >= (adev->gfx.mec.num_pipe_per_mec * adev->gfx.mec.num_mec))break ; adev->mes.compute_hqd_mask[i] =0xc ; }
Signature · 1 line
2.48.1
Re: [PATCH 2/2] drm/amdgpu/mes: enable compute pipes across all MEC
Quoted 3 lines · Alex Deucher
Enable pipes on both MECs for MES.
Fixes 745f46b6a99f ("drm/amdgpu: enable mes v12 self test")
Quoted 22 lines
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1
-3@@ -109,8 +109,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev) adev->mes.vmid_mask_gfxhub =0xffffff00 ;for (i =0 ; i <AMDGPU_MES_MAX_COMPUTE_PIPES ; i++) { -/* use only 1st MEC pipes */ -if (i >= adev->gfx.mec.num_pipe_per_mec) +if (i >= (adev->gfx.mec.num_pipe_per_mec * adev->gfx.mec.num_mec))break ; adev->mes.compute_hqd_mask[i] =0xc ; } --2.48.1
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by Shaoyun.liu <[email protected]>
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, March 19, 2025 12:24 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu/mes: optimize compute loop handling
Break when we get to the end of the supported pipes rather than continuing the loop.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
@@ -111,7 +111,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 ; }
--
2.48.1