cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
383 Views
Registered: ‎09-27-2019

DMA proxy driver runs once but subsquently continuously times out

Hi everyone!

I have been implementing the proxy driver described in this tutorial. I am using slightly different hardware (built in Vivado 2018.3) Zynq 7000 (ZC702 dev board), and Linux 4.19, built by Petalinux 2019.1.

Hardware.png

My system-user dts file has been modified to the following:

/include/ "system-conf.dtsi"
/ {
	dma_prox {
		compatible ="xlnx,dma_proxy";
		dmas = <&axi_dma_0 0
			&axi_dma_0 1>;
		dma-names = "dma_proxy_tx", "dma_proxy_rx";
	};

	axidmatest_1: axidmatest@1 {
		compatible ="xlnx,axi-dma-test-1.00.a";
		dmas = <&axi_dma_0 0
			&axi_dma_0 1>;
		dma-names = "axidma0", "axidma1";
	};

};

Symptoms:

  • I can successfully run both the axidmatest module in the kernel, and the dma-proxy-test userspace code provided in the tutorial
  • Once the dma-proxy-test has been run once, both TX and RX will consistently fail and time out
  • If, after running the test once, I remove the dma-probe module and add it back, I can run again without error.
  • If I run twice--once successfully, then once with timeouts--I cannot rerun successfully by removing and then adding the module any longer.
  • When the module is activated, the following message appears:
    dma_proxy module initialized
    Allocating uncached memory at virtual address 0x(ptrval), physical address 0x(ptrval)
    Allocating uncached memory at virtual address 0x(ptrval), physical address 0x(ptrval)

I have spent a significant amount of time playing with and looking at both the codes of the module and its testing script, but haven't been able to fix this problem. I have very little experience dealing with drivers, so this could potentially be a trivial problem.

I would greatly appreciate your inputs and would be more than happy to provide more details.

Thank you for reading!

0 Kudos
3 Replies
Highlighted
Contributor
Contributor
269 Views
Registered: ‎05-16-2014

回复: DMA proxy driver runs once but subsquently continuously times out

Hi

I have the same problems  , do you know how to  sovel  it  ?

0 Kudos
Highlighted
Explorer
Explorer
100 Views
Registered: ‎11-30-2017

回复: DMA proxy driver runs once but subsquently continuously times out

I have the same issue.

---/\/\/\/\/\/\/\---
Always Online
0 Kudos
Highlighted
Explorer
Explorer
98 Views
Registered: ‎11-30-2017

回复: DMA proxy driver runs once but subsquently continuously times out

This can be fixed by commenting out the line highlighted beow in the DMA client:

/* Close the file and there's nothing to do for it

*/

static int release(struct inode *ino, struct file *file)

{

                struct dma_proxy_channel *pchannel_p = (struct dma_proxy_channel *)file->private_data;

                struct dma_device *dma_device = pchannel_p->channel_p->device;

 

                /* Stop all the activity when the channel is closed assuming this

                * may help if the application is aborted without normal closure

                */

 

                /*dma_device->device_terminate_all(pchannel_p->channel_p);*/

                return 0;

}


---/\/\/\/\/\/\/\---
Always Online
0 Kudos