Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-19 Thread Vinod Koul
On Tue, Aug 19, 2014 at 03:44:23PM +0100, Russell King - ARM Linux wrote: > On Tue, Aug 19, 2014 at 07:15:07PM +0530, Vinod Koul wrote: > > On Thu, Aug 14, 2014 at 09:57:53AM +0100, Russell King - ARM Linux wrote: > > > It's got something to do with the async engine API, and seems to be > > > somet

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-19 Thread Russell King - ARM Linux
On Tue, Aug 19, 2014 at 07:15:07PM +0530, Vinod Koul wrote: > On Thu, Aug 14, 2014 at 09:57:53AM +0100, Russell King - ARM Linux wrote: > > It's got something to do with the async engine API, and seems to be > > something to do with whether a descriptor can have other transactions > > added to it,

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-19 Thread Vinod Koul
On Thu, Aug 14, 2014 at 09:57:53AM +0100, Russell King - ARM Linux wrote: > On Thu, Aug 14, 2014 at 10:53:01AM +0200, Ludovic Desroches wrote: > > On Wed, Jul 30, 2014 at 06:03:13PM +0200, Maxime Ripard wrote: > > > The dmaengine is neither trivial nor properly documented at the moment, > > > whic

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-14 Thread Russell King - ARM Linux
On Thu, Aug 14, 2014 at 10:53:01AM +0200, Ludovic Desroches wrote: > On Wed, Jul 30, 2014 at 06:03:13PM +0200, Maxime Ripard wrote: > > The dmaengine is neither trivial nor properly documented at the moment, > > which > > means a lot of trial and error development, which is not that good for such

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-14 Thread Ludovic Desroches
On Wed, Jul 30, 2014 at 06:03:13PM +0200, Maxime Ripard wrote: > The dmaengine is neither trivial nor properly documented at the moment, which > means a lot of trial and error development, which is not that good for such a > central piece of the system. > > Attempt at making such a documentation.

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-05 Thread Vinod Koul
On Sat, Aug 02, 2014 at 04:49:25PM +0200, Maxime Ripard wrote: > > - residue callculation, though situation is much better now but still lots > > of driver do it worng and folks do get it wrong > > What mistake in often made regarding the residue calculation? - residue is for the descriptor aske

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-05 Thread Geert Uytterhoeven
Hi Maxime, On Wed, Jul 30, 2014 at 6:03 PM, Maxime Ripard wrote: > The dmaengine is neither trivial nor properly documented at the moment, which > means a lot of trial and error development, which is not that good for such a > central piece of the system. > > Attempt at making such a documentatio

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-04 Thread Lars-Peter Clausen
On 08/02/2014 05:13 PM, Maxime Ripard wrote: On Fri, Aug 01, 2014 at 08:09:17PM +0200, Lars-Peter Clausen wrote: On 08/01/2014 07:15 PM, Vinod Koul wrote: On Fri, Aug 01, 2014 at 10:57:07AM +0200, Maxime Ripard wrote: On Fri, Aug 01, 2014 at 10:00:10AM +0200, Lars-Peter Clausen wrote: On 07/3

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-02 Thread Maxime Ripard
On Sat, Aug 02, 2014 at 04:17:14PM +0100, Russell King - ARM Linux wrote: > On Sat, Aug 02, 2014 at 04:49:25PM +0200, Maxime Ripard wrote: > > In the case of the call to device_control, especially in the > > DMA_SLAVE_CONFIG case, but that also applies to pause/resume, are the > > changes supposed

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-02 Thread Maxime Ripard
On Sat, Aug 02, 2014 at 04:29:21PM +0100, Russell King - ARM Linux wrote: > On Sat, Aug 02, 2014 at 05:11:44PM +0200, Maxime Ripard wrote: > > On Fri, Aug 01, 2014 at 03:53:26PM +0100, Russell King - ARM Linux wrote: > > > > > > - That might just be my experience, but judging from previous > > >

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-02 Thread Russell King - ARM Linux
On Sat, Aug 02, 2014 at 05:11:44PM +0200, Maxime Ripard wrote: > On Fri, Aug 01, 2014 at 03:53:26PM +0100, Russell King - ARM Linux wrote: > > > > > - That might just be my experience, but judging from previous > > > > > commits, DMA_PRIVATE is completely obscure, and we just set it > > > > >

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-02 Thread Russell King - ARM Linux
On Sat, Aug 02, 2014 at 04:49:25PM +0200, Maxime Ripard wrote: > In the case of the call to device_control, especially in the > DMA_SLAVE_CONFIG case, but that also applies to pause/resume, are the > changes supposed to be immediates or can they happen later? pause/resume are expected to operate s

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-02 Thread Maxime Ripard
On Fri, Aug 01, 2014 at 08:09:17PM +0200, Lars-Peter Clausen wrote: > On 08/01/2014 07:15 PM, Vinod Koul wrote: > >On Fri, Aug 01, 2014 at 10:57:07AM +0200, Maxime Ripard wrote: > >>On Fri, Aug 01, 2014 at 10:00:10AM +0200, Lars-Peter Clausen wrote: > >>>On 07/31/2014 07:37 PM, Maxime Ripard wrote:

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-02 Thread Maxime Ripard
On Fri, Aug 01, 2014 at 03:53:26PM +0100, Russell King - ARM Linux wrote: > > > > - That might just be my experience, but judging from previous > > > > commits, DMA_PRIVATE is completely obscure, and we just set it > > > > because it was making it work, without knowing what it was > > > >

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-02 Thread Maxime Ripard
On Fri, Aug 01, 2014 at 10:43:06PM +0530, Vinod Koul wrote: > On Thu, Jul 31, 2014 at 06:23:30PM +0200, Maxime Ripard wrote: > > On Thu, Jul 31, 2014 at 05:26:28PM +0530, Vinod Koul wrote: > > > > Also, feel free to add anything that you feel like you keep saying > > during the review. If mistakes

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-01 Thread Lars-Peter Clausen
On 08/01/2014 07:15 PM, Vinod Koul wrote: On Fri, Aug 01, 2014 at 10:57:07AM +0200, Maxime Ripard wrote: On Fri, Aug 01, 2014 at 10:00:10AM +0200, Lars-Peter Clausen wrote: On 07/31/2014 07:37 PM, Maxime Ripard wrote: On Thu, Jul 31, 2014 at 06:54:11PM +0200, Lars-Peter Clausen wrote: On 07/3

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-01 Thread Vinod Koul
On Thu, Jul 31, 2014 at 02:22:23PM +0100, Russell King - ARM Linux wrote: > DMA engine has lacked a lot of infrastructure for common patterns in > drivers; some of that is solved by my efforts with the virt_dma.c > support, and also various cleanups to existing drivers, but it's not > easy to fix t

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-01 Thread Vinod Koul
On Fri, Aug 01, 2014 at 10:57:07AM +0200, Maxime Ripard wrote: > On Fri, Aug 01, 2014 at 10:00:10AM +0200, Lars-Peter Clausen wrote: > > On 07/31/2014 07:37 PM, Maxime Ripard wrote: > > >On Thu, Jul 31, 2014 at 06:54:11PM +0200, Lars-Peter Clausen wrote: > > >>On 07/31/2014 06:13 PM, Maxime Ripard

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-01 Thread Vinod Koul
On Thu, Jul 31, 2014 at 06:23:30PM +0200, Maxime Ripard wrote: > On Thu, Jul 31, 2014 at 05:26:28PM +0530, Vinod Koul wrote: > > Also, feel free to add anything that you feel like you keep saying > during the review. If mistakes keep coming, it's probably worth > documenting what you expect. I thi

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-01 Thread Russell King - ARM Linux
On Thu, Jul 31, 2014 at 06:41:52PM +0200, Maxime Ripard wrote: > You prove my point then. Vinod asks for GFP_NOWAIT in his > reviews. Even though it doesn't change anything relative to the > atomicity of the operations, the policy is still not the same. The difference between GFP_NOWAIT and GFP_AT

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-01 Thread Maxime Ripard
On Fri, Aug 01, 2014 at 10:00:10AM +0200, Lars-Peter Clausen wrote: > On 07/31/2014 07:37 PM, Maxime Ripard wrote: > >On Thu, Jul 31, 2014 at 06:54:11PM +0200, Lars-Peter Clausen wrote: > >>On 07/31/2014 06:13 PM, Maxime Ripard wrote: > >>[...] > >>> From what you're saying, and judging from the dr

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-08-01 Thread Lars-Peter Clausen
On 07/31/2014 07:37 PM, Maxime Ripard wrote: On Thu, Jul 31, 2014 at 06:54:11PM +0200, Lars-Peter Clausen wrote: On 07/31/2014 06:13 PM, Maxime Ripard wrote: [...] From what you're saying, and judging from the drivers that already implement it, can't it be moved directly to the framework itsel

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Maxime Ripard
On Thu, Jul 31, 2014 at 06:54:11PM +0200, Lars-Peter Clausen wrote: > On 07/31/2014 06:13 PM, Maxime Ripard wrote: > [...] > > From what you're saying, and judging from the drivers that already > >implement it, can't it be moved directly to the framework itself ? > > > > What exactly do you mean b

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Lars-Peter Clausen
On 07/31/2014 06:13 PM, Maxime Ripard wrote: [...] From what you're saying, and judging from the drivers that already implement it, can't it be moved directly to the framework itself ? What exactly do you mean by moving it directly to the framework? The slave_caps API is part of the DMAengin

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Maxime Ripard
On Thu, Jul 31, 2014 at 02:22:23PM +0100, Russell King - ARM Linux wrote: > On Thu, Jul 31, 2014 at 09:44:40AM +0200, Maxime Ripard wrote: > > I didn't miss it. But I feel like it describes quite nicely the slave > > API, but doesn't help at all whenever you're writing a DMAengine driver. > > Ther

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Maxime Ripard
Hi Lars-Peter, On Thu, Jul 31, 2014 at 02:44:56PM +0200, Lars-Peter Clausen wrote: > On 07/31/2014 09:44 AM, Maxime Ripard wrote: > [...] > > - Having to set device_slave_caps or not? > > Yes. This should in my opinion be mandatory for new drivers. Ok. > One of the issues with the DMAengine

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Maxime Ripard
On Thu, Jul 31, 2014 at 05:26:28PM +0530, Vinod Koul wrote: > On Thu, Jul 31, 2014 at 09:44:40AM +0200, Maxime Ripard wrote: > > Hi Vinod, > > > > On Wed, Jul 30, 2014 at 09:36:07PM +0530, Vinod Koul wrote: > > > On Wed, Jul 30, 2014 at 06:03:13PM +0200, Maxime Ripard wrote: > > > > The dmaengine

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Russell King - ARM Linux
On Thu, Jul 31, 2014 at 09:44:40AM +0200, Maxime Ripard wrote: > I didn't miss it. But I feel like it describes quite nicely the slave > API, but doesn't help at all whenever you're writing a DMAengine driver. There's actually two documents: Documentation/crypto/async-tx-api.txt Documentation/dma

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Lars-Peter Clausen
On 07/31/2014 09:44 AM, Maxime Ripard wrote: [...] - Having to set device_slave_caps or not? Yes. This should in my opinion be mandatory for new drivers. One of the issues with the DMAengine API is that it is really hard to write generic drivers that do not already know about the capabilit

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Vinod Koul
On Thu, Jul 31, 2014 at 09:44:40AM +0200, Maxime Ripard wrote: > Hi Vinod, > > On Wed, Jul 30, 2014 at 09:36:07PM +0530, Vinod Koul wrote: > > On Wed, Jul 30, 2014 at 06:03:13PM +0200, Maxime Ripard wrote: > > > The dmaengine is neither trivial nor properly documented at the moment, > > > which >

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-31 Thread Maxime Ripard
Hi Vinod, On Wed, Jul 30, 2014 at 09:36:07PM +0530, Vinod Koul wrote: > On Wed, Jul 30, 2014 at 06:03:13PM +0200, Maxime Ripard wrote: > > The dmaengine is neither trivial nor properly documented at the moment, > > which > > means a lot of trial and error development, which is not that good for s

Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API

2014-07-30 Thread Vinod Koul
On Wed, Jul 30, 2014 at 06:03:13PM +0200, Maxime Ripard wrote: > The dmaengine is neither trivial nor properly documented at the moment, which > means a lot of trial and error development, which is not that good for such a > central piece of the system. > > Attempt at making such a documentation.