Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-02-05 Thread Clark, Rob
On Sat, Feb 4, 2012 at 5:43 AM, Sakari Ailus wrote: > Hi Rob, > > Clark, Rob wrote: >> On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus wrote: >>> So to summarize I understand your constraints - gpu drivers have worked like v4l a few years ago. The thing I'm trying to achieve with this >>>

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-02-04 Thread Sakari Ailus
Hi Rob, Clark, Rob wrote: > On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus wrote: >> >>> So to summarize I understand your constraints - gpu drivers have worked >>> like v4l a few years ago. The thing I'm trying to achieve with this >>> constant yelling is just to raise awereness for these issues

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-02-02 Thread Clark, Rob
On Thu, Feb 2, 2012 at 2:23 PM, Daniel Vetter wrote: > On Thu, Feb 2, 2012 at 11:19, Laurent Pinchart > wrote: >>> On omap4 v4l2+drm example I have running, it is actually the DRM driver >>> doing the "IOMMU" programming.. so v4l2 camera really doesn't need to care >>> about it.  (And the IOMMU

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-02-02 Thread Daniel Vetter
On Thu, Feb 2, 2012 at 11:19, Laurent Pinchart wrote: >> On omap4 v4l2+drm example I have running, it is actually the DRM driver >> doing the "IOMMU" programming.. so v4l2 camera really doesn't need to care >> about it.  (And the IOMMU programming here is pretty fast.)  But I suppose >> this mayb

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-02-02 Thread Sumit Semwal
On 2 February 2012 19:31, Clark, Rob wrote: > On Thu, Feb 2, 2012 at 4:19 AM, Laurent Pinchart > wrote: >> Hi Rob, >> >> On Tuesday 31 January 2012 16:38:35 Clark, Rob wrote: >>> On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus wrote: >>> >> So to summarize I understand your constraints - gpu drive

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-02-02 Thread Clark, Rob
On Thu, Feb 2, 2012 at 4:19 AM, Laurent Pinchart wrote: > Hi Rob, > > On Tuesday 31 January 2012 16:38:35 Clark, Rob wrote: >> On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus wrote: >> >> So to summarize I understand your constraints - gpu drivers have worked >> >> like v4l a few years ago. The thi

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-02-02 Thread Laurent Pinchart
Hi Rob, On Tuesday 31 January 2012 16:38:35 Clark, Rob wrote: > On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus wrote: > >> So to summarize I understand your constraints - gpu drivers have worked > >> like v4l a few years ago. The thing I'm trying to achieve with this > >> constant yelling is just

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-31 Thread Clark, Rob
On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus wrote: > >> So to summarize I understand your constraints - gpu drivers have worked >> like v4l a few years ago. The thing I'm trying to achieve with this >> constant yelling is just to raise awereness for these issues so that >> people aren't suprised

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-30 Thread Sakari Ailus
Hi Daniel, On Sun, Jan 29, 2012 at 02:03:40PM +0100, Daniel Vetter wrote: > On Sun, Jan 29, 2012 at 01:03:39PM +0200, Sakari Ailus wrote: > > Daniel Vetter wrote: > > > On Thu, Jan 26, 2012 at 01:28:16AM +0200, Sakari Ailus wrote: > > >> Why you "should not hang onto mappings forever"? This is cur

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-30 Thread Daniel Vetter
On Mon, Jan 30, 2012 at 03:44:20PM +0100, Laurent Pinchart wrote: > Hi Daniel, > > On Tuesday 24 January 2012 14:03:22 Daniel Vetter wrote: > > On Mon, Jan 23, 2012 at 11:54:20AM +0100, Laurent Pinchart wrote: > > > On Monday 23 January 2012 11:35:01 Daniel Vetter wrote: > > > > See my other mail,

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-30 Thread Laurent Pinchart
Hi Daniel, On Tuesday 24 January 2012 14:03:22 Daniel Vetter wrote: > On Mon, Jan 23, 2012 at 11:54:20AM +0100, Laurent Pinchart wrote: > > On Monday 23 January 2012 11:35:01 Daniel Vetter wrote: > > > See my other mail, dma_buf v1 does not support cpu access. > > > > v1 is in the kernel now, let

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-30 Thread Laurent Pinchart
Hi Daniel, On Sunday 29 January 2012 14:03:40 Daniel Vetter wrote: > On Sun, Jan 29, 2012 at 01:03:39PM +0200, Sakari Ailus wrote: > > Daniel Vetter wrote: > > > On Thu, Jan 26, 2012 at 01:28:16AM +0200, Sakari Ailus wrote: > > >> Why you "should not hang onto mappings forever"? This is currently

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-29 Thread Daniel Vetter
On Sun, Jan 29, 2012 at 01:03:39PM +0200, Sakari Ailus wrote: > Daniel Vetter wrote: > > On Thu, Jan 26, 2012 at 01:28:16AM +0200, Sakari Ailus wrote: > >> Why you "should not hang onto mappings forever"? This is currently done by > >> virtually all V4L2 drivers where such mappings are relevant. No

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-29 Thread Sakari Ailus
Hi Daniel, Daniel Vetter wrote: > On Thu, Jan 26, 2012 at 01:28:16AM +0200, Sakari Ailus wrote: >> Why you "should not hang onto mappings forever"? This is currently done by >> virtually all V4L2 drivers where such mappings are relevant. Not doing so >> would really kill the performance i.e. it's

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-26 Thread Daniel Vetter
On Thu, Jan 26, 2012 at 01:28:16AM +0200, Sakari Ailus wrote: > Why you "should not hang onto mappings forever"? This is currently done by > virtually all V4L2 drivers where such mappings are relevant. Not doing so > would really kill the performance i.e. it's infeasible. Same goes to (m)any > othe

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-25 Thread Sakari Ailus
Hi Daniel and Laurent, On Mon, Jan 23, 2012 at 11:35:01AM +0100, Daniel Vetter wrote: > On Mon, Jan 23, 2012 at 10:48, Laurent Pinchart > wrote: > > Hi Marek, > > > > On Monday 23 January 2012 10:06:57 Marek Szyprowski wrote: > >> On Friday, January 20, 2012 5:29 PM Laurent Pinchart wrote: > >> >

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-25 Thread Daniel Vetter
On Tue, Jan 24, 2012 at 02:03:22PM +0100, Daniel Vetter wrote: > On Mon, Jan 23, 2012 at 11:54:20AM +0100, Laurent Pinchart wrote: > > On Monday 23 January 2012 11:35:01 Daniel Vetter wrote: > > > See my other mail, dma_buf v1 does not support cpu access. > > > > v1 is in the kernel now, let's sta

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-24 Thread Daniel Vetter
On Mon, Jan 23, 2012 at 11:54:20AM +0100, Laurent Pinchart wrote: > On Monday 23 January 2012 11:35:01 Daniel Vetter wrote: > > See my other mail, dma_buf v1 does not support cpu access. > > v1 is in the kernel now, let's start discussing v2 ;-) Ok, I'm in ;-) I've thought a bit about this, and

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-24 Thread Daniel Vetter
On Tue, Jan 24, 2012 at 10:34:38AM +0100, Laurent Pinchart wrote: > > > I'm not sure I would like a callback approach. If we add a sync > > > operation, the exporter could signal to the importer that it must unmap > > > the buffer by returning an appropriate value from the sync operation. > > > Wou

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-24 Thread Laurent Pinchart
Hi Rob, On Tuesday 24 January 2012 01:26:15 Clark, Rob wrote: > On Mon, Jan 23, 2012 at 4:54 AM, Laurent Pinchart wrote: > > On Monday 23 January 2012 11:35:01 Daniel Vetter wrote: > >> On Mon, Jan 23, 2012 at 10:48, Laurent Pinchart wrote: > >> > On Monday 23 January 2012 10:06:57 Marek Szyprowsk

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-23 Thread Clark, Rob
On Mon, Jan 23, 2012 at 4:54 AM, Laurent Pinchart wrote: > Hi Daniel, > > On Monday 23 January 2012 11:35:01 Daniel Vetter wrote: >> On Mon, Jan 23, 2012 at 10:48, Laurent Pinchart wrote: >> > On Monday 23 January 2012 10:06:57 Marek Szyprowski wrote: >> >> On Friday, January 20, 2012 5:29 PM Laur

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-23 Thread Laurent Pinchart
Hi Daniel, On Monday 23 January 2012 11:35:01 Daniel Vetter wrote: > On Mon, Jan 23, 2012 at 10:48, Laurent Pinchart wrote: > > On Monday 23 January 2012 10:06:57 Marek Szyprowski wrote: > >> On Friday, January 20, 2012 5:29 PM Laurent Pinchart wrote: > >> > On Friday 20 January 2012 17:20:22 Toma

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-23 Thread Daniel Vetter
On Mon, Jan 23, 2012 at 10:48, Laurent Pinchart wrote: > Hi Marek, > > On Monday 23 January 2012 10:06:57 Marek Szyprowski wrote: >> On Friday, January 20, 2012 5:29 PM Laurent Pinchart wrote: >> > On Friday 20 January 2012 17:20:22 Tomasz Stanislawski wrote: >> > > >> IMO, One way to do this is a

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-23 Thread Laurent Pinchart
Hi Marek, On Monday 23 January 2012 10:06:57 Marek Szyprowski wrote: > On Friday, January 20, 2012 5:29 PM Laurent Pinchart wrote: > > On Friday 20 January 2012 17:20:22 Tomasz Stanislawski wrote: > > > >> IMO, One way to do this is adding field 'struct device *dev' to > > > >> struct vb2_queue. T

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-23 Thread Daniel Vetter
On Mon, Jan 23, 2012 at 10:40:07AM +0100, Daniel Vetter wrote: > On Mon, Jan 23, 2012 at 10:06:57AM +0100, Marek Szyprowski wrote: > > Hello, > > > > On Friday, January 20, 2012 5:29 PM Laurent Pinchart wrote: > > > > > On Friday 20 January 2012 17:20:22 Tomasz Stanislawski wrote: > > > > >> IMO,

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-23 Thread Daniel Vetter
On Mon, Jan 23, 2012 at 10:06:57AM +0100, Marek Szyprowski wrote: > Hello, > > On Friday, January 20, 2012 5:29 PM Laurent Pinchart wrote: > > > On Friday 20 January 2012 17:20:22 Tomasz Stanislawski wrote: > > > >> IMO, One way to do this is adding field 'struct device *dev' to struct > > > >> v

RE: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-23 Thread Marek Szyprowski
Hello, On Friday, January 20, 2012 5:29 PM Laurent Pinchart wrote: > On Friday 20 January 2012 17:20:22 Tomasz Stanislawski wrote: > > >> IMO, One way to do this is adding field 'struct device *dev' to struct > > >> vb2_queue. This field should be filled by a driver prior to calling > > >> vb2_qu

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Laurent Pinchart
On Friday 20 January 2012 17:20:22 Tomasz Stanislawski wrote: > >> IMO, One way to do this is adding field 'struct device *dev' to struct > >> vb2_queue. This field should be filled by a driver prior to calling > >> vb2_queue_init. > > > > I haven't looked into the details, but that sounds good to

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Tomasz Stanislawski
IMO, One way to do this is adding field 'struct device *dev' to struct vb2_queue. This field should be filled by a driver prior to calling vb2_queue_init. I haven't looked into the details, but that sounds good to me. Do we have use cases where a queue is allocated before knowing which physical

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Laurent Pinchart
Hi Tomasz, On Friday 20 January 2012 16:53:20 Tomasz Stanislawski wrote: > On 01/20/2012 04:12 PM, Laurent Pinchart wrote: > > On Friday 20 January 2012 11:58:39 Tomasz Stanislawski wrote: > >> On 01/20/2012 11:41 AM, Sumit Semwal wrote: > >>> On 20 January 2012 00:37, Pawel Osciak wrote: >

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Tomasz Stanislawski
Hi Laurent, On 01/20/2012 04:12 PM, Laurent Pinchart wrote: Hi Tomasz, On Friday 20 January 2012 11:58:39 Tomasz Stanislawski wrote: On 01/20/2012 11:41 AM, Sumit Semwal wrote: On 20 January 2012 00:37, Pawel Osciak wrote: Hi Sumit, Thank you for your work. Please find my comments below.

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Laurent Pinchart
Hi Tomasz, On Friday 20 January 2012 11:58:39 Tomasz Stanislawski wrote: > On 01/20/2012 11:41 AM, Sumit Semwal wrote: > > On 20 January 2012 00:37, Pawel Osciak wrote: > >> Hi Sumit, > >> Thank you for your work. Please find my comments below. > > > > Hi Pawel, > > > > Thank you for finding ti

Re: [Linaro-mm-sig] [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Laurent Pinchart
Hi Sumit, On Monday 16 January 2012 06:33:31 Semwal, Sumit wrote: > On Sun, Jan 15, 2012 at 2:08 AM, Sakari Ailus wrote: > > Hi Sumit, > > > > Thanks for the patch! > > Hi Sakari, > > Thanks for reviewing this :) > > > > > Shouldn't the buffer mapping only be done at the first call to > > __

Re: [Linaro-mm-sig] [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Laurent Pinchart
Hi Sumit, On Thursday 05 January 2012 11:41:56 Sumit Semwal wrote: > This patch adds support for DMABUF memory type in videobuf2. It calls > relevant APIs of dma_buf for v4l reqbuf / qbuf / dqbuf operations. > > For this version, the support is for videobuf2 as a user of the shared > buffer; so t

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Tomasz Stanislawski
Hi Sumit and Pawel, Please find comments below. On 01/20/2012 11:41 AM, Sumit Semwal wrote: On 20 January 2012 00:37, Pawel Osciak wrote: Hi Sumit, Thank you for your work. Please find my comments below. Hi Pawel, Thank you for finding time for this review, and your comments :) - my comments

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-20 Thread Sumit Semwal
On 20 January 2012 00:37, Pawel Osciak wrote: > Hi Sumit, > Thank you for your work. Please find my comments below. Hi Pawel, Thank you for finding time for this review, and your comments :) - my comments inline. [Also, as an aside, Tomasz has also been working on the vb2 adaptation to dma-buf, a

Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-19 Thread Pawel Osciak
Hi Sumit, Thank you for your work. Please find my comments below. On Thu, Jan 5, 2012 at 2:41 AM, Sumit Semwal wrote: > This patch adds support for DMABUF memory type in videobuf2. It calls relevant > APIs of dma_buf for v4l reqbuf / qbuf / dqbuf operations. > > For this version, the support is f

Re: [Linaro-mm-sig] [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-15 Thread Semwal, Sumit
On Mon, Jan 16, 2012 at 11:03 AM, Semwal, Sumit wrote: > > On Sun, Jan 15, 2012 at 2:08 AM, Sakari Ailus wrote: >> >> Hi Sumit, >> >> Thanks for the patch! > Hi Sakari, Thanks for reviewing this :) >> >> >> >> Shouldn't the buffer mapping only be done at the first call to >> __qbuf_dmabuf()? On

Re: [Linaro-mm-sig] [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-14 Thread Sakari Ailus
Hi Sumit, Thanks for the patch! Sumit Semwal wrote: ... > @@ -962,6 +1030,109 @@ static int __qbuf_mmap(struct vb2_buffer *vb, const > struct v4l2_buffer *b) > } > > /** > + * __qbuf_dmabuf() - handle qbuf of a DMABUF buffer > + */ > +static int __qbuf_dmabuf(struct vb2_buffer *vb, const str

[RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)

2012-01-05 Thread Sumit Semwal
This patch adds support for DMABUF memory type in videobuf2. It calls relevant APIs of dma_buf for v4l reqbuf / qbuf / dqbuf operations. For this version, the support is for videobuf2 as a user of the shared buffer; so the allocation of the buffer is done outside of V4L2. [A sample allocator of dm