STM32MP157F: Dmaengine dmaengine_prep_dma_memcpy vs dmaengine_prep_dma_cyclic? Hardware vs Software triggered. (Linux)
Hello all!
We have implemented our custom driver that uses DMA to copy a large amount of data from the FMC interface (FPGA mapped to it) to the RAM.
For very fast data acquisition the setup time for new DMA transactions becomes critical.
I tried an overlapping approach:
But this did not work. Then I tried to use dmaengine_prep_dma_cyclic to copth the FPGA data into a larger coherent memory region. Then using dmaengine_prep_dma_memcpy to copy it to its final destination.
But: the transaction created with dmaengine_prep_dma_cyclic does not want to start!
dmaengine_prep_dma_memcpy works fine.
I think this is because of the difference between software vs hardware triggered DMA transactions (memcopy.
Looking into stm32-mdma.c is see that dmaengine_prep_dma_memcpy has its own setup routine whereas dmaengine_prep_dma_cyclic use stm32_mdma_set_xfer_param() that always configures a HW request.
My big big question:
Is there a way to use dmaengine_prep_dma_cyclic for a MEMORY to MEMORY DMA transaction (software triggered)? This would be the perfect solution to my performance problem...
Bye Gunther
