From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API
Date: Sat, 2 Aug 2014 16:49:25 +0200 [thread overview]
Message-ID: <20140802144925.GJ3952@lukather> (raw)
In-Reply-To: <20140801171306.GF8181@intel.com>
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 keep coming, it's probably worth
> > documenting what you expect.
> I think the common issues seen would be:
> - prpeare calls in atomic context and usuage of GFP_NOWAIT for memory
> allocations
I think we have that part covered already.
> - 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?
> > > > Because, for the moment, we're pretty much left in the dark with
> > > > different drivers doing the same thing in completetely different ways,
> > > > with basically no way to tell if it's either the framework that
> > > > requires such behaviour, or if the author was just feeling creative.
> > > >
> > > > There's numerous examples for this at the moment:
> > > > - The GFP flags, with different drivers using either GFP_ATOMIC,
> > > > GFP_NOWAIT or GFP_KERNEL in the same functions
> > > > - Having to set device_slave_caps or not?
> > > > - Some drivers use dma_run_depedencies, some other don't
> > > > - 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
> > > > supposed to do.
> > > > - etc.
> > >
> > > Thanks for highlighting we should definitely add these in Documentation
> >
> > It's quite clear in the case of the GFP flags now, Lars-Peter and you
> > cleared up device_slave_caps, but I still could use some help with
> > DMA_PRIVATE.
> >
> > > > And basically, we have no way to tell at the moment which one is
> > > > right and which one needs fixing.
> > > >
> > > > The corollary being that it cripples the whole community ability to
> > > > maintain the framework and make it evolve.
> > > >
> > > > > > + * device_slave_caps
> > > > > > + - Isn't that redundant with the cap_mask already?
> > > > > > + - Only a few drivers seem to implement it
> > > > > For audio to know what your channel can do rather than hardcoding it
> > > >
> > > > Ah, yes, I see it now. It's not related to the caps mask at all.
> > > >
> > > > Just out of curiosity, wouldn't it be better to move this to the
> > > > framework, and have these informations provided through the struct
> > > > dma_device? Or would it have some non-trivial side-effects?
> > > Well the problem is ability to have this queried uniformly from all drivers
> > > across subsystems. If we can do this that would be nice.
> >
> > I can work on some premelinary work to do just that, and see if it
> > works for you then.
> Sure sounds excellent to me
Another extra questions arose during starting this.
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?
I actually have in mind the case where we would use a vchan, that
might or might not be actually mapped to a physical channel at the
moment where the DMA_SLAVE_CONFIG call is made. In the case where it's
not mapped and not transfering anything, it's pretty trivial, to
handle, but in the case where it's actually mapped to a physical
channel, should we push the new configuration to the physical channel
right away, or can it wait until the transfer ends ?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140802/9af6e753/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: "Dan Williams" <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org,
"Russell King" <linux@arm.linux.org.uk>,
"Arnd Bergmann" <arnd@arndb.de>,
"Antoine Ténart" <antoine@free-electrons.com>,
"Thomas Petazzoni" <thomas@free-electrons.com>,
"Alexandre Belloni" <alexandre.belloni@free-electrons.com>,
"Boris Brezillon" <boris@free-electrons.com>,
"Matt Porter" <matt.porter@linaro.org>,
laurent.pinchart@ideasonboard.com, ludovic.desroches@atmel.com,
"Gregory Clement" <gregory.clement@free-electrons.com>,
"Nicolas Ferre" <nicolas.ferre@atmel.com>
Subject: Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API
Date: Sat, 2 Aug 2014 16:49:25 +0200 [thread overview]
Message-ID: <20140802144925.GJ3952@lukather> (raw)
In-Reply-To: <20140801171306.GF8181@intel.com>
[-- Attachment #1: Type: text/plain, Size: 3860 bytes --]
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 keep coming, it's probably worth
> > documenting what you expect.
> I think the common issues seen would be:
> - prpeare calls in atomic context and usuage of GFP_NOWAIT for memory
> allocations
I think we have that part covered already.
> - 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?
> > > > Because, for the moment, we're pretty much left in the dark with
> > > > different drivers doing the same thing in completetely different ways,
> > > > with basically no way to tell if it's either the framework that
> > > > requires such behaviour, or if the author was just feeling creative.
> > > >
> > > > There's numerous examples for this at the moment:
> > > > - The GFP flags, with different drivers using either GFP_ATOMIC,
> > > > GFP_NOWAIT or GFP_KERNEL in the same functions
> > > > - Having to set device_slave_caps or not?
> > > > - Some drivers use dma_run_depedencies, some other don't
> > > > - 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
> > > > supposed to do.
> > > > - etc.
> > >
> > > Thanks for highlighting we should definitely add these in Documentation
> >
> > It's quite clear in the case of the GFP flags now, Lars-Peter and you
> > cleared up device_slave_caps, but I still could use some help with
> > DMA_PRIVATE.
> >
> > > > And basically, we have no way to tell at the moment which one is
> > > > right and which one needs fixing.
> > > >
> > > > The corollary being that it cripples the whole community ability to
> > > > maintain the framework and make it evolve.
> > > >
> > > > > > + * device_slave_caps
> > > > > > + - Isn't that redundant with the cap_mask already?
> > > > > > + - Only a few drivers seem to implement it
> > > > > For audio to know what your channel can do rather than hardcoding it
> > > >
> > > > Ah, yes, I see it now. It's not related to the caps mask at all.
> > > >
> > > > Just out of curiosity, wouldn't it be better to move this to the
> > > > framework, and have these informations provided through the struct
> > > > dma_device? Or would it have some non-trivial side-effects?
> > > Well the problem is ability to have this queried uniformly from all drivers
> > > across subsystems. If we can do this that would be nice.
> >
> > I can work on some premelinary work to do just that, and see if it
> > works for you then.
> Sure sounds excellent to me
Another extra questions arose during starting this.
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?
I actually have in mind the case where we would use a vchan, that
might or might not be actually mapped to a physical channel at the
moment where the DMA_SLAVE_CONFIG call is made. In the case where it's
not mapped and not transfering anything, it's pretty trivial, to
handle, but in the case where it's actually mapped to a physical
channel, should we push the new configuration to the physical channel
right away, or can it wait until the transfer ends ?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-08-02 14:49 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 16:03 [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API Maxime Ripard
2014-07-30 16:03 ` Maxime Ripard
2014-07-30 16:06 ` Vinod Koul
2014-07-30 16:06 ` Vinod Koul
2014-07-31 7:44 ` Maxime Ripard
2014-07-31 7:44 ` Maxime Ripard
2014-07-31 11:56 ` Vinod Koul
2014-07-31 11:56 ` Vinod Koul
2014-07-31 16:23 ` Maxime Ripard
2014-07-31 16:23 ` Maxime Ripard
2014-08-01 17:13 ` Vinod Koul
2014-08-01 17:13 ` Vinod Koul
2014-08-02 14:49 ` Maxime Ripard [this message]
2014-08-02 14:49 ` Maxime Ripard
2014-08-02 15:17 ` Russell King - ARM Linux
2014-08-02 15:17 ` Russell King - ARM Linux
2014-08-02 19:06 ` Maxime Ripard
2014-08-02 19:06 ` Maxime Ripard
2014-08-05 16:25 ` Vinod Koul
2014-08-05 16:25 ` Vinod Koul
2014-07-31 12:44 ` Lars-Peter Clausen
2014-07-31 12:44 ` Lars-Peter Clausen
2014-07-31 16:13 ` Maxime Ripard
2014-07-31 16:13 ` Maxime Ripard
2014-07-31 16:54 ` Lars-Peter Clausen
2014-07-31 16:54 ` Lars-Peter Clausen
2014-07-31 17:37 ` Maxime Ripard
2014-07-31 17:37 ` Maxime Ripard
2014-08-01 8:00 ` Lars-Peter Clausen
2014-08-01 8:00 ` Lars-Peter Clausen
2014-08-01 8:57 ` Maxime Ripard
2014-08-01 8:57 ` Maxime Ripard
2014-08-01 17:15 ` Vinod Koul
2014-08-01 17:15 ` Vinod Koul
2014-08-01 18:09 ` Lars-Peter Clausen
2014-08-01 18:09 ` Lars-Peter Clausen
2014-08-02 15:13 ` Maxime Ripard
2014-08-02 15:13 ` Maxime Ripard
2014-08-04 7:16 ` Lars-Peter Clausen
2014-08-04 7:16 ` Lars-Peter Clausen
2014-07-31 13:22 ` Russell King - ARM Linux
2014-07-31 13:22 ` Russell King - ARM Linux
2014-07-31 16:41 ` Maxime Ripard
2014-07-31 16:41 ` Maxime Ripard
2014-08-01 14:53 ` Russell King - ARM Linux
2014-08-01 14:53 ` Russell King - ARM Linux
2014-08-02 15:11 ` Maxime Ripard
2014-08-02 15:11 ` Maxime Ripard
2014-08-02 15:29 ` Russell King - ARM Linux
2014-08-02 15:29 ` Russell King - ARM Linux
2014-08-02 19:05 ` Maxime Ripard
2014-08-02 19:05 ` Maxime Ripard
2014-08-01 17:22 ` Vinod Koul
2014-08-01 17:22 ` Vinod Koul
2014-08-05 8:16 ` Geert Uytterhoeven
2014-08-05 8:16 ` Geert Uytterhoeven
2014-08-14 8:53 ` Ludovic Desroches
2014-08-14 8:53 ` Ludovic Desroches
2014-08-14 8:57 ` Russell King - ARM Linux
2014-08-14 8:57 ` Russell King - ARM Linux
2014-08-19 13:45 ` Vinod Koul
2014-08-19 13:45 ` Vinod Koul
2014-08-19 14:44 ` Russell King - ARM Linux
2014-08-19 14:44 ` Russell King - ARM Linux
2014-08-19 14:57 ` Vinod Koul
2014-08-19 14:57 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140802144925.GJ3952@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.