From: Alex Deucher Date: Wed, 18 Feb 2026 19:19:47 +0000 (-0500) Subject: drm/amdgpu/gfx11: align mqd settings with KFD X-Git-Tag: v7.2-rc1~141^2~24^2~134 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=58006e64c691314e9536250ae0b911ff88b98075;p=thirdparty%2Flinux.git drm/amdgpu/gfx11: 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: Jesse Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index 8c82e90f871b7..837d98947958b 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -4417,6 +4417,11 @@ static int gfx_v11_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pipe_priority = prop->hqd_pipe_priority; mqd->cp_hqd_queue_priority = prop->hqd_queue_priority; + tmp = REG_SET_FIELD(0, 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; + mqd->cp_hqd_active = prop->hqd_active; /* set UQ fenceaddress */