bperez77 / xilinx_axidma

A zero-copy Linux driver and a userspace interface library for Xilinx's AXI DMA and VDMA IP blocks. These serve as bridges for communication between the processing system and FPGA programmable logic fabric, through one of the DMA ports on the Zynq processing system. Distributed under the MIT License.
MIT License
448 stars 225 forks source link

memcpy function is slow when copy data from dma output buffer #101

Closed eleICoto closed 4 years ago

eleICoto commented 5 years ago

The code I'm using is like this image And the result is like this image it seems like reading data from DMA buffer is much slower than writing data to DMA buffer. Is there an explanation for this phenomena? Or is there a speedup method

liubowen520 commented 4 years ago

I also encountered this problem. Have you solved this problem?

I want to use fpd-dma instead of memcpy, but fpd-dma can't manipulate the address requested by dma_alloc_coherent.

eleICoto commented 4 years ago

@liubowen520 https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842098/Zynq+UltraScale+MPSoC+Cache+Coherency#ZynqUltraScaleMPSoCCacheCoherency-3.1ARCACHE[3:0]andAWCACHE[3:0]

liubowen520 commented 4 years ago

Thank you for your reply. It is very helpful for me.

But I meet problem too, while using dma_coherent.

vdma failed error 10

eleICoto commented 4 years ago

@liubowen520 what platform are you using? zynq ultrascale or zynq 7000

liubowen520 commented 4 years ago

I use zynq ultrascale , zcu104.

eleICoto commented 4 years ago

image this step is the most import one, you have to use method 5.2.2 to enable Broadcasting Inner Shareable for zynq ultrascale

eleICoto commented 4 years ago

@liubowen520 when does this "vdma failed error 10" error pops out?

liubowen520 commented 4 years ago

Thank you for your reply. I would try this right now.

eleICoto commented 4 years ago

@liubowen520 Make sure you have read every line of that page and understand what they are talking about

stone-sjj commented 3 years ago

@liubowen520 what platform are you using? zynq ultrascale or zynq 7000

HELLO! my platform is zynq 7000, can I solve the problem(copy data from dma output buffer is slowly) by opening DMA cache function? how should I do ? thank you very much!

hechengyu-gui commented 2 years ago

The code I'm using is like this image And the result is like this image it seems like reading data from DMA buffer is much slower than writing data to DMA buffer. Is there an explanation for this phenomena? Or is there a speedup method

您好,这个问题解决了吗,我遇到和你一样的问题

snaillor commented 2 years ago

是的 设备树设置一下就可以

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年03月22日 19:26 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [bperez77/xilinx_axidma] memcpy function is slow when copy data from dma output buffer (#101) |

The code I'm using is like this And the result is like this it seems like reading data from DMA buffer is much slower than writing data to DMA buffer. Is there an explanation for this phenomena? Or is there a speedup method

您好,这个问题解决了吗,我遇到和你一样的问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

snaillor commented 2 years ago

你搜 petalinux 加速缓冲区读模块

是的 设备树设置一下就可以

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年03月22日 19:26 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [bperez77/xilinx_axidma] memcpy function is slow when copy data from dma output buffer (#101) |

The code I'm using is like this And the result is like this it seems like reading data from DMA buffer is much slower than writing data to DMA buffer. Is there an explanation for this phenomena? Or is there a speedup method

您好,这个问题解决了吗,我遇到和你一样的问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

jasonisnotmyrealname commented 1 year ago

你搜 petalinux 加速缓冲区读模块 是的 设备树设置一下就可以 ---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年03月22日 19:26 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [bperez77/xilinx_axidma] memcpy function is slow when copy data from dma output buffer (#101) | The code I'm using is like this And the result is like this it seems like reading data from DMA buffer is much slower than writing data to DMA buffer. Is there an explanation for this phenomena? Or is there a speedup method 您好,这个问题解决了吗,我遇到和你一样的问题 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

按照上述方法测试过了,还是不行。版本petalinux2021。