From: Christian König Date: Thu, 23 Nov 2017 10:23:18 +0000 (+0100) Subject: drm/amdgpu: allow non pot VM size values X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=341b759e642a847c3a88401db4263dec9f36d552;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: allow non pot VM size values The VM size actually doesn't need to be a power of two. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 0750b323e03f..748ecd74726d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -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);