AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/16] drm/amdgpu/gfx7: align mqd settings with KFD
@ 2026-03-18 14:08 Alex Deucher
  2026-03-18 14:08 ` [PATCH 02/16] drm/amdgpu/gfx8: " Alex Deucher
                   ` (14 more replies)
  0 siblings, 15 replies; 23+ messages in thread
From: Alex Deucher @ 2026-03-18 14:08 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

Make sure to set the quantum bits in the compute MQD
for better fairness across queues of the same priority.

Reviewed-by:Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 2b691452775bc..65b8497ad5f02 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -2819,6 +2819,7 @@ static void gfx_v7_0_mqd_init(struct amdgpu_device *adev,
 {
 	u64 hqd_gpu_addr;
 	u64 wb_gpu_addr;
+	u32 tmp;
 
 	/* init the mqd struct */
 	memset(mqd, 0, sizeof(struct cik_mqd));
@@ -2923,7 +2924,11 @@ static void gfx_v7_0_mqd_init(struct amdgpu_device *adev,
 	mqd->cp_hqd_atomic1_preop_lo = RREG32(mmCP_HQD_ATOMIC1_PREOP_LO);
 	mqd->cp_hqd_atomic1_preop_hi = RREG32(mmCP_HQD_ATOMIC1_PREOP_HI);
 	mqd->cp_hqd_pq_rptr = RREG32(mmCP_HQD_PQ_RPTR);
-	mqd->cp_hqd_quantum = RREG32(mmCP_HQD_QUANTUM);
+	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);
+	mqd->cp_hqd_quantum = tmp;
 	mqd->cp_hqd_pipe_priority = RREG32(mmCP_HQD_PIPE_PRIORITY);
 	mqd->cp_hqd_queue_priority = RREG32(mmCP_HQD_QUEUE_PRIORITY);
 	mqd->cp_hqd_iq_rptr = RREG32(mmCP_HQD_IQ_RPTR);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2026-04-17 21:59 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 14:08 [PATCH 01/16] drm/amdgpu/gfx7: align mqd settings with KFD Alex Deucher
2026-03-18 14:08 ` [PATCH 02/16] drm/amdgpu/gfx8: " Alex Deucher
2026-03-18 14:08 ` [PATCH 03/16] drm/amdgpu/gfx9: " Alex Deucher
2026-03-18 14:08 ` [PATCH 04/16] drm/amdgpu/gfx9.4.3: " Alex Deucher
2026-04-03 14:03   ` Alex Deucher
2026-04-17 17:54     ` Alex Deucher
2026-04-17 18:51       ` Russell, Kent
2026-03-18 14:08 ` [PATCH 05/16] drm/amdgpu/gfx10: " Alex Deucher
2026-03-18 14:08 ` [PATCH 06/16] drm/amdgpu/gfx11: " Alex Deucher
2026-03-18 14:08 ` [PATCH 07/16] drm/amdgpu/gfx12: " Alex Deucher
2026-03-18 14:08 ` [PATCH 08/16] drm/amdgpu/gfx12.1: " Alex Deucher
2026-04-03 14:03   ` Alex Deucher
2026-04-17 17:54     ` Alex Deucher
2026-04-17 18:51       ` Russell, Kent
2026-04-17 21:59       ` Joshi, Mukul
2026-03-18 14:08 ` [PATCH 09/16] drm/amdgpu/gfx8: rework kernel queue priority handling Alex Deucher
2026-03-18 14:08 ` [PATCH 10/16] drm/amdgpu/gfx9: " Alex Deucher
2026-03-18 14:08 ` [PATCH 11/16] drm/amdgpu/gfx9.4.3: " Alex Deucher
2026-03-18 14:08 ` [PATCH 12/16] drm/amdgpu/gfx10: " Alex Deucher
2026-03-18 14:08 ` [PATCH 13/16] drm/amdgpu/gfx11: " Alex Deucher
2026-03-18 14:08 ` [PATCH 14/16] drm/amdgpu/gfx12: " Alex Deucher
2026-03-18 14:08 ` [PATCH 15/16] drm/amdgpu/gfx12.1: " Alex Deucher
2026-03-18 14:08 ` [PATCH 16/16] drm/amdgpu: don't set queue priorities for kernel queues Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox