]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: don't check the default value for vm size
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Jun 2017 22:20:09 +0000 (18:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Jun 2017 20:58:00 +0000 (16:58 -0400)
Avoids printing spurious messages like this:
[    3.102059] amdgpu 0000:01:00.0: VM size (-1) must be a power of 2

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 875cde414be7e933ea4d1f558c1825db8af842eb..b2c960b2ea828908e4592ab18ca459856139f4d7 100644 (file)
@@ -1073,6 +1073,10 @@ def_value:
 
 static void amdgpu_check_vm_size(struct amdgpu_device *adev)
 {
+       /* no need to check the default value */
+       if (amdgpu_vm_size == -1)
+               return;
+
        if (!amdgpu_check_pot_argument(amdgpu_vm_size)) {
                dev_warn(adev->dev, "VM size (%d) must be a power of 2\n",
                         amdgpu_vm_size);