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

2014-01-13 Thread Hans Verkuil
Hi Marek, Ricardo, On 01/08/2014 03:07 PM, Marek Szyprowski wrote: Hello All, On 2014-01-03 16:51, Ricardo Ribalda Delgado wrote: Hello Hans What if we move the dma_map_sg and dma_unmap_sg to the vb2 interface, and there do something like: n_sg= dma_map_sg() if (n_sg=-ENOMEM){

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

2014-01-13 Thread Marek Szyprowski
Hello, On 2014-01-13 10:54, Hans Verkuil wrote: Hi Marek, Ricardo, On 01/08/2014 03:07 PM, Marek Szyprowski wrote: Hello All, On 2014-01-03 16:51, Ricardo Ribalda Delgado wrote: Hello Hans What if we move the dma_map_sg and dma_unmap_sg to the vb2 interface, and there do something like:

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

2014-01-13 Thread Hans Verkuil
On 01/13/2014 02:02 PM, Marek Szyprowski wrote: Hello, On 2014-01-13 10:54, Hans Verkuil wrote: Hi Marek, Ricardo, On 01/08/2014 03:07 PM, Marek Szyprowski wrote: Hello All, On 2014-01-03 16:51, Ricardo Ribalda Delgado wrote: Hello Hans What if we move the dma_map_sg and dma_unmap_sg

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

2014-01-08 Thread Marek Szyprowski
Hello All, On 2014-01-03 16:51, Ricardo Ribalda Delgado wrote: Hello Hans What if we move the dma_map_sg and dma_unmap_sg to the vb2 interface, and there do something like: n_sg= dma_map_sg() if (n_sg=-ENOMEM){ split_table() //Breaks down the sg_table into monopages sg n_sg=

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

2014-01-03 Thread Hans Verkuil
Hi Ricardo, I've run into a problem that is caused by this patch: On 08/02/2013 04:20 PM, Ricardo Ribalda Delgado wrote: 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

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

2014-01-03 Thread Ricardo Ribalda Delgado
Hello Hans Thank you very much for your mail. For what I understand sg_alloc_table_from_pages does not allocate any page or bounce buffer, it just take a set of N pages and makes a sg_table from it, on the process it finds out if page A and A+1are on the same pfn and if it is true they will

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

2014-01-03 Thread Hans Verkuil
On 01/03/2014 04:17 PM, Ricardo Ribalda Delgado wrote: Hello Hans Thank you very much for your mail. For what I understand sg_alloc_table_from_pages does not allocate any page or bounce buffer, it just take a set of N pages and makes a sg_table from it, on the process it finds out if page

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

2014-01-03 Thread Ricardo Ribalda Delgado
Hello Hans What if we move the dma_map_sg and dma_unmap_sg to the vb2 interface, and there do something like: n_sg= dma_map_sg() if (n_sg=-ENOMEM){ split_table() //Breaks down the sg_table into monopages sg n_sg= dma_map_sg() } if (n_sg=-ENOMEM) return -ENOMEM Regards On Fri, Jan 3,

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

2013-08-02 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 marvel-ccic and solo6x10 drivers, that uses this api has been updated Acked-by: Marek