ikwzm / udmabuf

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

How does this driver interact (if at all) with the ZynqMP DMA driver? #36

Closed mmurrian closed 4 years ago

mmurrian commented 4 years ago

To start, I'd like to say that I appreciate your making this driver available. The detailed and thorough documentation you've provided is also much appreciated.

I'm trying to understand how your driver interacts with the Xilinx ZynqMP DMA driver (on an UltraScale+ RFSoC ZCU111 running PetaLinux)?

On boot, there appears to be some number of DMA channels configured:

[    4.594638] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    4.601751] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    4.608853] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    4.615965] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    4.623071] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    4.630197] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    4.637309] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    4.644422] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    4.651591] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    4.658705] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    4.665816] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    4.672924] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    4.680033] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    4.687143] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    4.694256] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    4.701369] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success

that are enumerated here

root@xilinx-zcu111-2019_2:/sys/class/dma# ls
dma0chan0   dma0chan2   dma0chan4   dma10chan0  dma12chan0  dma14chan0  dma16chan0  dma18chan0  dma2chan0   dma4chan0   dma6chan0   dma8chan0
dma0chan1   dma0chan3   dma0chan5   dma11chan0  dma13chan0  dma15chan0  dma17chan0  dma1chan0   dma3chan0   dma5chan0   dma7chan0   dma9chan0

Forgive me for asking what is probably an obvious/fundamental question... does your driver use these channels? If so, how do I use your driver to ensure that I use a particular channel?

ikwzm commented 4 years ago

Thank you for the issue.

udmabuf does not use the DMA-engine (including zynqmp-dma). udmabuf only allocates a buffer for DMA. Controlling DMA-engine is not the job of udmabuf.