diff mbox

OMAP2: V4L2: Remove GFP_DMA allocation as ZONE_DMA is not configured on OMAP

Message ID 1306853136-12106-2-git-send-email-amber@ti.com (mailing list archive)
State RFC
Headers show

Commit Message

Scheurer, Amber May 31, 2011, 2:45 p.m. UTC
Remove GFP_DMA from the __get_free_pages() call from omap24xxcam as ZONE_DMA
is not configured on OMAP. Earlier the page allocator used to return a page
from ZONE_NORMAL even when GFP_DMA is passed and CONFIG_ZONE_DMA is disabled.
As a result of commit a197b59ae6e8bee56fcef37ea2482dc08414e2ac, page allocator
returns null in such a scenario with a warning emitted to kernel log.

Signed-off-by: Amber Jain <amber@ti.com>
---
 drivers/media/video/omap24xxcam.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Sakari Ailus June 1, 2011, 10:17 p.m. UTC | #1
Hi Amber,

Thanks for the patch.

On Tue, May 31, 2011 at 08:15:36PM +0530, Amber Jain wrote:
> Remove GFP_DMA from the __get_free_pages() call from omap24xxcam as ZONE_DMA
> is not configured on OMAP. Earlier the page allocator used to return a page
> from ZONE_NORMAL even when GFP_DMA is passed and CONFIG_ZONE_DMA is disabled.
> As a result of commit a197b59ae6e8bee56fcef37ea2482dc08414e2ac, page allocator
> returns null in such a scenario with a warning emitted to kernel log.
> 
> Signed-off-by: Amber Jain <amber@ti.com>
> ---
>  drivers/media/video/omap24xxcam.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Acked-by: Sakari Ailus <sakari.ailus@iki.fi>

> diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
> index f6626e8..d92d4c6 100644
> --- a/drivers/media/video/omap24xxcam.c
> +++ b/drivers/media/video/omap24xxcam.c
> @@ -309,11 +309,11 @@ static int omap24xxcam_vbq_alloc_mmap_buffer(struct videobuf_buffer *vb)
>  			order--;
>  
>  		/* try to allocate as many contiguous pages as possible */
> -		page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
> +		page = alloc_pages(GFP_KERNEL, order);
>  		/* if allocation fails, try to allocate smaller amount */
>  		while (page == NULL) {
>  			order--;
> -			page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
> +			page = alloc_pages(GFP_KERNEL, order);
>  			if (page == NULL && !order) {
>  				err = -ENOMEM;
>  				goto out;
> -- 
> 1.7.1
>
diff mbox

Patch

diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index f6626e8..d92d4c6 100644
--- a/drivers/media/video/omap24xxcam.c
+++ b/drivers/media/video/omap24xxcam.c
@@ -309,11 +309,11 @@  static int omap24xxcam_vbq_alloc_mmap_buffer(struct videobuf_buffer *vb)
 			order--;
 
 		/* try to allocate as many contiguous pages as possible */
-		page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
+		page = alloc_pages(GFP_KERNEL, order);
 		/* if allocation fails, try to allocate smaller amount */
 		while (page == NULL) {
 			order--;
-			page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
+			page = alloc_pages(GFP_KERNEL, order);
 			if (page == NULL && !order) {
 				err = -ENOMEM;
 				goto out;