]> www.infradead.org Git - users/dwmw2/linux.git/commit
dmaengine: stm32-dma3: refactor HW linked-list to optimize memory accesses
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Wed, 16 Oct 2024 12:39:55 +0000 (14:39 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 21 Oct 2024 17:21:45 +0000 (22:51 +0530)
commitcb467c451163bacad4cbb7540ce7d731946f13f9
tree7c37341db29512e88f389034cd9b381e097a3280
parent12eb621e1abff65d89aeb4c92a4f3436225971d0
dmaengine: stm32-dma3: refactor HW linked-list to optimize memory accesses

Current behavior splits the buffer/sg in n * STM32_DMA3_MAX_BLOCK_SIZE + 1
for the remainder without optimization.

New behavior splits the buffer/sg in n * STM32_DMA3_MAX_BLOCK_SIZE + 1 for
(x * chan->max_burst) + 1 for the remainder.
Depending on channel FIFO size, optimal double-word (word if only 8-byte
FIFO size) bursts can be programmed before managing the very last remainder
with lower data width.
In case of _prep_slave_sg, and depending on the channel Transfer Complete
event configuration, the user is warned about the refactored linked-list,
not having the same items count than the initial sg_list. This warning is
shown only if the configuration is successful.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20241016-dma3-mp25-updates-v3-3-8311fe6f228d@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32/stm32-dma3.c