drm/amdgpu: allow non pot VM size values
authorChristian König <christian.koenig@amd.com>
Thu, 23 Nov 2017 10:23:18 +0000 (11:23 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2017 17:48:30 +0000 (12:48 -0500)
The VM size actually doesn't need to be a power of two.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 0750b323e03fcbeb076c5d26c267075e81d35607..748ecd74726d7ba1e44a7ea298b7edc74abef9ef 100644 (file)
@@ -1184,12 +1184,6 @@ static void amdgpu_check_vm_size(struct amdgpu_device *adev)
        if (amdgpu_vm_size == -1)
                return;
 
-       if (!is_power_of_2(amdgpu_vm_size)) {
-               dev_warn(adev->dev, "VM size (%d) must be a power of 2\n",
-                        amdgpu_vm_size);
-               goto def_value;
-       }
-
        if (amdgpu_vm_size < 1) {
                dev_warn(adev->dev, "VM size (%d) too small, min is 1GB\n",
                         amdgpu_vm_size);