drm/amdgpu/gfx10: look at the right prop for gfx queue priority
Subsystems (2)
Alex Deucher
maintainerPATCH 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.
--- 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
@@ -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
Alex Deucher
maintainerPATCH 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.
--- 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
@@ -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
Alex Deucher
maintainerPATCH 3/3 drm/amdgpu: don't set queue priorities for kernel queues
In reply to Alex DeucherAlign 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
@@ -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
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 queuesAlign with KFD and don't set queue priorities for kernel queues. This can result in starvation of lower priority queues.
Signed-off-by Alex Deucher <[email protected]>--- 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@@ -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
Ping on this series.
Alex
Quoted 27 lines · Alex Deucher
Look at
hqd_queue_priorityrather thanhqd_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")Signed-off-by Alex Deucher <[email protected]>--- 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@@ -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