Hi,
This is to follow up the thread https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1200987/am625-rerouting-interrupt-to-dma-event-and-dma_dev_to_mem-channel-selection.
The original question in the referred thread is closed with all the provided kernel patches. Now the system runs into DMA interrupt latency issue which would cause GPMC/FPGA data overflow. Please see the details of the description below.
=============
At last - I realised I was being dumb and I figured out where I was going wrong - it is now working as expected...
So now the driver initialises correctly and I can then enable the FPGA by writing to an 'enable' register, the FPGA then raises the GPIO1_15 line and the DMA transfer is triggered and on completion the dma completion calback is called which advises user-space that data is available and sends an interrupt acknowledge to the FPGA - I now see a continuous stream of interrupts until I either stop it, or the interrupt acknowledge arrives too late, in which case it crashes...
There are two things I see - firstly, if I stop the FPGA and attempt to deallocate the DMA, I see the error 'tu-udma 485c0100.dma-controller: chan0 teardown timeout!', however, this does not appear to have any serious negative side-effect, but it is of concern.
Of more concern is the fact that I see quite a lot of jitter on the interrupt line - with the configuration I am running at the moment, the interrupt frequency is 1kHz and the typical duration that the interrupt remains high is ~40us, however, I do occasionally see the duration of this high increasing to more the 1ms, and in the event that the FPGA stops and reports an error that the interrupt acknowledge was not received timeously. The first few times I ran my test I saw this overrun situation after < 60s on each run. There is no other load on the system - top shows 0% CPU load. If I load the system using stress-ng I can see much larger jitter on this interrupt.