From: Vinod Koul <vkoul@kernel.org>
To: "Nuno Sá via B4 Relay" <devnull+nuno.sa.analog.com@kernel.org>
Cc: dmaengine@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH 0/5] dma: dma-axi-dmac: Add cyclic transfer support and graceful termination
Date: Fri, 27 Feb 2026 07:47:43 +0530 [thread overview]
Message-ID: <aaD-xxghRKAhS8Yc@vaman> (raw)
In-Reply-To: <20260127-axi-dac-cyclic-support-v1-0-b32daca4b3c7@analog.com>
On 27-01-26, 14:28, Nuno Sá via B4 Relay wrote:
> This series adds support for cyclic transfers in the .device_prep_peripheral_dma_vec()
> callback and implements graceful termination of cyclic transfers using the
> DMA_PREP_LOAD_EOT flag. Using DMA_PREP_REPEAT and DMA_PREP_LOAD_EOT is
> based on the discussion in [1].
>
> Currently, the only way to stop a cyclic transfer is through brute force using
> .device_terminate_all(), which terminates all pending transfers. This series
> introduces a mechanism to gracefully terminate individual cyclic transfers when
> a new transfer flagged with DMA_PREP_LOAD_EOT is queued.
>
> We need two different approaches:
>
> 1. Software-managed cyclic transfers: These generate EOT (End-Of-Transfer)
> interrupts for each cycle. Hence, termination can be handled directly
> in the interrupt handler when the EOT interrupt fires, making the
> transition to the next transfer straightforward.
>
> 2. Hardware-managed cyclic transfers: These are optimized to avoid interrupt
> overhead by suppressing EOT interrupts. Since there are no EOT interrupts,
> termination must be detected at SOF (Start-Of-Frame) when new transfers
> are being considered. The transfer is marked for termination and the
> hardware is configured to end the current cycle gracefully.
>
> For HW-managed cyclic mode, the series handles both scatter-gather and non-SG
> variants. With SG support, the last segment flags are modified to trigger EOT.
> Without SG, the CYCLIC flag is cleared to allow natural completion. A workaround
> is included for older IP cores (pre-4.6.a) that can prefetch data incorrectly
> when clearing the CYCLIC flag, requiring a core disable/enable cycle.
>
> [1]: https://lore.kernel.org/dmaengine/ZhJW9JEqN2wrejvC@matsya/
>
> ---
> Nuno Sá (5):
> dmaengine: Document cyclic transfer for dmaengine_prep_peripheral_dma_vec()
> dma: dma-axi-dmac: add cyclic transfers in .device_prep_peripheral_dma_vec()
> dma: dma-axi-dmac: add helper for getting next desc
> dma: dma-axi-dmac: Gracefully terminate SW cyclic transfers
> dma: dma-axi-dmac: gracefully terminate HW cyclic transfers
Please be consistent in naming, it should dmaengine: dma-axi-dmac: xxx
everywhere!
--
~Vinod
next prev parent reply other threads:[~2026-02-27 2:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 14:28 [PATCH 0/5] dma: dma-axi-dmac: Add cyclic transfer support and graceful termination Nuno Sá via B4 Relay
2026-01-27 14:28 ` [PATCH 1/5] dmaengine: Document cyclic transfer for dmaengine_prep_peripheral_dma_vec() Nuno Sá via B4 Relay
2026-02-25 16:50 ` Frank Li
2026-01-27 14:28 ` [PATCH 2/5] dma: dma-axi-dmac: add cyclic transfers in .device_prep_peripheral_dma_vec() Nuno Sá via B4 Relay
2026-02-25 16:51 ` Frank Li
2026-01-27 14:28 ` [PATCH 3/5] dma: dma-axi-dmac: add helper for getting next desc Nuno Sá via B4 Relay
2026-02-25 16:54 ` Frank Li
2026-01-27 14:28 ` [PATCH 4/5] dma: dma-axi-dmac: Gracefully terminate SW cyclic transfers Nuno Sá via B4 Relay
2026-02-25 16:57 ` Frank Li
2026-02-26 9:35 ` Nuno Sá
2026-01-27 14:28 ` [PATCH 5/5] dma: dma-axi-dmac: gracefully terminate HW " Nuno Sá via B4 Relay
2026-02-27 2:17 ` Vinod Koul [this message]
2026-02-27 12:41 ` [PATCH 0/5] dma: dma-axi-dmac: Add cyclic transfer support and graceful termination Nuno Sá
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=aaD-xxghRKAhS8Yc@vaman \
--to=vkoul@kernel.org \
--cc=devnull+nuno.sa.analog.com@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=lars@metafoo.de \
/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