From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 03/34] dmaengine: virt-dma: add support for cyclic DMA periodic callbacks
Date: Wed, 30 May 2012 09:02:16 +0100 [thread overview]
Message-ID: <20120530080216.GH12217@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CACRpkdba_aFbyBt9hkYqBR=oY6fq0KHchjGcuS_NhbOMbE0Owg@mail.gmail.com>
On Wed, May 30, 2012 at 03:52:53PM +0800, Linus Walleij wrote:
> On Tue, May 29, 2012 at 5:36 PM, Russell King
> <rmk+kernel@arm.linux.org.uk> wrote:
>
> > Add support for cyclic DMA's periodic callbacks. ?Drivers are expected
> > to call vchan_cyclic_callback() when a period has completed, which will
> > schedule the tasklet to make the callback into the driver.
> >
> > As callbacks are made from tasklet context, it is important to realise
> > that we don't guarantee a callback for each completed period, but for
> > N completed periods where N may be greater than one.
>
> This last thing was something we have to fix right?
> Like for each driver to keep a counter of completed periods
> and call the handler repeatedly if N > 1.
No, I don't think we should do that - ALSA doesn't require it, and ALSA
is about the only user of this. As I've said, DMA engine drivers should
implement a correct tx_status function, which returns the remaining bytes
to be transferred to the end of the buffer so it's possible to find out
how many periods have completed when the callback is called.
next prev parent reply other threads:[~2012-05-30 8:02 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 9:30 [RFC 00/34] PL08x DMA conversion to virt-dma Russell King - ARM Linux
2012-05-29 9:35 ` [RFC 01/34] dmaengine: split out virtual channel DMA support from sa11x0 driver Russell King
2012-05-29 9:35 ` [RFC 02/34] dmaengine: virt-dma: vchan_find_desc() Russell King
2012-05-30 7:48 ` Linus Walleij
2012-05-29 9:36 ` [RFC 03/34] dmaengine: virt-dma: add support for cyclic DMA periodic callbacks Russell King
2012-05-30 7:52 ` Linus Walleij
2012-05-30 8:02 ` Russell King - ARM Linux [this message]
2012-05-31 1:29 ` Linus Walleij
2012-05-31 3:45 ` zhangfei gao
2012-05-31 19:17 ` Russell King - ARM Linux
2012-06-01 2:26 ` zhangfei gao
2012-06-01 10:39 ` Russell King - ARM Linux
2012-05-29 9:36 ` [RFC 04/34] dmaengine: PL08x: remove runtime PM support Russell King
2012-05-31 0:46 ` Linus Walleij
2012-06-01 10:45 ` Russell King - ARM Linux
2012-05-29 9:36 ` [RFC 05/34] dmaengine: PL08x: fix missed dma_transfer_direction fixup Russell King
2012-05-31 0:47 ` Linus Walleij
2012-06-01 10:47 ` Russell King - ARM Linux
2012-05-29 9:37 ` [RFC 06/34] dmaengine: PL08x: remove redundant spinlock Russell King
2012-05-31 0:48 ` Linus Walleij
2012-05-29 9:37 ` [RFC 07/34] dmaengine: PL08x: remove circular_buffer boolean from channel data Russell King
2012-05-31 0:49 ` Linus Walleij
2012-05-29 9:37 ` [RFC 08/34] dmaengine: PL08x: clean up get_signal/put_signal Russell King
2012-05-31 0:53 ` Linus Walleij
2012-06-01 10:48 ` Russell King - ARM Linux
2012-05-29 9:38 ` [RFC 09/34] dmaengine: PL08x: move private data structures into amba-pl08x.c Russell King
2012-05-31 0:54 ` Linus Walleij
2012-05-29 9:38 ` [RFC 10/34] dmaengine: PL08x: constify channel names and bus_id strings Russell King
2012-05-31 0:55 ` Linus Walleij
2012-05-29 9:38 ` [RFC 11/34] dmaengine: PL08x: get src/dst addr direct from dma_slave_config struct Russell King
2012-05-31 0:56 ` Linus Walleij
2012-05-29 9:39 ` [RFC 12/34] dmaengine: PL08x: get rid of device_fc in struct pl08x_dma_chan Russell King
2012-05-31 0:57 ` Linus Walleij
2012-05-29 9:39 ` [RFC 13/34] dmaengine: PL08x: move the bus and increment selection to dma prepare function Russell King
2012-05-31 0:57 ` Linus Walleij
2012-05-29 9:39 ` [RFC 14/34] dmaengine: PL08x: extract function to to generate cctl values Russell King
2012-05-31 1:00 ` Linus Walleij
2012-05-29 9:40 ` [RFC 15/34] dmaengine: PL08x: ignore 'direction' argument in dma_slave_config Russell King
2012-05-31 1:01 ` Linus Walleij
2012-05-29 9:40 ` [RFC 16/34] dmaengine: PL08x: get rid of unnecessary checks " Russell King
2012-05-31 1:02 ` Linus Walleij
2012-05-29 9:40 ` [RFC 17/34] dmaengine: PL08x: split DMA signal muxing from channel alloc Russell King
2012-05-31 1:03 ` Linus Walleij
2012-05-29 9:41 ` [RFC 18/34] dmaengine: PL08x: move DMA signal muxing into pl08x_dma_chan struct Russell King
2012-05-31 1:03 ` Linus Walleij
2012-05-29 9:41 ` [RFC 19/34] dmaengine: PL08x: track mux usage on a per-channel basis Russell King
2012-05-31 1:04 ` Linus Walleij
2012-05-29 9:42 ` [RFC 20/34] dmaengine: PL08x: convert to a list of completed descriptors Russell King
2012-05-31 1:04 ` Linus Walleij
2012-05-29 9:42 ` [RFC 21/34] dmaengine: PL08x: move DMA signal muxing into slave prepare code Russell King
2012-05-31 1:11 ` Linus Walleij
2012-05-29 9:42 ` [RFC 22/34] dmaengine: PL08x: remove waiting descriptor pointer Russell King
2012-05-31 1:11 ` Linus Walleij
2012-05-29 9:43 ` [RFC 23/34] dmaengine: PL08x: re-jig the starting of txds Russell King
2012-05-31 1:14 ` Linus Walleij
2012-06-01 10:52 ` Russell King - ARM Linux
2012-06-04 15:54 ` Linus Walleij
2012-05-29 9:43 ` [RFC 24/34] dmaengine: PL08x: split the pend_list in two Russell King
2012-05-31 1:20 ` Linus Walleij
2012-05-29 9:43 ` [RFC 25/34] dmaengine: PL08x: start next descriptor from irq context Russell King
2012-05-31 1:21 ` Linus Walleij
2012-05-29 9:44 ` [RFC 26/34] dmaengine: PL08x: rejig physical channel allocation Russell King
2012-05-31 1:23 ` Linus Walleij
2012-05-29 9:44 ` [RFC 27/34] dmaengine: PL08x: convert to use virt-dma structs Russell King
2012-05-31 1:23 ` Linus Walleij
2012-05-29 9:44 ` [RFC 28/34] dmaengine: PL08x: use vchan's spinlock Russell King
2012-05-31 1:24 ` Linus Walleij
2012-05-29 9:45 ` [RFC 29/34] dmaengine: PL08x: convert to use vchan submitted/issued lists Russell King
2012-05-31 1:24 ` Linus Walleij
2012-05-29 9:45 ` [RFC 30/34] dmaengine: PL08x: convert to use vchan done list Russell King
2012-05-31 1:24 ` Linus Walleij
2012-05-29 9:45 ` [RFC 31/34] dmaengine: PL08x: fix tx_status function to return correct residue Russell King
2012-05-31 1:25 ` Linus Walleij
2012-05-29 9:46 ` [RFC 32/34] dmaengine: PL08x: get rid of pl08x_prep_channel_resources Russell King
2012-05-31 1:25 ` Linus Walleij
2012-05-29 9:46 ` [RFC 33/34] dmaengine: PL08x: get rid of write only pool_ctr and free_txd locking Russell King
2012-05-31 1:26 ` Linus Walleij
2012-05-29 9:46 ` [RFC 34/34] dmaengine: PL08x: ensure all descriptors are freed when channel is released Russell King
2012-05-31 1:27 ` Linus Walleij
2012-06-01 10:55 ` Russell King - ARM Linux
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=20120530080216.GH12217@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 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).