Skip to contentSkip to conversation

drm/amdgpu/gfx10: look at the right prop for gfx queue priority

PATCH In review Alex Deucher 3 participants 5 messages Feb 19 – Mar 18

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/3 drm/amdgpu/gfx10: look at the right prop for gfx queue priority

Look at hqd_queue_priority rather than hqd_pipe_priority. In practice, it didn't matter as both were always set for kernel queues, but that will change in the future.

Fixes b07d1d73b09e ("drm/amd/amdgpu: Enable high priority gfx queue")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -1
index afa9cb46ffd21..1a2deff420f4d 100644
@@ -6755,7 +6755,7 @@ static void gfx_v10_0_gfx_mqd_set_priority(struct amdgpu_device *adev,
 	/* set up default queue priority level
 	 * 0x0 = low priority, 0x1 = high priority
 	 */
-	if (prop->hqd_pipe_priority == AMDGPU_GFX_PIPE_PRIO_HIGH)
+	if (prop->hqd_queue_priority == AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM)
 		priority = 1;
 
 	tmp = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_QUEUE_PRIORITY);
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu/gfx11: look at the right prop for gfx queue priority

Look at hqd_queue_priority rather than hqd_pipe_priority. In practice, it didn't matter as both were always set for kernel queues, but that will change in the future.

Fixes 2e216b1e6ba2 ("drm/amdgpu/gfx11: handle priority setup for gfx pipe1")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -1
index 98da86ceaa041..8d32671ce4a06 100644
@@ -4101,7 +4101,7 @@ static void gfx_v11_0_gfx_mqd_set_priority(struct amdgpu_device *adev,
 	/* set up default queue priority level
 	 * 0x0 = low priority, 0x1 = high priority
 	 */
-	if (prop->hqd_pipe_priority == AMDGPU_GFX_PIPE_PRIO_HIGH)
+	if (prop->hqd_queue_priority == AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM)
 		priority = 1;
 
 	tmp = regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT;
Signature · 1 line
2.53.0
author maintainer
#2 lore raw

PATCH 3/3 drm/amdgpu: don't set queue priorities for kernel queues

In reply to Alex Deucher

Align with KFD and don't set queue priorities for kernel queues. This can result in starvation of lower priority queues.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -3
index 129ad51386535..805f1f29a3c25 100644
@@ -800,10 +800,8 @@ static void amdgpu_ring_to_mqd_prop(struct amdgpu_ring *ring,
 	prop->hqd_active = ring->funcs->type == AMDGPU_RING_TYPE_KIQ;
 
 	prop->allow_tunneling = is_high_prio_compute;
-	if (is_high_prio_compute || is_high_prio_gfx) {
+	if (is_high_prio_compute || is_high_prio_gfx)
 		prop->hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-		prop->hqd_queue_priority = AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
-	}
 }
 
 int amdgpu_ring_init_mqd(struct amdgpu_ring *ring)
Signature · 1 line
2.53.0
#3 lore raw

RE: [PATCH 3/3] drm/amdgpu: don't set queue priorities for kernel queues

[AMD Official Use Only - AMD Internal Distribution Only]

Series is:
Reviewed-by:Jesse Zhang <[email protected]>

Quoted 37 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, February 20, 2026 7:25 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 3/3] drm/amdgpu: don't set queue priorities for kernel queues

Align with KFD and don't set queue priorities for kernel queues. This can result in starvation of lower priority queues.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -3
index 129ad51386535..805f1f29a3c25 100644
@@ -800,10 +800,8 @@ static void amdgpu_ring_to_mqd_prop(struct
 amdgpu_ring *ring,
      prop->hqd_active = ring->funcs->type == AMDGPU_RING_TYPE_KIQ;
 
      prop->allow_tunneling = is_high_prio_compute;
-     if (is_high_prio_compute || is_high_prio_gfx) {
+     if (is_high_prio_compute || is_high_prio_gfx)
              prop->hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-             prop->hqd_queue_priority =
 AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
-     }
 }

int amdgpu_ring_init_mqd(struct amdgpu_ring *ring)
--
2.53.0

#4 lore raw
In reply to Alex Deucher

Ping on this series.

Alex

Quoted 27 lines · Alex Deucher

Look at hqd_queue_priority rather than hqd_pipe_priority. In practice, it didn't matter as both were always set for kernel queues, but that will change in the future.

Fixes b07d1d73b09e ("drm/amd/amdgpu: Enable high priority gfx queue")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -2
index afa9cb46ffd21..1a2deff420f4d 100644
@@ -6755,7 +6755,7 @@ static void gfx_v10_0_gfx_mqd_set_priority(struct amdgpu_device *adev,
        /* set up default queue priority level
         * 0x0 = low priority, 0x1 = high priority
         */
-       if (prop->hqd_pipe_priority == AMDGPU_GFX_PIPE_PRIO_HIGH)
+       if (prop->hqd_queue_priority == AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM)
                priority = 1;
 
        tmp = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_QUEUE_PRIORITY);
--

2.53.0