ikwzm / udmabuf

User space mappable dma buffer device driver for Linux.
BSD 2-Clause "Simplified" License
539 stars 165 forks source link

Zynq u-dma-buf with DMA #74

Open gtortone opened 3 years ago

gtortone commented 3 years ago

Hi, do you have an example/tutorial to use DMA on Zynq with u-dma-buf ?

I already have a Vivado design with a PL FIFO filled by a counter for Microzed (Zynq-7000) that work with dma-proxy (Xilinx demo) but I'did not find any example on how to use your implementation to receive data from DMA.

Thanks in advance.

ikwzm commented 3 years ago

Thank you for the issue.

I haven't prepared a tutorial in particular, but the following repositories may be helpful.

gtortone commented 3 years ago

Hi, thanks a lot for the links ! They are very helpful for me to understand DMA on Zynq. I realized that in your C code you are using DMA in direct-mode... do you have an example to use DMA scatter-gather mode ?

Thanks a lot !

ikwzm commented 3 years ago

Excuse me. There is no scatter-gather DMA sample. u-dma-buf reserves a "contiguous" memory space in the kernel as a buffer, so we don't use scatter-gather mode.

gtortone commented 3 years ago

Hi, thanks for the explanation... but I'm asking if it is possible to use scatter-gather DMA with multiple u-dma-buf kernel buffers... or inside a single u-dma-buf using different sub-buffers...

ikwzm commented 3 years ago

I have no experience with it, but I think it is possible.