Re: [EXTERNAL] Re: [PATCH 0/4] Expand Xilinx CDMA functions
From: Adrian Larumbe <hidden>
Date: 2021-04-23 14:39:15
Also in:
dmaengine
On 23.04.2021 15:51, Lars-Peter Clausen wrote:
quoted
On 23-04-21, 11:17, Lars-Peter Clausen wrote:quoted
It seems to me what we are missing from the DMAengine API is the equivalent of device_prep_dma_memcpy() that is able to take SG lists. There is already a memset_sg, it should be possible to add something similar for memcpy.You mean something like dmaengine_prep_dma_sg() which was removed?Ah, that's why I could have sworn we already had this!
Yes, after that API function was removed, the Xilinx DMA driver effectively ceased to support memory-to-memory SG transfers. My assumption was if it wasn't ever reimplemented through the callback you mentioned before, is because there isn't truly much interest in this device. However we do need this functionality in our system. At the moment, and for our particular use of it, we can always guarantee that either the source or destination will be one contiguous chunk of memory, so just one scatterlist pointer array was enough to fully program an operation. I think this would fit alright into memset_sg. What do you think? Also, at the moment we're using it for transfers between main memory and CPU-mapped PCI memory, which cannot be allocated with kmalloc. Wouldn't this fall into the use case for device_prep_slave_sg? Adrian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel