DMA Engine development
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Vinod Koul <vkoul@kernel.org>, dmaengine@vger.kernel.org
Cc: Frank Li <Frank.Li@kernel.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Koichiro Den <den@valinux.co.jp>
Subject: Re: [PATCH] docs: dmaengine: clarify ordering rules around cookie completion
Date: Fri, 9 Oct 2026 09:15:12 -0700	[thread overview]
Message-ID: <13208c9b-cf71-4b1e-ae7e-d43dcc47ee27@intel.com> (raw)
In-Reply-To: <20261009093745.539924-1-vkoul@kernel.org>



On 10/9/26 2:37 AM, Vinod Koul wrote:
> 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>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

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


  parent reply	other threads:[~2026-10-09 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-10-09 19:05 ` Frank Li

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=13208c9b-cf71-4b1e-ae7e-d43dcc47ee27@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Frank.Li@kernel.org \
    --cc=den@valinux.co.jp \
    --cc=dmaengine@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wsa+renesas@sang-engineering.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