docs: dmaengine: clarify ordering rules around cookie completion

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

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://patch.msgid.link/20261009093745.539924-1-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Vinod Koul 2026-10-09 11:37:44 +02:00
parent 511afae96d
commit fa89be96e8

View File

@ -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 architecture 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.