diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2203-amdgpu-Don-t-use-DRM_ERROR-when-failing-to-allocate-.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2203-amdgpu-Don-t-use-DRM_ERROR-when-failing-to-allocate-.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2203-amdgpu-Don-t-use-DRM_ERROR-when-failing-to-allocate-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2203-amdgpu-Don-t-use-DRM_ERROR-when-failing-to-allocate-.patch new file mode 100644 index 00000000..262c91eb --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2203-amdgpu-Don-t-use-DRM_ERROR-when-failing-to-allocate-.patch @@ -0,0 +1,53 @@ +From e652b3d998a651a648710a07615b3a2061b88d1a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com> +Date: Wed, 15 Nov 2017 11:37:23 +0100 +Subject: [PATCH 2203/4131] amdgpu: Don't use DRM_ERROR when failing to + allocate a BO +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +index 88de375..703578d 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +@@ -98,7 +98,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, + 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; +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +index 9c62925..2f7ffc0 100755 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +@@ -340,8 +340,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; + } + +-- +2.7.4 + |