Skip to content

Commit 5e93d0e

Browse files
committed
drm/amdgpu/mes: clean up SDMA HQD loop
Follow the same logic as the other IP types. Reviewed-by: Prike Liang <[email protected]> Acked-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a52077b commit 5e93d0e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,9 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
154154
adev->mes.gfx_hqd_mask[i] = i ? 0 : 0xfffffffe;
155155

156156
for (i = 0; i < AMDGPU_MES_MAX_SDMA_PIPES; i++) {
157-
/* zero sdma_hqd_mask for non-existent engine */
158-
if (adev->sdma.num_instances == 1)
159-
adev->mes.sdma_hqd_mask[i] = i ? 0 : 0xfc;
160-
else
161-
adev->mes.sdma_hqd_mask[i] = 0xfc;
157+
if (i >= adev->sdma.num_instances)
158+
break;
159+
adev->mes.sdma_hqd_mask[i] = 0xfc;
162160
}
163161

164162
for (i = 0; i < AMDGPU_MAX_MES_PIPES; i++) {

0 commit comments

Comments
 (0)