]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/gfx10: align mqd settings with KFD
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Feb 2026 19:30:43 +0000 (14:30 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Apr 2026 20:51:41 +0000 (16:51 -0400)
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_v10_0.c

index 8b60299b73ef7b08d6c96f7c3ce466169ee7c78b..58c69dcb527f7182afe24a0aa7e17a245955d4c8 100644 (file)
@@ -7011,6 +7011,11 @@ static int gfx_v10_0_compute_mqd_init(struct amdgpu_device *adev, void *m,
        tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE, 3);
        mqd->cp_hqd_ib_control = tmp;
 
+       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;
+
        /* set static priority for a compute queue/ring */
        mqd->cp_hqd_pipe_priority = prop->hqd_pipe_priority;
        mqd->cp_hqd_queue_priority = prop->hqd_queue_priority;