From: Alex Deucher Date: Mon, 16 Mar 2026 21:45:21 +0000 (-0400) Subject: drm/amdgpu/gfx9.4.3: align mqd settings with KFD X-Git-Tag: v7.2-rc1~141^2~24^2~132 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=309e1eacaa03b66509984664256abc07c1a47377;p=thirdparty%2Flinux.git drm/amdgpu/gfx9.4.3: align mqd settings with KFD Make sure to set the quantum bits in the compute MQD for better fairness across queues of the same priority. Reviewed-by: Kent Russell Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index ad4d442e7345e..d0b8fb9317201 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c @@ -1943,7 +1943,11 @@ static int gfx_v9_4_3_xcc_mqd_init(struct amdgpu_ring *ring, int xcc_id) /* set static priority for a queue/ring */ gfx_v9_4_3_mqd_set_priority(ring, mqd); - mqd->cp_hqd_quantum = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_HQD_QUANTUM); + tmp = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_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, 1); + mqd->cp_hqd_quantum = tmp; /* map_queues packet doesn't need activate the queue, * so only kiq need set this field.