RE: [GIT PULL for v3.0] OMAP_VOUT bug fixes and code cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Mauro Carvalho Chehab [mailto:mchehab@xxxxxxxxxx]
> Sent: Saturday, July 02, 2011 12:13 AM
> To: Hiremath, Vaibhav
> Cc: linux-media@xxxxxxxxxxxxxxx; JAIN, AMBER; David Rientjes; Andrew
> Morton
> Subject: Re: [GIT PULL for v3.0] OMAP_VOUT bug fixes and code cleanup
> 
> Em 22-06-2011 16:32, hvaibhav@xxxxxx escreveu:
> > The following changes since commit
> af0d6a0a3a30946f7df69c764791f1b0643f7cd6:
> >   Linus Torvalds (1):
> >         Merge branch 'x86-urgent-for-linus' of
> git://git.kernel.org/.../tip/linux-2.6-tip
> >
> > are available in the git repository at:
> >
> >   git://arago-project.org/git/people/vaibhav/ti-psp-omap-video.git for-
> linux-media
> >
> > Amber Jain (2):
> >       V4L2: omap_vout: Remove GFP_DMA allocation as ZONE_DMA is not
> configured on OMAP
> >       OMAP2: V4L2: Remove GFP_DMA allocation as ZONE_DMA is not
> configured on OMAP
> 
> > From: Amber Jain <amber@xxxxxx>
> > Date: Tue May 31 11:45:36 2011 -0300
> >
> > OMAP2: V4L2: Remove GFP_DMA allocation as ZONE_DMA is not configured on
> OMAP
> >
> > 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@xxxxxx>
> > Acked-by: Sakari Ailus <sakari.ailus@xxxxxx>
> > Signed-off-by: Vaibhav Hiremath <hvaibhav@xxxxxx>
> >
> > 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;
> 
> Hmm... the proper fix wouldn't be to define ZONE_DMA at OMAP?

I don't think so, my understanding for ZOME_DMA is that it is defined for architectures that have restrictions on memory addresses that can be used for DMA. OMAP doesn't have any such restriction and hence we should not define ZONE_DMA.

Please let me know if I have missed some point.

Thanks,
Amber
> 
> Thanks,
> Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux