Skip to contentSkip to conversation

drm/amdgpu/gfx8: only apply compute quantums to KCQs

PATCH In review Alex Deucher 4 participants 4 messages Aug 20 – Aug 25

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/gfx8: only apply compute quantums to KCQs

Don't apply to KIQ. Seems to cause problems on KIQ on some ARM platforms.

Fixes 91cf34bc5a55 ("drm/amdgpu/gfx8: align mqd settings with KFD")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +5 -3
index f7c2b149acd0a..4241453e0ec8b 100644
@@ -4546,9 +4546,11 @@ static int gfx_v8_0_mqd_init(struct amdgpu_ring *ring)
 	/* set static priority for a queue/ring */
 	gfx_v8_0_mqd_set_priority(ring, mqd);
 	tmp = RREG32(mmCP_HQD_QUANTUM);
-	tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_EN, 1);
-	tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_SCALE, 1);
-	tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_DURATION, 10);
+	if (ring != &adev->gfx.kiq[0].ring) {
+		tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_EN, 1);
+		tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_SCALE, 1);
+		tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_DURATION, 10);
+	}
 	mqd->cp_hqd_quantum = tmp;
 
 	/* map_queues packet doesn't need activate the queue,
Signature · 1 line
2.55.0
#1 lore raw

Ping?

Quoted 33 lines · Alex Deucher

Don't apply to KIQ. Seems to cause problems on KIQ on some ARM platforms.

Fixes 91cf34bc5a55 ("drm/amdgpu/gfx8: align mqd settings with KFD")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +5 -4
index f7c2b149acd0a..4241453e0ec8b 100644
@@ -4546,9 +4546,11 @@ static int gfx_v8_0_mqd_init(struct amdgpu_ring *ring)
        /* set static priority for a queue/ring */
        gfx_v8_0_mqd_set_priority(ring, mqd);
        tmp = RREG32(mmCP_HQD_QUANTUM);
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_EN, 1);
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_SCALE, 1);
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_DURATION, 10);
+       if (ring != &adev->gfx.kiq[0].ring) {
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_EN, 1);
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_SCALE, 1);
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_DURATION, 10);
+       }
        mqd->cp_hqd_quantum = tmp;
 
        /* map_queues packet doesn't need activate the queue,
--

2.55.0

#2 lore raw

AMD General

Quoted 52 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, August 25, 2026 5:24 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu/gfx8: only apply compute quantums to KCQs

Ping?

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring

Quoted 17 lines · Alex Deucher

Don't apply to KIQ. Seems to cause problems on KIQ on some ARM platforms.

Fixes 91cf34bc5a55 ("drm/amdgpu/gfx8: align mqd settings with KFD")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -0
index f7c2b149acd0a..4241453e0ec8b 100644
@@ -4546,9 +4546,11 @@ static int gfx_v8_0_mqd_init(struct amdgpu_ring

*ring)

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring *ring)

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -2
        /* set static priority for a queue/ring */
        gfx_v8_0_mqd_set_priority(ring, mqd);
        tmp = RREG32(mmCP_HQD_QUANTUM);
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_EN, 1);
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_SCALE,

1);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4551

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -1
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_DURATION, 10);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4550

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -0
+       if (ring != &adev->gfx.kiq[0].ring) {
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_EN, 1);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4551

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_SCALE, 1);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4552

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_DURATION, 10);

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
+       }
        mqd->cp_hqd_quantum = tmp;
 
        /* map_queues packet doesn't need activate the queue,
--

2.55.0

Reviewed-by
#3 lore raw

AMD General

Quoted 66 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Zhang, Jesse(Jie)
Sent: August 25, 2026 2:19 AM
To: Alex Deucher <[email protected]>; Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] drm/amdgpu/gfx8: only apply compute quantums to KCQs

AMD General

Quoted 11 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, August 25, 2026 5:24 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu/gfx8: only apply compute quantums to KCQs

Ping?

On Thu, Aug 20, 2026 at 10:10 AM Alex Deucher

<[email protected]>

Quoted 41 lines

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring

Quoted 17 lines · wrote:

Don't apply to KIQ. Seems to cause problems on KIQ on some ARM platforms.

Fixes 91cf34bc5a55 ("drm/amdgpu/gfx8: align mqd settings with KFD")
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -0
index f7c2b149acd0a..4241453e0ec8b 100644
@@ -4546,9 +4546,11 @@ static int gfx_v8_0_mqd_init(struct amdgpu_ring

*ring)

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring *ring)

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -2
        /* set static priority for a queue/ring */
        gfx_v8_0_mqd_set_priority(ring, mqd);
        tmp = RREG32(mmCP_HQD_QUANTUM);
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_EN, 1);
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM, QUANTUM_SCALE,

1);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4551

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -1
-       tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_DURATION, 10);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4550

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -0
+       if (ring != &adev->gfx.kiq[0].ring) {
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_EN, 1);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4551

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_SCALE, 1);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_mqd_init(struct amdgpu_ring · line 4552

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
+               tmp = REG_SET_FIELD(tmp, CP_HQD_QUANTUM,

QUANTUM_DURATION, 10);

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
+       }
        mqd->cp_hqd_quantum = tmp;
 
        /* map_queues packet doesn't need activate the queue,
--

2.55.0