diff options
author | Michael Tretter <m.tretter@pengutronix.de> | 2021-08-26 11:47:40 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-10-01 17:26:30 +0530 |
commit | 16ed0ef3e931f49b06d73afbe1fb41737bee86b6 (patch) | |
tree | 390e6aaf431cee15d171df20b6953964f5bf8b58 /drivers/dma/xilinx | |
parent | 85997fdfd15916dddee2458b7382934b6c857f87 (diff) |
dmaengine: zynqmp_dma: cleanup after completing all descriptors
The current implementation iterates the entire done list for each
completed dma descriptor even if there are multiple completed
descriptors.
Avoid this by first moving all completed descriptors to the done list
and afterwards iterating the done list and finishing the descriptors.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Link: https://lore.kernel.org/r/20210826094742.1302009-6-m.tretter@pengutronix.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/xilinx')
-rw-r--r-- | drivers/dma/xilinx/zynqmp_dma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index 2a57d7c38d35..aa1374c24498 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -758,10 +758,11 @@ static void zynqmp_dma_do_tasklet(struct tasklet_struct *t) while (count) { zynqmp_dma_complete_descriptor(chan); - zynqmp_dma_chan_desc_cleanup(chan); count--; } + zynqmp_dma_chan_desc_cleanup(chan); + if (chan->idle) zynqmp_dma_start_transfer(chan); |