* [PATCH 1/2] drm: fb: cma: Fix typo in debug message
@ 2012-10-20 10:32 Thierry Reding
2012-10-20 10:32 ` [PATCH 2/2] drm: fb: cma: Fail gracefully on allocation failure Thierry Reding
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2012-10-20 10:32 UTC (permalink / raw)
To: David Airlie
Cc: Thierry Reding, Laurent Pinchart, Lars-Peter Clausen,
Sascha Hauer, dri-devel, linux-kernel
The debug message showing the resolution of a framebuffer to be
allocated is missing a closing parenthesis.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
drivers/gpu/drm/drm_fb_cma_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index 09e11a5..d6c80a3 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -206,7 +206,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper,
size_t size;
int ret;
- DRM_DEBUG_KMS("surface width(%d), height(%d) and bpp(%d\n",
+ DRM_DEBUG_KMS("surface width(%d), height(%d) and bpp(%d)\n",
sizes->surface_width, sizes->surface_height,
sizes->surface_bpp);
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] drm: fb: cma: Fail gracefully on allocation failure
2012-10-20 10:32 [PATCH 1/2] drm: fb: cma: Fix typo in debug message Thierry Reding
@ 2012-10-20 10:32 ` Thierry Reding
2012-10-21 8:54 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2012-10-20 10:32 UTC (permalink / raw)
To: David Airlie
Cc: Thierry Reding, Laurent Pinchart, Lars-Peter Clausen,
Sascha Hauer, dri-devel, linux-kernel
The drm_gem_cma_create() function never returns NULL but rather an error
encoded in the return value using the ERR_PTR() macro. Callers therefore
need to check for errors using the IS_ERR() macro. This change allows
drivers to handle contiguous DMA allocation failures gracefully.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
drivers/gpu/drm/drm_fb_cma_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index d6c80a3..fd9d0af 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -220,7 +220,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper,
size = mode_cmd.pitches[0] * mode_cmd.height;
obj = drm_gem_cma_create(dev, size);
- if (!obj)
+ if (IS_ERR(obj))
return -ENOMEM;
fbi = framebuffer_alloc(0, dev->dev);
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm: fb: cma: Fail gracefully on allocation failure
2012-10-20 10:32 ` [PATCH 2/2] drm: fb: cma: Fail gracefully on allocation failure Thierry Reding
@ 2012-10-21 8:54 ` Sascha Hauer
0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2012-10-21 8:54 UTC (permalink / raw)
To: Thierry Reding
Cc: David Airlie, Laurent Pinchart, Lars-Peter Clausen, dri-devel,
linux-kernel
On Sat, Oct 20, 2012 at 12:32:47PM +0200, Thierry Reding wrote:
> The drm_gem_cma_create() function never returns NULL but rather an error
> encoded in the return value using the ERR_PTR() macro. Callers therefore
> need to check for errors using the IS_ERR() macro. This change allows
> drivers to handle contiguous DMA allocation failures gracefully.
>
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha
> ---
> drivers/gpu/drm/drm_fb_cma_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
> index d6c80a3..fd9d0af 100644
> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
> @@ -220,7 +220,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper,
>
> size = mode_cmd.pitches[0] * mode_cmd.height;
> obj = drm_gem_cma_create(dev, size);
> - if (!obj)
> + if (IS_ERR(obj))
> return -ENOMEM;
>
> fbi = framebuffer_alloc(0, dev->dev);
> --
> 1.7.12.4
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-21 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-20 10:32 [PATCH 1/2] drm: fb: cma: Fix typo in debug message Thierry Reding
2012-10-20 10:32 ` [PATCH 2/2] drm: fb: cma: Fail gracefully on allocation failure Thierry Reding
2012-10-21 8:54 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).