From: "Ira W. Snyder" <iws@ovro.caltech.edu>
To: Linus Walleij <linus.ml.walleij@gmail.com>
Cc: "Per Fridén" <per.friden@stericsson.com>,
"Dan Williams" <dan.j.williams@intel.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFCv2 1/2] dmaengine: add support for scatterlist to scatterlist transfers
Date: Mon, 27 Sep 2010 10:23:56 -0700 [thread overview]
Message-ID: <20100927172356.GA805@ovro.caltech.edu> (raw)
In-Reply-To: <AANLkTimzdEhAZ=oXbbB3Ge5=YY7OXq3fjaRH4roPNB-k@mail.gmail.com>
On Mon, Sep 27, 2010 at 05:23:34PM +0200, Linus Walleij wrote:
> 2010/9/25 Ira W. Snyder <iws@ovro.caltech.edu>:
>
> > This adds support for scatterlist to scatterlist DMA transfers.
>
> This is a good idea, we have a local function to do this in DMA40 already,
> stedma40_memcpy_sg().
>
I think that having two devices that want to implement this
functionality as part of the DMAEngine API is a good argument for making
it available as part of the core API. I think it would be good to add
this to struct dma_device, and add a capability (DMA_SG?) for it as
well.
I have looked at the stedma40_memcpy_sg() function, and I think we would
want to extend it slightly for the generic API. Is there any good reason
to prohibit scatterlists with different numbers of elements?
For example:
src scatterlist: 10 elements, each with 4K length (40K total)
dst scatterlist: 40 elements, each with 1K length (40K total)
The total length of both scatterlists is equal, but the number of
scatterlist entries is different. The freescale DMA controller can
handle this just fine.
I'm proposing this function signature:
struct dma_async_tx_descriptor *
dma_memcpy_sg(struct dma_chan *chan,
struct scatterlist *dst_sg, unsigned int dst_nents,
struct scatterlist *src_sg, unsigned int src_nents,
unsigned long flags);
> > This is
> > currently hidden behind a configuration option, which will allow drivers
> > which need this functionality to select it individually.
>
> Why? Isn't it better to add this as a new capability flag
> if you don't want to announce it? Or is the intent to save
> memory footprint?
>
Dan wanted this, probably for memory footprint. If >1 driver is using
it, I would rather have it as part of struct dma_device along with a
capability.
Thanks for the feedback,
Ira
next prev parent reply other threads:[~2010-09-27 17:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-24 23:13 [PATCH RFCv2 0/2] dma: add support for sg-to-sg transfers Ira W. Snyder
2010-09-24 23:13 ` [PATCH RFCv2 1/2] dmaengine: add support for scatterlist to scatterlist transfers Ira W. Snyder
2010-09-27 15:23 ` Linus Walleij
2010-09-27 17:23 ` Ira W. Snyder [this message]
2010-09-27 17:35 ` Dan Williams
2010-09-28 7:13 ` Per Förlin
2010-09-24 23:13 ` [PATCH RFCv2 2/2] fsldma: use generic " Ira W. Snyder
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=20100927172356.GA805@ovro.caltech.edu \
--to=iws@ovro.caltech.edu \
--cc=dan.j.williams@intel.com \
--cc=linus.ml.walleij@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=per.friden@stericsson.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).