[PATCH 2/4] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

2013-07-19 Thread Ricardo Ribalda Delgado
Replace the private struct vb2_dma_sg_desc with the struct sg_table so we can benefit from all the helping functions in lib/scatterlist.c for things like allocating the sg or compacting the descriptor Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-19 Thread Ricardo Ribalda Delgado
, Jul 18, 2013 at 3:34 PM, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 7/18/2013 9:39 AM, Ricardo Ribalda Delgado wrote: Hello again: I have started to implemt it, but I think there is more hidden work in this task as it seems. In order to call dma_map_sg

Re: [PATCH 2/4] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

2013-07-19 Thread Ricardo Ribalda Delgado
Hello Sylwester I thought I had to split the API changes. Sorry :S. I will wait for more comments and then I will resubmit. Thanks for you comment! On Fri, Jul 19, 2013 at 10:51 AM, Sylwester Nawrocki s.nawro...@samsung.com wrote: Hi Ricardo, On 07/19/2013 09:58 AM, Ricardo Ribalda Delgado

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

2013-07-19 Thread Ricardo Ribalda Delgado
a.hei...@gmail.com wrote: On Fri, Jul 19, 2013 at 09:58:46AM +0200, 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

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

2013-07-19 Thread Ricardo Ribalda Delgado
) that could not be handled by some DMA engines. This patch tries to minimize the number of DMA segments by using alloc_pages. In the worst case it will behave as before, but most of the times it will reduce the number of dma segments Signed-off-by: Ricardo Ribalda Delgado ricardo.riba

[PATCH 0/2] videobuf2-dma-sg: Contiguos memory allocation

2013-07-19 Thread Ricardo Ribalda Delgado
as possible. v2: Contains feedback from Andre Heider and Sylwester Nawrocki Andre: Fix error handling (--pages) Sylwester: Squash p3 and p4 into p2 Ricardo Ribalda Delgado (2): videobuf2-dma-sg: Allocate pages as contiguous as possible videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

[PATCH 2/2] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

2013-07-19 Thread Ricardo Ribalda Delgado
Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/platform/marvell-ccic/mcam-core.c| 14 +-- drivers/media/v4l2-core/videobuf2-dma-sg.c | 103 drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 20 ++-- include/media/videobuf2-dma-sg.h

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

2013-07-19 Thread Ricardo Ribalda Delgado
, 2013 at 10:16 PM, Jonathan Corbet cor...@lwn.net 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] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-18 Thread Ricardo Ribalda Delgado
, Ricardo Ribalda Delgado wrote: Hello again Marek In my system I am doing the scatter gather compaction on device driver... But I agree that it would be better done on the vb2 layer. For the oversize sglist we could do one of this two things. If we want to have a simple pass processing we

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-17 Thread Ricardo Ribalda Delgado
: Hello, On 7/15/2013 11:34 AM, 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

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-17 Thread Ricardo Ribalda Delgado
]); + i++; } while (usize 0); -- 1.7.10.4 On Wed, Jul 17, 2013 at 11:43 AM, Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Hi Marek alloc_pages_exact returns pages of order 0, every single page is filled into buf-pages, that then is used by vb2_dma_sg_mmap(), that also expects

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-17 Thread Ricardo Ribalda Delgado
do you prefer? Regards! On Wed, Jul 17, 2013 at 3:42 PM, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 7/17/2013 11:43 AM, Ricardo Ribalda Delgado wrote: Hi Marek alloc_pages_exact returns pages of order 0, every single page is filled into buf-pages, that then is used

[PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-15 Thread Ricardo Ribalda Delgado
) that could not be handled by some DMA engines. This patch tries to minimize the number of DMA segments by using alloc_pages_exact. In the worst case it will behave as before, but most of the times it will reduce the number fo dma segments Signed-off-by: Ricardo Ribalda Delgado ricardo.riba

Re: Multiple Rectangle cropping

2012-10-15 Thread Ricardo Ribalda Delgado
Hello Sakari I get the two areas sticked together. Of course both areas of interest have the save width. Kind Regards :) On Mon, Oct 15, 2012 at 10:50 PM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi Ricardo, On Fri, Oct 12, 2012 at 09:18:42AM +0200, Ricardo Ribalda Delgado wrote: In fact

Re: Multiple Rectangle cropping

2012-10-12 Thread Ricardo Ribalda Delgado
12, 2012 at 12:32 AM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi Ricardo, On Thu, Oct 11, 2012 at 12:40:03PM +0200, Ricardo Ribalda Delgado wrote: I want to port an old driver for an fpga based camera to the new media infrastructure. By reading the doc. I think it has almost all

<    1   2   3   4   5