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 sakari.ai...@iki.fi wrote: Hi Rob, Clark, Rob wrote: On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus sakari.ai...@iki.fi wrote: So to summarize I understand your constraints - gpu drivers have worked like v4l a few years ago. The thing I'm trying

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 sakari.ai...@iki.fi 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

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 sakari.ai...@iki.fi 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

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 laurent.pinch...@ideasonboard.com 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 sakari.ai...@iki.fi wrote: So to summarize I understand your constraints - gpu drivers have

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 r...@ti.com wrote: On Thu, Feb 2, 2012 at 4:19 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com 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 sakari.ai...@iki.fi wrote: So to

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 laurent.pinch...@ideasonboard.com 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.)  

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 dan...@ffwll.ch wrote: On Thu, Feb 2, 2012 at 11:19, Laurent Pinchart laurent.pinch...@ideasonboard.com 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

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 sakari.ai...@iki.fi 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

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 done by

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's start

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, dma_buf v1

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 currently done

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-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. Not doing so

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 other

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 start

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 laurent.pinch...@ideasonboard.com wrote: Hi Marek, On Monday 23 January 2012 10:06:57 Marek Szyprowski wrote: On Friday, January 20, 2012 5:29 PM Laurent

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 Szyprowski wrote:

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. Would that be

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 I

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_queue_init.

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 vb2_queue. This

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, One way to do

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. This field

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 laurent.pinch...@ideasonboard.com 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

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 Tomasz

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 laurent.pinch...@ideasonboard.com 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

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 pa...@osciak.com 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

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 Osciakpa...@osciak.com 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

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 Osciakpa...@osciak.com wrote: Hi Sumit, Thank you for your work. Please find my comments below. Hi Pawel, Thank you for finding

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 Osciakpa...@osciak.com wrote: Hi Sumit, Thank you for your work. Please find my

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 Osciakpa...@osciak.com wrote:

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

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 me. Do we

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 sumit.sem...@ti.com 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,