summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
diff options
context:
space:
mode:
authorYuBiao Wang <YuBiao.Wang@amd.com>2023-05-05 08:35:32 +0200
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 15:34:35 +0200
commitdb5dcd476eb0288cdfa781725582dcf9bd747a6b (patch)
tree52c7417511ba36fc0e76c564819e95206b2d8dca /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
parentdrm/amd/pm: parse pp_handle under appropriate conditions (diff)
downloadlinux-db5dcd476eb0288cdfa781725582dcf9bd747a6b.tar.xz
linux-db5dcd476eb0288cdfa781725582dcf9bd747a6b.zip
drm/amdgpu: set default num_kcq to 2 under sriov
The number of kernel queues has impact on the latency under sriov usecase. So to reduce the latency we set the default num_kcq = 2 under sriov if not set manually. Signed-off-by: YuBiao Wang <YuBiao.Wang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 1311e42ab8e9..d0ad7cb0fa05 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -68,6 +68,9 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
/* enable mcbp for sriov */
amdgpu_mcbp = 1;
+ /* Reduce kcq number to 2 to reduce latency */
+ if (amdgpu_num_kcq == -1)
+ amdgpu_num_kcq = 2;
}
void amdgpu_virt_kiq_reg_write_reg_wait(struct amdgpu_device *adev,