All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Dan Williams <djbw@fb.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Matt Porter <matt@ohporter.com>
Subject: Re: [RFC] dmaengine: add dma_slave_get_caps api
Date: Mon, 8 Jul 2013 19:33:57 +0530	[thread overview]
Message-ID: <20130708140357.GI16653@intel.com> (raw)
In-Reply-To: <51DACC8D.5020201@metafoo.de>

On Mon, Jul 08, 2013 at 04:28:29PM +0200, Lars-Peter Clausen wrote:
> On 07/08/2013 03:40 PM, Vinod Koul wrote:
> > On Mon, Jul 08, 2013 at 02:01:35PM +0200, Lars-Peter Clausen wrote:
> >> On 07/08/2013 10:54 AM, Vinod Koul wrote:
> >>> +/* struct dma_slave_caps - expose capabilities of a slave channel only
> >>> + *
> >>> + * @src_addr_widths: bit mask of src addr widths the channel supports
> >>> + * @dstn_addr_widths: bit mask of dstn addr widths the channel supports
> >>> + * @src_burst_lengths: bit mask of src slave burst lengths supported
> >>> + * @dstn_burst_lengths: bit mask of dstn slave burst lengths supported
> >>
> >> I'm not sure if we need the burst_lengths fields. For one we can only
> >> express a max burst length up 32. And usually it is fine if the dma
> >> controller does not support the burst length requested by the slave driver,
> >> since this only specifies the maximum and the dma controller driver can
> >> choose a value below this limit. E.g. if the max burst length is set to 16
> >> it is still fine if the controller only supports a burst length of 8.
> > well how are you picking up which one to use?
> > The idea is that you query and match that with system and client to get best
> > throughput. If you have IP block which over generations change capablities you
> > can runtime query and then program the channel smartly!
> 
> The client would always request the largest burst size it can support, and
> the dma master would then select a burst size equal or smaller to it
> depending on what it can support.
not really, most dmac drivers will return an error when they find a value is not
in the supported list. And that is precisely what we would like to prevent.
If you look at current model, it mostly program value which we know is already
a capablity and works model.

> E.g. if the client has an internal FIFO with room for 16 samples and it
> sends a request once the FIFO is half empty, max_burst would be set to 8. If
> the master supports burst sizes of 8 sample it would send 8 samples, if it
> only supported burst sizes of 4 it might send either one burst of 4 or two of 4.

~Vinod
-- 

  reply	other threads:[~2013-07-08 14:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08  8:54 [RFC] dmaengine: add dma_slave_get_caps api Vinod Koul
2013-07-08 12:01 ` Lars-Peter Clausen
2013-07-08 13:40   ` Vinod Koul
2013-07-08 14:28     ` Lars-Peter Clausen
2013-07-08 14:03       ` Vinod Koul [this message]
2013-07-08 14:54         ` Lars-Peter Clausen
2013-07-15  9:57 ` [PATCH] " Vinod Koul
2013-07-15 10:52   ` Lars-Peter Clausen
2013-07-15 10:23     ` Vinod Koul
2013-07-15 10:21 ` Vinod Koul
2013-07-15 11:21   ` Lars-Peter Clausen
2013-07-15 15:51   ` Lars-Peter Clausen
2013-07-15 16:21     ` 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=20130708140357.GI16653@intel.com \
    --to=vinod.koul@intel.com \
    --cc=djbw@fb.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@ohporter.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 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.