diff mbox

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

Message ID 1306835503-24631-1-git-send-email-amber@ti.com (mailing list archive)
State RFC
Headers show

Commit Message

Scheurer, Amber May 31, 2011, 9:51 a.m. UTC
Remove GFP_DMA from the __get_free_pages() call 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/omap/omap_vout.c |    2 +-
 drivers/media/video/omap24xxcam.c    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Sakari Ailus June 1, 2011, 7:07 a.m. UTC | #1
On Tue, May 31, 2011 at 03:58:46PM +0530, JAIN, AMBER wrote:
> I have tested it on OMAP4430 blaze and OMAP3430 SDP platforms.
> 
> I do not have the hardware to test omap24xxcam change. Can someone please
> help me on this?

I have the hardware, but this driver is not testable right now as it is in
the mainline since the board code for the camera is missing from N8[01]0
(besides cbus driver AFAIR). However the change seems practically mandatory
to me --- I can ack it if you send a patch against omap24xxcam.c, as your
new patch no longer contains the change for omap24xxcam.c.

Thanks.
Scheurer, Amber June 1, 2011, 7:27 a.m. UTC | #2
As per Vaibhav's review comments, I have split the patch into 2 different (independent) patches:
- one for omap_vout
- and another for omap24xxcam.c (name changed to [PATCH] OMAP2: V4L2: Remove GFP_DMA allocation as ZONE_DMA is not configured on OMAP )
If you have difficulty in finding it I can send it again.

Thanks,
Amber
diff mbox

Patch

diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index 4ada9be..8cac624 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -181,7 +181,7 @@  static unsigned long omap_vout_alloc_buffer(u32 buf_size, u32 *phys_addr)
 
 	size = PAGE_ALIGN(buf_size);
 	order = get_order(size);
-	virt_addr = __get_free_pages(GFP_KERNEL | GFP_DMA, order);
+	virt_addr = __get_free_pages(GFP_KERNEL , order);
 	addr = virt_addr;
 
 	if (virt_addr) {
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c
index f6626e8..ade9262 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;