Skip to contentSkip to conversation

drm/amdgpu/mes: optimize compute loop handling

PATCH In review Alex Deucher 4 participants 16 messages Mar 19, 2025 – Mar 20, 2025

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/4 drm/amdgpu/mes: optimize compute loop handling

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 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
index 3b83880f9e2cc..10f14bf925778 100644
@@ -132,7 +132,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
author maintainer
#1 lore raw

PATCH 2/4 drm/amdgpu/mes: enable compute pipes across all MEC

Enable pipes on both MECs for MES.

Fixes 745f46b6a99f ("drm/amdgpu: enable mes v12 self test")
---
 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
index 10f14bf925778..ac9b1708e20d8 100644
@@ -130,8 +130,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)
+		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
Reviewed-by on v1 2/4
#2 lore raw

RE: [PATCH 2/4] drm/amdgpu/mes: enable compute pipes across all MEC

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Prike

Quoted 34 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, March 20, 2025 3:09 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 2/4] drm/amdgpu/mes: enable compute pipes across all MEC

Enable pipes on both MECs for MES.

Fixes 745f46b6a99f ("drm/amdgpu: enable mes v12 self test")
---
 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
index 10f14bf925778..ac9b1708e20d8 100644
@@ -130,8 +130,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)
+             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

#3 lore raw

Re: [PATCH 2/4] drm/amdgpu/mes: enable compute pipes across all MEC

In reply to Alex Deucher
Quoted 13 lines · Alex Deucher

Enable pipes on both MECs for MES.

Fixes 745f46b6a99f ("drm/amdgpu: enable mes v12 self test")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 10f14bf925778..ac9b1708e20d8 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 133

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -2
@@ -130,8 +130,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)
+		if (i >= (adev->gfx.mec.num_pipe_per_mec * adev->gfx.mec.num_mec))

Same comment as in patch 1.

Thanks,
Lijo

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
 			break;
 		adev->mes.compute_hqd_mask[i] = 0xc;
 	}
#4 lore raw

Re: [PATCH 2/4] drm/amdgpu/mes: enable compute pipes across all MEC

Quoted 19 lines · Lijo
Quoted 15 lines · Alex Deucher

Enable pipes on both MECs for MES.

Fixes 745f46b6a99f ("drm/amdgpu: enable mes v12 self test")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 10f14bf925778..ac9b1708e20d8 100644
@@ -130,8 +130,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
      }
 
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 133

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -2
      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))

Same comment as in patch 1.

This keeps the array access bounded.

Alex

Quoted 8 lines

Thanks,
Lijo

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
                      break;
              adev->mes.compute_hqd_mask[i] = 0xc;
      }
author maintainer
#5 lore raw

PATCH 3/4 drm/amdgpu/mes: drop MES 10.x leftovers

In reply to Alex Deucher

Leftover from MES bring up. There is no production MES support for MES 10.x. The rest of the MES 10.x code has already been removed so drop this.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -4
index ac9b1708e20d8..fddec5d1f2444 100644
@@ -136,11 +136,8 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
 	}
 
 	for (i = 0; i < AMDGPU_MES_MAX_SDMA_PIPES; i++) {
-		if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) <
-		    IP_VERSION(6, 0, 0))
-			adev->mes.sdma_hqd_mask[i] = i ? 0 : 0x3fc;
 		/* zero sdma_hqd_mask for non-existent engine */
-		else if (adev->sdma.num_instances == 1)
+		if (adev->sdma.num_instances == 1)
 			adev->mes.sdma_hqd_mask[i] = i ? 0 : 0xfc;
 		else
 			adev->mes.sdma_hqd_mask[i] = 0xfc;
Signature · 1 line
2.48.1
Acked-by on v1 3/4
#6 lore raw

RE: [PATCH 3/4] drm/amdgpu/mes: drop MES 10.x leftovers

[Public]

Regards,
Prike

Quoted 36 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, March 20, 2025 3:09 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/4] drm/amdgpu/mes: drop MES 10.x leftovers

Leftover from MES bring up. There is no production MES support for MES 10.x. The rest of the MES 10.x code has already been removed so drop this.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -5
index ac9b1708e20d8..fddec5d1f2444 100644
@@ -136,11 +136,8 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
      }
 
      for (i = 0; i < AMDGPU_MES_MAX_SDMA_PIPES; i++) {
-             if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) <
-                 IP_VERSION(6, 0, 0))
-                     adev->mes.sdma_hqd_mask[i] = i ? 0 : 0x3fc;
              /* zero sdma_hqd_mask for non-existent engine */
-             else if (adev->sdma.num_instances == 1)
+             if (adev->sdma.num_instances == 1)
                      adev->mes.sdma_hqd_mask[i] = i ? 0 : 0xfc;
              else
                      adev->mes.sdma_hqd_mask[i] = 0xfc;
--

2.48.1

author maintainer
#7 lore raw

PATCH 4/4 drm/amdgpu/mes: clean up SDMA HQD loop

In reply to Alex Deucher

Follow the same logic as the other IP types.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +3 -5
index fddec5d1f2444..016af4e9c35fa 100644
@@ -136,11 +136,9 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
 	}
 
 	for (i = 0; i < AMDGPU_MES_MAX_SDMA_PIPES; i++) {
-		/* zero sdma_hqd_mask for non-existent engine */
-		if (adev->sdma.num_instances == 1)
-			adev->mes.sdma_hqd_mask[i] = i ? 0 : 0xfc;
-		else
-			adev->mes.sdma_hqd_mask[i] = 0xfc;
+		if (i >= adev->sdma.num_instances)
+			break;
+		adev->mes.sdma_hqd_mask[i] = 0xfc;
 	}
 
 	for (i = 0; i < AMDGPU_MAX_MES_PIPES; i++) {
Signature · 1 line
2.48.1
Reviewed-by on v1 4/4
#8 lore raw

RE: [PATCH 4/4] drm/amdgpu/mes: clean up SDMA HQD loop

[Public]

Regards,
Prike

Quoted 37 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, March 20, 2025 3:09 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 4/4] drm/amdgpu/mes: clean up SDMA HQD loop

Follow the same logic as the other IP types.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +3 -6
index fddec5d1f2444..016af4e9c35fa 100644
@@ -136,11 +136,9 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
      }
 
      for (i = 0; i < AMDGPU_MES_MAX_SDMA_PIPES; i++) {
-             /* zero sdma_hqd_mask for non-existent engine */
-             if (adev->sdma.num_instances == 1)
-                     adev->mes.sdma_hqd_mask[i] = i ? 0 : 0xfc;
-             else
-                     adev->mes.sdma_hqd_mask[i] = 0xfc;
+             if (i >= adev->sdma.num_instances)
+                     break;
+             adev->mes.sdma_hqd_mask[i] = 0xfc;
      }
 
      for (i = 0; i < AMDGPU_MAX_MES_PIPES; i++) {
--

2.48.1

Reviewed-by on v1 1/4
#9 lore raw
In reply to Alex Deucher

[Public]

Regards,
Prike

Quoted 34 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, March 20, 2025 3:09 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Liu, Shaoyun <[email protected]>
Subject: [PATCH 1/4] drm/amdgpu/mes: optimize compute loop handling

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 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 -2
index 3b83880f9e2cc..10f14bf925778 100644
@@ -132,7 +132,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

#10 lore raw
In reply to Alex Deucher
Quoted 14 lines · Alex Deucher

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 3b83880f9e2cc..10f14bf925778 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 132

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
@@ -132,7 +132,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
 	for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {

Unless I'm not seeing something, why not just keep it i < adev->gfx.mec.num_pipe_per_mec?

Thanks,
Lijo

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
 		/* use only 1st MEC pipes */
 		if (i >= adev->gfx.mec.num_pipe_per_mec)
-			continue;
+			break;
 		adev->mes.compute_hqd_mask[i] = 0xc;
 	}
 
#11 lore raw

[Public]

Quoted 31 lines

From: amd-gfx <[email protected]> On Behalf Of Lazar, Lijo
Sent: Thursday, March 20, 2025 7:14 PM
To: Deucher, Alexander <[email protected]>; amd- [email protected]
Cc: Liu, Shaoyun <[email protected]>
Subject: Re: [PATCH 1/4] drm/amdgpu/mes: optimize compute loop handling

Quoted 15 lines · Alex Deucher

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 3b83880f9e2cc..10f14bf925778 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 132

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
@@ -132,7 +132,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
    for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {

Unless I'm not seeing something, why not just keep it i < adev->gfx.mec.num_pipe_per_mec?

Quoted 3 lines

Thanks,
Lijo

This check way may benefit when the check case is adev->gfx.mec.num_pipe_per_mec < AMDGPU_MES_MAX_COMPUTE_PIPES; in this way it will reduce the later unused loop check.

Thanks,
Prike

Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
            /* use only 1st MEC pipes */
            if (i >= adev->gfx.mec.num_pipe_per_mec)
-                   continue;
+                   break;
            adev->mes.compute_hqd_mask[i] = 0xc;
    }
 
#12 lore raw
In reply to Lazar, Lijo
Quoted 13 lines · Lijo
Quoted 9 lines · Alex Deucher

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 9 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 132

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 3b83880f9e2cc..10f14bf925778 100644
@@ -132,7 +132,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
      for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {

Unless I'm not seeing something, why not just keep it i < adev->gfx.mec.num_pipe_per_mec?

AMDGPU_MES_MAX_COMPUTE_PIPES Is the size of the array and I think it is aligned to the max supported by the firmware, so if we had num_pipe_per_mec larger than that for some reason this would prevent an overflow.

Alex

Quoted 12 lines

Thanks,
Lijo

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
              /* use only 1st MEC pipes */
              if (i >= adev->gfx.mec.num_pipe_per_mec)
-                     continue;
+                     break;
              adev->mes.compute_hqd_mask[i] = 0xc;
      }
 
#13 lore raw
Quoted 24 lines · Alex Deucher
Quoted 13 lines · Lijo
Quoted 9 lines · Alex Deucher

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 9 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 132

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 3b83880f9e2cc..10f14bf925778 100644
@@ -132,7 +132,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
      for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {

Unless I'm not seeing something, why not just keep it i < adev->gfx.mec.num_pipe_per_mec?

Quoted 5 lines

AMDGPU_MES_MAX_COMPUTE_PIPES Is the size of the array and I think it is aligned to the max supported by the firmware, so if we had num_pipe_per_mec larger than that for some reason this would prevent an overflow.

I think it should be kept the other way and array size should be fixed, otherwise it hides a real problem.

Thanks,
Lijo

Quoted 14 lines

Alex

Quoted 12 lines

Thanks,
Lijo

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
              /* use only 1st MEC pipes */
              if (i >= adev->gfx.mec.num_pipe_per_mec)
-                     continue;
+                     break;
              adev->mes.compute_hqd_mask[i] = 0xc;
      }
 
#14 lore raw
Quoted 28 lines · Lijo
Quoted 24 lines · Alex Deucher
Quoted 22 lines · Lijo
Quoted 14 lines · Alex Deucher

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 3b83880f9e2cc..10f14bf925778 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 132

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
@@ -132,7 +132,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
      for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {

Unless I'm not seeing something, why not just keep it i < adev->gfx.mec.num_pipe_per_mec?

Quoted 8 lines
Quoted 5 lines

AMDGPU_MES_MAX_COMPUTE_PIPES Is the size of the array and I think it is aligned to the max supported by the firmware, so if we had num_pipe_per_mec larger than that for some reason this would prevent an overflow.

I think it should be kept the other way and array size should be fixed, otherwise it hides a real problem.

How about a dev_warn when we break out of the loop? If we see that, we can fix the array size or figure out why it's too large.

Alex

Quoted 19 lines

Thanks,
Lijo

Quoted 14 lines

Alex

Quoted 12 lines

Thanks,
Lijo

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
              /* use only 1st MEC pipes */
              if (i >= adev->gfx.mec.num_pipe_per_mec)
-                     continue;
+                     break;
              adev->mes.compute_hqd_mask[i] = 0xc;
      }
 
#15 lore raw
Quoted 35 lines · Alex Deucher
Quoted 34 lines · Lijo
Quoted 29 lines · Alex Deucher
Quoted 13 lines · Lijo
Quoted 9 lines · Alex Deucher

Break when we get to the end of the supported pipes rather than continuing the loop.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 9 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c int amdgpu_mes_init(struct amdgpu_device *adev) · line 132

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +0 -0
index 3b83880f9e2cc..10f14bf925778 100644
@@ -132,7 +132,7 @@ int amdgpu_mes_init(struct amdgpu_device *adev)
      for (i = 0; i < AMDGPU_MES_MAX_COMPUTE_PIPES; i++) {

Unless I'm not seeing something, why not just keep it i < adev->gfx.mec.num_pipe_per_mec?

AMDGPU_MES_MAX_COMPUTE_PIPES Is the size of the array and I think it is aligned to the max supported by the firmware, so if we had num_pipe_per_mec larger than that for some reason this would prevent an overflow.

Quoted 6 lines
Quoted 2 lines

I think it should be kept the other way and array size should be fixed, otherwise it hides a real problem.

How about a dev_warn when we break out of the loop? If we see that, we can fix the array size or figure out why it's too large.

Yes, that will do.

Thanks,
Lijo

Quoted 21 lines

Alex

Quoted 19 lines

Thanks,
Lijo

Quoted 14 lines

Alex

Quoted 12 lines

Thanks,
Lijo

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +1 -1
              /* use only 1st MEC pipes */
              if (i >= adev->gfx.mec.num_pipe_per_mec)
-                     continue;
+                     break;
              adev->mes.compute_hqd_mask[i] = 0xc;
      }