浏览代码

amdgpu: Don't use DRM_ERROR when failing to allocate a BO

This can be triggered by userspace, e.g. trying to allocate too large a
BO, so it shouldn't log anything by default.

Callers need to handle failure anyway.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Michel Dänzer 7 年之前
父节点
当前提交
299c776ceb
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
  2. 2 2
      drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

+ 1 - 1
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

@@ -72,7 +72,7 @@ retry:
 				initial_domain |= AMDGPU_GEM_DOMAIN_GTT;
 				goto retry;
 			}
-			DRM_ERROR("Failed to allocate GEM object (%ld, %d, %u, %d)\n",
+			DRM_DEBUG("Failed to allocate GEM object (%ld, %d, %u, %d)\n",
 				  size, initial_domain, alignment, r);
 		}
 		return r;

+ 2 - 2
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

@@ -314,8 +314,8 @@ static bool amdgpu_bo_validate_size(struct amdgpu_device *adev,
 	return true;
 
 fail:
-	DRM_ERROR("BO size %lu > total memory in domain: %llu\n", size,
-					      man->size << PAGE_SHIFT);
+	DRM_DEBUG("BO size %lu > total memory in domain: %llu\n", size,
+		  man->size << PAGE_SHIFT);
 	return false;
 }