diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2020-10-06 09:10:24 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-10-09 15:14:10 -0400 |
commit | 9142c4131a701bbb7de6262eccca1a48ace835c4 (patch) | |
tree | 7e0283d10c008de5a119614ffd3675a64a549d0f /drivers/gpu | |
parent | 305a81bfbd89a45711cdc1c16a602b3b7c4f017f (diff) | |
download | linux-stable-9142c4131a701bbb7de6262eccca1a48ace835c4.tar.gz linux-stable-9142c4131a701bbb7de6262eccca1a48ace835c4.tar.bz2 linux-stable-9142c4131a701bbb7de6262eccca1a48ace835c4.zip |
drm/amdgpu: prevent spurious warning
The default auto setting for kcq should not generate
a warning.
Fixes: a300de40f66b ("drm/amdgpu: introduce a new parameter to configure how many KCQ we want(v5)")
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index d0a42c2b6809..e8b41756c9f9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1370,7 +1370,9 @@ static int amdgpu_device_check_arguments(struct amdgpu_device *adev) amdgpu_gmc_tmz_set(adev); - if (amdgpu_num_kcq > 8 || amdgpu_num_kcq < 0) { + if (amdgpu_num_kcq == -1) { + amdgpu_num_kcq = 8; + } else if (amdgpu_num_kcq > 8 || amdgpu_num_kcq < 0) { amdgpu_num_kcq = 8; dev_warn(adev->dev, "set kernel compute queue number to 8 due to invalid parameter provided by user\n"); } |