Re: [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory

2010-05-20 Thread Arnout Vandecappelle
On Thursday 06 May 2010 06:06:21, Mauro Carvalho Chehab wrote: > Hi Arnout, > > Arnout Vandecappelle wrote: > > videobuf_dma_init_user_locked() uses get_user_pages() to get the > > virtual-to-physical address mapping for user-allocated memory. > > However, the user-

Re: [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen

2010-03-30 Thread Arnout Vandecappelle
On Wednesday 24 March 2010 06:43:22, Sakari Ailus wrote: > Hi Arnout, > > Thanks for the patch. > > Arnout Vandecappelle wrote: [snip] > > - dma_sync_sg_for_cpu(q->dev, dma->sglist, dma->nr_pages, > > dma->direction); > > + dma_sync_sg

[PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory

2010-03-17 Thread Arnout Vandecappelle
videobuf_dma_init_user_locked() uses get_user_pages() to get the virtual-to-physical address mapping for user-allocated memory. However, the user-allocated memory may be non-pageable because it is an I/O range or similar. get_user_pages() fails with -EFAULT in that case. If the user-allocated mem

[PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen

2010-03-17 Thread Arnout Vandecappelle
videobuf_pages_to_sg() and videobuf_vmalloc_to_sg() happen to create a scatterlist element for every page. However, this is not true for bus addresses, so other functions shouldn't rely on the length of the scatter list being equal to nr_pages. --- drivers/media/video/videobuf-dma-sg.c |4 ++-

[PATCH v3] Support for zerocopy to DMA buffers

2010-03-17 Thread Arnout Vandecappelle
Hoi, [Please CC me, I'm not subscribed.] I'm implementing zerocopy transfer from a v4l2 camera to the DSP on an OMAP3 (based on earlier work by Stefan Kost [1][2]). Therefore I'm using V4L2_MEMORY_USERPTR to pass in the memory area allocated by TI's DMAI driver. However, this has flags VM

Re: [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen

2010-03-17 Thread Arnout Vandecappelle
On Wednesday 17 March 2010 21:57:18, Sakari Ailus wrote: > Arnout Vandecappelle wrote: > > diff --git a/drivers/media/video/videobuf-dma-sg.c > > b/drivers/media/video/videobuf-dma-sg.c index da1790e..3b6f1b8 100644 > > --- a/drivers/media/video/videobuf-dma-sg.c > >

[PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-pageable user-allocated memory

2010-03-04 Thread Arnout Vandecappelle
videobuf_dma_init_user_locked() uses get_user_pages() to get the virtual-to-physical address mapping for user-allocated memory. However, the user-allocated memory may be non-pageable because it is an I/O range or similar. get_user_pages() fails with -EFAULT in that case. If the user-allocated mem

[PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen

2010-03-04 Thread Arnout Vandecappelle
videobuf_pages_to_sg() and videobuf_vmalloc_to_sg() happen to create a scatterlist element for every page. However, this is not true for bus addresses, so other functions shouldn't rely on the length of the scatter list being equal to nr_pages. --- drivers/media/video/videobuf-dma-sg.c |6 +++

[PATCHv2] Support for zerocopy to DSP on OMAP3

2010-03-04 Thread Arnout Vandecappelle
Here is an updated patch, properly split up and with commit messages. I've tested it on my OMAP3 board an it works. I don't have anything else to test it with. Regards, Arnout [PATCH 1/2] V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen [PATCH 2/2] V4L/DVB: buf-dma-sg.c: support non-

[PATCH RFCv1] Support for zerocopy to DSP on OMAP3

2010-03-03 Thread Arnout Vandecappelle
Here's a first attempt at allowing IO memory for USERPTR buffers. It also fixes another issue: it was assumed that dma->sglen == dma->nr_pages. I'll split that up in a separate patch in the final version. Regards, Arnout On Wednesday 03 March 2010 15:12:44, Arnout Van

Support for zerocopy to DSP on OMAP3

2010-03-03 Thread Arnout Vandecappelle
only get pages from areas that don't have these flags set. If I get positive feedback on this, I'll supply a patch. [1] https://bugzilla.gnome.org/show_bug.cgi?id=583890 [2] http://thread.gmane.org/gmane.linux.drivers.video-input- infrastructure/6209 -- Arnout Vandecappelle