mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
drm/amdgpu/sdma4.4.2: 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:
parent
a28667f75a
commit
991fd2cb90
|
|
@ -1359,6 +1359,19 @@ static int sdma_v4_4_2_early_init(struct amdgpu_ip_block *ip_block)
|
|||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int r;
|
||||
|
||||
switch (amdgpu_user_queue) {
|
||||
case -1:
|
||||
case 0:
|
||||
default:
|
||||
adev->sdma.no_user_submission = false;
|
||||
adev->sdma.disable_uq = true;
|
||||
break;
|
||||
case 2:
|
||||
adev->sdma.no_user_submission = true;
|
||||
adev->sdma.disable_uq = true;
|
||||
break;
|
||||
}
|
||||
|
||||
r = sdma_v4_4_2_init_microcode(adev);
|
||||
if (r)
|
||||
return r;
|
||||
|
|
@ -1478,6 +1491,7 @@ static int sdma_v4_4_2_sw_init(struct amdgpu_ip_block *ip_block)
|
|||
/* doorbell size is 2 dwords, get DWORD offset */
|
||||
ring->doorbell_index = adev->doorbell_index.sdma_engine[i] << 1;
|
||||
ring->vm_hub = AMDGPU_MMHUB0(aid_id);
|
||||
ring->no_user_submission = adev->sdma.no_user_submission;
|
||||
|
||||
sprintf(ring->name, "sdma%d.%d", aid_id,
|
||||
i % adev->sdma.num_inst_per_aid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user