diff options
author | Samuel Holland <samuel@sholland.org> | 2022-06-21 06:13:50 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-07-05 16:04:26 +0300 |
commit | a94a098a21c678c07c8a742e4a65e8aa2bebdf08 (patch) | |
tree | b20698645fb1366a620bf7324775567b088d668f /tools/gpio | |
parent | 9bef4929fa21477d44b4934d02296c4d0126dd40 (diff) | |
download | linux-a94a098a21c678c07c8a742e4a65e8aa2bebdf08.tar.xz |
dmaengine: sun4i: Set the maximum segment size
The sun4i DMA engine supports transfer sizes up to 128k for normal DMA
and 16M for dedicated DMA, as documented in the A10 and A20 manuals.
Since this is larger than the default segment size limit (64k), exposing
the real limit reduces the number of transfers needed for a transaction.
However, because the device can only report one segment size limit, we
have to expose the smaller limit from normal DMA.
One complication is that the driver combines pairs of periodic transfers
to reduce programming overhead. This only works when the period size is
at most half of the maximum transfer size. With the default 64k segment
size limit, this was always the case, but for normal DMA it is no longer
guaranteed. Skip the optimization if the period is too long; even
without it, the overhead is less than before.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220621031350.36187-1-samuel@sholland.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/gpio')
0 files changed, 0 insertions, 0 deletions