From: Vinod Koul <vinod.koul@intel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Maarten ter Huurne <maarten@treewalker.org>,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 3/6] dma: Add a jz4740 dmaengine driver
Date: Wed, 12 Jun 2013 11:08:10 +0530 [thread overview]
Message-ID: <20130612053810.GF4107@intel.com> (raw)
In-Reply-To: <51B60D0A.7040307@metafoo.de>
On Mon, Jun 10, 2013 at 07:29:46PM +0200, Lars-Peter Clausen wrote:
> On 05/30/2013 08:46 PM, Lars-Peter Clausen wrote:
> >>> +static int jz4740_dma_alloc_chan_resources(struct dma_chan *c)
> >>> +{
> >>> + struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c);
> >>> +
> >>> + chan->jz_chan = jz4740_dma_request(chan, NULL);
> >>> + if (!chan->jz_chan)
> >>> + return -EBUSY;
> >>> +
> >>> + jz4740_dma_set_complete_cb(chan->jz_chan, jz4740_dma_complete_cb);
> >>> +
> >>> + return 0;
> >> Sorry, I didnt reply on this one. The API expects you to allocate a pool of
> >> descriptors. These descriptors are to be used in .device_prep_xxx calls later.
> >
> > The size of the descriptor is not fixed, so they can not be pre-allocated. And
> > this is nothing new either, most of the more recently added dmaengine drivers
> > allocate their descriptors on demand.
>
> Vinod, are you ok with this explanation?
Sorry, I was travelling...
Can you explain more of a bit when you say size is not fixed. Why would it be
issue if we allocate descriptors at the alloc_chan. The idea is that you
preallocated pool at alloc_chan and since the .device_prep_xxx calls can be
called from atomic context as well, you dont need to do this later. You can use use
these descriptors at that time. The idea is keep rotating the descriptors from
free poll to used one
--
~Vinod
next prev parent reply other threads:[~2013-06-12 6:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 16:24 [PATCH 0/6] Convert JZ4740 to dmaengine Lars-Peter Clausen
2013-05-30 16:25 ` [PATCH v2 1/6] MIPS: jz4740: Correct clock gate bit for DMA controller Lars-Peter Clausen
2013-05-30 16:25 ` [PATCH v2 2/6] MIPS: jz4740: Acquire and enable DMA controller clock Lars-Peter Clausen
2013-05-30 16:25 ` [PATCH v2 3/6] dma: Add a jz4740 dmaengine driver Lars-Peter Clausen
2013-05-30 17:12 ` Vinod Koul
2013-05-30 18:46 ` Lars-Peter Clausen
2013-06-10 17:29 ` Lars-Peter Clausen
2013-06-12 5:38 ` Vinod Koul [this message]
2013-06-12 12:07 ` [alsa-devel] " Lars-Peter Clausen
2013-06-21 10:51 ` Vinod Koul
2013-05-30 16:25 ` [PATCH v2 4/6] MIPS: jz4740: Register jz4740 DMA device Lars-Peter Clausen
2013-05-30 17:24 ` Sergei Shtylyov
2013-06-10 17:30 ` Lars-Peter Clausen
2013-05-30 16:25 ` [PATCH v2 5/6] ASoC: jz4740: Use the generic dmaengine PCM driver Lars-Peter Clausen
2013-05-30 16:25 ` [PATCH v2 6/6] MIPS: jz4740: Remove custom DMA API Lars-Peter Clausen
2013-05-30 17:20 ` Vinod Koul
2013-05-30 18:48 ` Lars-Peter Clausen
2013-06-21 14:13 ` [PATCH 0/6] Convert JZ4740 to dmaengine 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=20130612053810.GF4107@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=maarten@treewalker.org \
--cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox