From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Vinod Koul <vinod.koul@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
nsekhar@ti.com, linux-omap@vger.kernel.org,
linux-serial@vger.kernel.org, john.ogness@linutronix.de,
Peter Ujfalusi <peter.ujfalusi@ti.com>
Subject: Re: [PATCH v2] dma: omap-dma: add support for pause of non-cyclic transfers
Date: Fri, 7 Aug 2015 19:47:39 +0100 [thread overview]
Message-ID: <20150807184739.GX7576@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20150807175548.GA4163@linutronix.de>
On Fri, Aug 07, 2015 at 07:55:48PM +0200, Sebastian Andrzej Siewior wrote:
> /*
> * We do not allow DMA_MEM_TO_DEV transfers to be paused.
> * From the AM572x TRM, 16.1.4.18 Disabling a Channel During Transfer:
> * "When a channel is disabled during a transfer, the channel undergoes
> * an abort, unless it is hardware-source-synchronized …".
> * A source-synchronised channel is one where the fetching of data is
> * under control of the device. In other words, a device-to-memory
> * transfer. So, a destination-synchronised channel (which would be a
> * memory-to-device transfer) undergoes an abort if the the CCR_ENABLE
> * bit is cleared.
> * From 16.1.4.20.4.6.2 Abort: "If an abort trigger occurs, the channel
> * aborts immediately after completion of current read/write
> * transactions and then the FIFO is cleaned up." The term "cleaned up"
> * is not defined. TI recommends to check that RD_ACTIVE and WR_ACTIVE
> * are both clear _before_ disabling the channel, otherwise data loss
> * will occur.
> * The problem is that if the channel is active, then device activity
> * can result in DMA activity starting between reading those as both
> * clear and the write to DMA_CCR to clear the enable bit hitting the
> * hardware. If the DMA hardware can't drain the data in its FIFO to the
> * destination, then data loss "might" occur (say if we write to an UART
> * and the UART is not accepting any further data).
> */
>
> would that be okay?
Better, if a tad verbose. I guess no one will miss that. :)
> If I google for it, I find it. pause/resume support for cyclic was added
> later without a note why it is only supported for cyclic.
Try searching for the "[PATCH 11/11] ASoC: omap-pcm: Convert to use
dmaengine" thread, which was the initial round of patches converting
omap-pcm to DMA engine, and where there was some discussion of how
to handle it at that time.
The result of that was it was felt that the safest approach was to
limit it to cyclic transfers for ASoC, and to use the method which
had been well proven over previous years/decade on numerous different
OMAP hardware.
It's all entirely sensible given that omap-dma has to cope with many
different hardware revisions with two major hardware versions and
people having limited testing resources for validation. So you will
understand, given the data loss issues here, why it was decided that
omap-dma will only provide pause/resume support for cases where it
has been proven to work sufficiently well and where data loss is not
that a major issue (if a few samples of audio get lost over a
suspend/resume, it's not going to corrupt your data.)
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
prev parent reply other threads:[~2015-08-07 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 15:36 Sebastian Andrzej Siewior
2015-08-07 16:26 ` Russell King - ARM Linux
2015-08-07 17:55 ` Sebastian Andrzej Siewior
2015-08-07 18:47 ` Russell King - ARM Linux [this message]
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=20150807184739.GX7576@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=bigeasy@linutronix.de \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=peter.ujfalusi@ti.com \
--cc=vinod.koul@intel.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
all inboxes | Powered by JetHome®