summaryrefslogtreecommitdiff
path: root/Documentation/driver-api/dmaengine
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2020-05-13 21:47:49 +0300
committerVinod Koul <vkoul@kernel.org>2020-06-17 17:15:14 +0300
commit47ec7f09bc107720905c96bc37771e4ed1ff0aed (patch)
treed0d500633ad1d51812bc8ed04394e16859bc296c /Documentation/driver-api/dmaengine
parentc09a7ce668a666f1e044214647cb594940ba927c (diff)
downloadlinux-47ec7f09bc107720905c96bc37771e4ed1ff0aed.tar.xz
dmaengine: cookie bypass for out of order completion
The cookie tracking in dmaengine expects all submissions completed in order. Some DMA devices like Intel DSA can complete submissions out of order, especially if configured with a work queue sharing multiple DMA engines. Add a status DMA_OUT_OF_ORDER that tx_status can be returned for those DMA devices. The user should use callbacks to track the completion rather than the DMA cookie. This would address the issue of dmatest complaining that descriptors are "busy" when the cookie count goes backwards due to out of order completion. Add DMA_COMPLETION_NO_ORDER DMA capability to allow the driver to flag the device's ability to complete operations out of order. Reported-by: Swathi Kovvuri <swathi.kovvuri@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Tested-by: Swathi Kovvuri <swathi.kovvuri@intel.com> Link: https://lore.kernel.org/r/158939557151.20335.12404113976045569870.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'Documentation/driver-api/dmaengine')
-rw-r--r--Documentation/driver-api/dmaengine/provider.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/driver-api/dmaengine/provider.rst b/Documentation/driver-api/dmaengine/provider.rst
index 56e5833e8a07..ce68315482b1 100644
--- a/Documentation/driver-api/dmaengine/provider.rst
+++ b/Documentation/driver-api/dmaengine/provider.rst
@@ -239,6 +239,22 @@ Currently, the types available are:
want to transfer a portion of uncompressed data directly to the
display to print it
+- DMA_COMPLETION_NO_ORDER
+
+ - The device does not support in order completion.
+
+ - The driver should return DMA_OUT_OF_ORDER for device_tx_status if
+ the device is setting this capability.
+
+ - All cookie tracking and checking API should be treated as invalid if
+ the device exports this capability.
+
+ - At this point, this is incompatible with polling option for dmatest.
+
+ - If this cap is set, the user is recommended to provide an unique
+ identifier for each descriptor sent to the DMA device in order to
+ properly track the completion.
+
These various types will also affect how the source and destination
addresses change over time.
@@ -399,6 +415,9 @@ supported.
- In the case of a cyclic transfer, it should only take into
account the current period.
+ - Should return DMA_OUT_OF_ORDER if the device does not support in order
+ completion and is completing the operation out of order.
+
- This function can be called in an interrupt context.
- device_config