Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-06-03 Thread Sumit Semwal
On 3 June 2015 at 15:07, Hans Verkuil wrote: > On 06/03/15 10:41, Russell King - ARM Linux wrote: >> On Wed, Jun 03, 2015 at 08:39:55AM +0200, Hans Verkuil wrote: >>> Hi Sumit, >>> >>> On 05/05/2015 04:41 PM, Sumit Semwal wrote: Hi Russell, everyone, First up, sincere apologies for

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-06-03 Thread Hans Verkuil
On 06/03/15 10:41, Russell King - ARM Linux wrote: > On Wed, Jun 03, 2015 at 08:39:55AM +0200, Hans Verkuil wrote: >> Hi Sumit, >> >> On 05/05/2015 04:41 PM, Sumit Semwal wrote: >>> Hi Russell, everyone, >>> >>> First up, sincere apologies for being awol for sometime; had some >>> personal / medica

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-06-03 Thread Russell King - ARM Linux
On Wed, Jun 03, 2015 at 08:39:55AM +0200, Hans Verkuil wrote: > Hi Sumit, > > On 05/05/2015 04:41 PM, Sumit Semwal wrote: > > Hi Russell, everyone, > > > > First up, sincere apologies for being awol for sometime; had some > > personal / medical things to take care of, and then I thought I'd wait

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-06-02 Thread Hans Verkuil
Hi Sumit, On 05/05/2015 04:41 PM, Sumit Semwal wrote: > Hi Russell, everyone, > > First up, sincere apologies for being awol for sometime; had some > personal / medical things to take care of, and then I thought I'd wait > for the merge window to get over before beginning to discuss this > again.

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Russell King - ARM Linux
On Tue, Feb 03, 2015 at 10:42:26PM +0100, Arnd Bergmann wrote: > Right, if you have a private iommu, there is no problem. The tricky part > is using a single driver for the system-level translation and the gpu > private mappings when there is only one type of iommu in the system. You've got a prob

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Daniel Vetter
On Tue, Feb 3, 2015 at 10:42 PM, Arnd Bergmann wrote: >> Again assuming I'm not confused can't we just solve this by pushing the >> dma api abstraction down one layer for just the gpu, and let it use its >> private iommmu directly? Steps for binding a buffer would be: >> 1. dma_map_sg >> 2. Noodle

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Arnd Bergmann
On Tuesday 03 February 2015 12:35:34 Rob Clark wrote: > > I can't think of cases outside of GPU's.. if it were more common I'd > be in favor of teaching dma api about multiple contexts, but right now > I think that would just amount to forcing a lot of churn on everyone > else for the benefit of

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Arnd Bergmann
On Tuesday 03 February 2015 21:04:35 Daniel Vetter wrote: > - On many soc people love to reuse iommus with the same or similar > interface all over the place. The solution thus far adopted on arm > platforms is to write an iommu driver for those and then implement the > dma-api on top of thi

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Daniel Vetter
On Tue, Feb 03, 2015 at 12:35:34PM -0500, Rob Clark wrote: > On Tue, Feb 3, 2015 at 11:58 AM, Russell King - ARM Linux > wrote: > > > > Okay, but switching contexts is not something which the DMA API has > > any knowledge of (so it can't know which context to associate with > > which mapping.) Wh

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Daniel Vetter
On Tue, Feb 03, 2015 at 05:36:59PM +0100, Arnd Bergmann wrote: > On Tuesday 03 February 2015 11:22:01 Rob Clark wrote: > > On Tue, Feb 3, 2015 at 11:12 AM, Arnd Bergmann wrote: > > > I agree for the case you are describing here. From what I understood > > > from Rob was that he is looking at somet

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Rob Clark
On Tue, Feb 3, 2015 at 11:58 AM, Russell King - ARM Linux wrote: > > Okay, but switching contexts is not something which the DMA API has > any knowledge of (so it can't know which context to associate with > which mapping.) While it knows which device, it has no knowledge > (nor is there any way

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Russell King - ARM Linux
On Tue, Feb 03, 2015 at 11:22:01AM -0500, Rob Clark wrote: > On Tue, Feb 3, 2015 at 11:12 AM, Arnd Bergmann wrote: > > I agree for the case you are describing here. From what I understood > > from Rob was that he is looking at something more like: > > > > Fig 3 > > CPU--L1cache--L2cache--Memory--I

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Russell King - ARM Linux
On Tue, Feb 03, 2015 at 05:12:40PM +0100, Arnd Bergmann wrote: > On Tuesday 03 February 2015 15:54:04 Russell King - ARM Linux wrote: > > On Tue, Feb 03, 2015 at 04:31:13PM +0100, Arnd Bergmann wrote: > > > The dma_map_* interfaces assign the virtual addresses internally, > > > using typically eith

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Arnd Bergmann
On Tuesday 03 February 2015 11:22:01 Rob Clark wrote: > On Tue, Feb 3, 2015 at 11:12 AM, Arnd Bergmann wrote: > > I agree for the case you are describing here. From what I understood > > from Rob was that he is looking at something more like: > > > > Fig 3 > > CPU--L1cache--L2cache--Memory--IOMMU-

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Rob Clark
On Tue, Feb 3, 2015 at 11:12 AM, Arnd Bergmann wrote: > I agree for the case you are describing here. From what I understood > from Rob was that he is looking at something more like: > > Fig 3 > CPU--L1cache--L2cache--Memory--IOMMU-device > > where the IOMMU controls one or more contexts per d

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Arnd Bergmann
On Tuesday 03 February 2015 15:54:04 Russell King - ARM Linux wrote: > On Tue, Feb 03, 2015 at 04:31:13PM +0100, Arnd Bergmann wrote: > > The dma_map_* interfaces assign the virtual addresses internally, > > using typically either a global address space for all devices, or one > > address space per

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Russell King - ARM Linux
On Tue, Feb 03, 2015 at 04:31:13PM +0100, Arnd Bergmann wrote: > On Tuesday 03 February 2015 15:22:05 Russell King - ARM Linux wrote: > > Don't we already have those in the DMA API? dma_sync_*() ? > > > > dma_map_sg() - sets up the system MMU and deals with initial cache > > coherency handling. D

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-03 Thread Arnd Bergmann
On Tuesday 03 February 2015 15:22:05 Russell King - ARM Linux wrote: > On Tue, Feb 03, 2015 at 03:52:48PM +0100, Arnd Bergmann wrote: > > On Tuesday 03 February 2015 14:41:09 Russell King - ARM Linux wrote: > > > I'd go as far as saying that the "DMA API on top of IOMMU" is more > > > intended to b