Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-08-02 Thread Marek Szyprowski
Hello, On 7/19/2013 7:02 PM, Ricardo Ribalda Delgado wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle. Videobuffers can easily spread through houndreds of pages. In the previous aproach, the pages were allocated individually, this

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-08-02 Thread Andre Heider
Hi Ricardo, sorry for the late answer, but the leak I mentioned in my first reply is still there, see below. On Fri, Jul 19, 2013 at 07:02:33PM +0200, Ricardo Ribalda Delgado wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle.

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-08-02 Thread Ricardo Ribalda Delgado
Hi Andre, Nice catch! thanks. I have just uploaded a new version. https://patchwork.linuxtv.org/patch/19502/ https://patchwork.linuxtv.org/patch/19503/ Thanks for your help On Fri, Aug 2, 2013 at 10:46 AM, Andre Heider a.hei...@gmail.com wrote: Hi Ricardo, sorry for the late answer, but

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-08-02 Thread Andre Heider
Hi Ricardo, I messed up one thing in my initial reply, sorry :( And two additional nitpicks, while we're at it. On Fri, Jul 19, 2013 at 07:02:33PM +0200, Ricardo Ribalda Delgado wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle.

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-08-02 Thread Ricardo Ribalda Delgado
Thanks, I have just send a new version. Regards! On Fri, Aug 2, 2013 at 3:47 PM, Andre Heider a.hei...@gmail.com wrote: Hi Ricardo, I messed up one thing in my initial reply, sorry :( And two additional nitpicks, while we're at it. On Fri, Jul 19, 2013 at 07:02:33PM +0200, Ricardo Ribalda

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-08-01 Thread Ricardo Ribalda Delgado
Hi Sakarius I think the whole point of the videobuf2 is sharing pages with the user space, so until vm_insert_page does not support high order pages we should split them. Unfortunately the mm is completely out of my topic, so I don't think that I could be very useful there. With my patch, in the

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-31 Thread Sakari Ailus
Hi Jon and Sylwester, On Mon, Jul 29, 2013 at 09:16:44AM -0600, Jonathan Corbet wrote: On Mon, 29 Jul 2013 13:27:12 +0200 Marek Szyprowski m.szyprow...@samsung.com wrote: You've gone to all this trouble to get a higher-order allocation so you'd have fewer segments, then you undo it all

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-29 Thread Marek Szyprowski
Hello, On 7/19/2013 10:16 PM, Jonathan Corbet wrote: On Fri, 19 Jul 2013 19:02:33 +0200 Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle. Videobuffers can easily spread through

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-29 Thread Jonathan Corbet
On Mon, 29 Jul 2013 13:27:12 +0200 Marek Szyprowski m.szyprow...@samsung.com wrote: You've gone to all this trouble to get a higher-order allocation so you'd have fewer segments, then you undo it all by splitting things apart into individual pages. Why? Clearly I'm missing something, this

[PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-19 Thread Ricardo Ribalda Delgado
Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle. Videobuffers can easily spread through houndreds of pages. In the previous aproach, the pages were allocated individually, this could led to the creation houndreds of dma segments

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-19 Thread Jonathan Corbet
On Fri, 19 Jul 2013 19:02:33 +0200 Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle. Videobuffers can easily spread through houndreds of pages. In the previous aproach, the pages

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-19 Thread Ricardo Ribalda Delgado
Hello Jonathan: Thanks for your review. I am making a driver for a camera that produces 4Mpx images with up to 10 bytes per pixel!. The camera has a dma engine capable of moving up to 255 sg sectors. In the original implementation of vb2-dma-sg, every page was allocated independently, dividing