DMA Engine development
 help / color / mirror / Atom feed
* [PATCH] docs: dmaengine: clarify ordering rules around cookie completion
@ 2026-10-09  9:37 Vinod Koul
  2026-10-09  9:40 ` sashiko-bot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Vinod Koul @ 2026-10-09  9:37 UTC (permalink / raw)
  To: dmaengine; +Cc: Frank Li, Vinod Koul, Wolfram Sang, Koichiro Den

Sashiko pointed in [1] about the cookie completion order. It is good to
Document that for ensuring that dma buffer is flushed and no stale data
is seeing by consumer, we need to make sure such action is taken before
drivers invoke dma cookie completion.

[1]: https://lore.kernel.org/r/20260917072507.5BDB61F000FF@smtp.kernel.org

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 Documentation/driver-api/dmaengine/provider.rst | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/driver-api/dmaengine/provider.rst b/Documentation/driver-api/dmaengine/provider.rst
index 2897ade67b39..1bcbce705659 100644
--- a/Documentation/driver-api/dmaengine/provider.rst
+++ b/Documentation/driver-api/dmaengine/provider.rst
@@ -557,6 +557,11 @@ dma_cookie_t
 - Not really relevant any more since the introduction of ``virt-dma``
   that abstracts it away.
 
+- dmaengine drivers need to ensure buffers are flushed before invoking
+  vchan_cookie_complete() or dma_cookie_complete(). This would imply a call
+  to unmapping buffers or any such architcure calls to ensure caller seeing
+  buffers are flushed is done before invoking these calls.
+
 dma_vec
 
 - A small structure that contains a DMA address and length.
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-09 19:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  9:37 [PATCH] docs: dmaengine: clarify ordering rules around cookie completion Vinod Koul
2026-10-09  9:40 ` sashiko-bot
2026-10-09 13:40 ` Wolfram Sang
2026-10-09 16:15 ` Dave Jiang
2026-10-09 19:05 ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox