hitmoon / rpms / kernel

Forked from rpms/kernel 4 years ago
Clone
f2c60e
From patchwork Thu Oct  5 11:29:17 2017
f2c60e
Content-Type: text/plain; charset="utf-8"
f2c60e
MIME-Version: 1.0
f2c60e
Content-Transfer-Encoding: 7bit
f2c60e
Subject: [v2] drm/gem-cma-helper: Change the level of the allocation failure
f2c60e
 message
f2c60e
From: Boris Brezillon <boris.brezillon@free-electrons.com>
f2c60e
X-Patchwork-Id: 180737
f2c60e
Message-Id: <20171005112917.15949-1-boris.brezillon@free-electrons.com>
f2c60e
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
f2c60e
 dri-devel@lists.freedesktop.org
f2c60e
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
f2c60e
Date: Thu,  5 Oct 2017 13:29:17 +0200
f2c60e
f2c60e
drm_gem_cma_create() prints an error message when dma_alloc_wc() fails to
f2c60e
allocate the amount of memory we requested. This can lead to annoying
f2c60e
error messages when CMA is only one possible source of memory for the BO
f2c60e
allocation. Turn this error message into a debug one.
f2c60e
f2c60e
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
f2c60e
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
f2c60e
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
f2c60e
Reviewed-by: Eric Anholt <eric@anholt.net>
f2c60e
---
f2c60e
Changes in v2:
f2c60e
- Remove __must_check attribute
f2c60e
---
f2c60e
 drivers/gpu/drm/drm_gem_cma_helper.c | 2 +-
f2c60e
 1 file changed, 1 insertion(+), 1 deletion(-)
f2c60e
f2c60e
diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
f2c60e
index 373e33f22be4..020e7668dfab 100644
f2c60e
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
f2c60e
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
f2c60e
@@ -112,7 +112,7 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
f2c60e
 	cma_obj->vaddr = dma_alloc_wc(drm->dev, size, &cma_obj->paddr,
f2c60e
 				      GFP_KERNEL | __GFP_NOWARN);
f2c60e
 	if (!cma_obj->vaddr) {
f2c60e
-		dev_err(drm->dev, "failed to allocate buffer with size %zu\n",
f2c60e
+		dev_dbg(drm->dev, "failed to allocate buffer with size %zu\n",
f2c60e
 			size);
f2c60e
 		ret = -ENOMEM;
f2c60e
 		goto error;