I am working on improving the throughput of DMA transfers in my custom kernel driver from an FPGA. The current throughput is ~250 Mb/s.
The architecture is like this:
- FPGA connected over PCIe
- I am allocating a large buffer in RAM using consistent mapping with
dma_alloc_coherent
whenprobe
is called - The FPGA constantly transfers data over DMA.
- The FPGA raises an int whenever DMA is ready and then from the interrupt handler I am copying the data from the memory space mapped from the
BAR
register to my consistent allocated buffer usingdevice_prep_dma_memcpy
.
Is there a way to avoid this memcpy
from device_prep_dma_memcpy
and tell the DMA to copy the data directly to my consistent allocated buffer?