mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
drm/amdgpu/vcn4.0.3: 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:
@@ -115,6 +115,19 @@ static int vcn_v4_0_3_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;
|
||||
@@ -217,6 +230,10 @@ static int vcn_v4_0_3_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 =
|
||||
|
||||
Reference in New Issue
Block a user