drm/amdgpu/vcn5.0.1: add support for disabling kernel queues

Allow the user to disable kernel queues.  This can be used
to free up vmid resources if kernel queues are not needed.

Set amdgpu.user_queue=2 to disable kernel queues.

Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher 2026-05-27 16:11:35 -04:00
parent f8c38071b9
commit a28667f75a

View File

@ -94,6 +94,19 @@ static int vcn_v5_0_1_early_init(struct amdgpu_ip_block *ip_block)
struct amdgpu_device *adev = ip_block->adev;
int i, r;
switch (amdgpu_user_queue) {
case -1:
case 0:
default:
adev->vcn.disable_kq = false;
adev->vcn.disable_uq = true;
break;
case 2:
adev->vcn.disable_kq = true;
adev->vcn.disable_uq = true;
break;
}
for (i = 0; i < adev->vcn.num_vcn_inst; ++i)
/* re-use enc ring as unified ring */
adev->vcn.inst[i].num_enc_rings = 1;
@ -188,6 +201,10 @@ static int vcn_v5_0_1_sw_init(struct amdgpu_ip_block *ip_block)
ring = &adev->vcn.inst[i].ring_enc[0];
ring->use_doorbell = true;
if (adev->vcn.disable_kq) {
ring->no_scheduler = true;
ring->no_user_submission = true;
}
if (!amdgpu_sriov_vf(adev))
ring->doorbell_index =
(adev->doorbell_index.vcn.vcn_ring0_1 << 1) +