[PATCH] drm/amdgpu: fix a bogus warning

Alex Deucher alexdeucher at gmail.com
Thu Aug 17 20:44:12 UTC 2017


Don't validate the default value.  Prevents a needless
warning. Also fix a spelling typo in the warning message.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 2554ddf..1a459ac 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1077,8 +1077,9 @@ static void amdgpu_check_arguments(struct amdgpu_device *adev)
 	}
 
 	/* valid range is between 4 and 9 inclusive */
-	if (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4) {
-		dev_warn(adev->dev, "valid rang is between 4 and 9\n");
+	if (amdgpu_vm_fragment_size != -1 &&
+	    (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4)) {
+		dev_warn(adev->dev, "valid range is between 4 and 9\n");
 		amdgpu_vm_fragment_size = -1;
 	}
 
-- 
2.5.5



More information about the amd-gfx mailing list