linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: Clarify cyclic transfer residue documentation
@ 2022-03-31 13:41 Paul Kocialkowski
  2022-04-11 13:46 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Kocialkowski @ 2022-03-31 13:41 UTC (permalink / raw)
  To: dmaengine, linux-doc, linux-kernel
  Cc: Vinod Koul, Jonathan Corbet, Thomas Petazzoni, Paul Kocialkowski

The current documentation for the residue reported in a cyclic transfer
case mentions that the reported residue should be relative to the current
period only. However the definition of DMA_RESIDUE_GRANULARITY_SEGMENT
specifies that the residue should be updated after each period for
a cyclic transfer, which is in direct contradiction.

Moreover the pcm_dmaengine common code uses the residue relative to
the whole cyclic buffer size, not one period.

Correct the residue-related documentation to reflect this.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 Documentation/driver-api/dmaengine/provider.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/driver-api/dmaengine/provider.rst b/Documentation/driver-api/dmaengine/provider.rst
index 0072c9c7efd3..d3fa80e333b1 100644
--- a/Documentation/driver-api/dmaengine/provider.rst
+++ b/Documentation/driver-api/dmaengine/provider.rst
@@ -457,7 +457,7 @@ supported.
   - Should use dma_set_residue to report it
 
   - In the case of a cyclic transfer, it should only take into
-    account the current period.
+    account the total size of the cyclic buffer.
 
   - Should return DMA_OUT_OF_ORDER if the device does not support in order
     completion and is completing the operation out of order.
-- 
2.35.1


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

* Re: [PATCH] dmaengine: Clarify cyclic transfer residue documentation
  2022-03-31 13:41 [PATCH] dmaengine: Clarify cyclic transfer residue documentation Paul Kocialkowski
@ 2022-04-11 13:46 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-04-11 13:46 UTC (permalink / raw)
  To: Paul Kocialkowski
  Cc: dmaengine, linux-doc, linux-kernel, Jonathan Corbet, Thomas Petazzoni

On 31-03-22, 15:41, Paul Kocialkowski wrote:
> The current documentation for the residue reported in a cyclic transfer
> case mentions that the reported residue should be relative to the current
> period only. However the definition of DMA_RESIDUE_GRANULARITY_SEGMENT
> specifies that the residue should be updated after each period for
> a cyclic transfer, which is in direct contradiction.
> 
> Moreover the pcm_dmaengine common code uses the residue relative to
> the whole cyclic buffer size, not one period.
> 
> Correct the residue-related documentation to reflect this.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2022-04-11 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 13:41 [PATCH] dmaengine: Clarify cyclic transfer residue documentation Paul Kocialkowski
2022-04-11 13:46 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).