Closed azAghaee closed 1 year ago
Thank you for the issue.
In your device tree, the image_buf@0
node has the linux, cma-default
property set.
If this property is set, this area will be allocated as the CMA area used by the kernel by default. Therefore, other device drivers also use this area as his DMA buffer. Therefore, it seems that the size reserved by CMA is not enough for the buffer size (16MiB) required by u-dma-buf.
If you want to use image_buf@0
only as an image buffer, remove the linux, cma-default
property. In this case, her CMA area of the kernel is reserved separately so that no other device driver will use image_buf@0
as DMA buffer.
Thanks for your great answer
problem solved after removing line "linux, cma-default"
Again Thanks for your time
Now when I use mmap on this region, the output address is 40bit and something like 0x7f.... (0x74AADAA000). is this a correct address?!
How a physical address is mapped to a virtual address depends on the kernel. For example, the Linux Kernel for ARM64 has a parameter called CONFIG_ARM64_VA_BITS that specifies the number of bits allocated to a virtual address. Therefore, I'm not sure if the question address is correct.
Thanks for your answer In fact I knew about that but when I give that address to Xilinx VDMA core, it return an invalid address! I can read the address content. perhaps this is an VDMA issue. Thanks for your hint and driver
The virtual address returned by mmap() is used by the CPU to access the buffer.
You must specify the physical address for DMA.
Try specifying the value of /sys/class/u-dma-buf/udmabuf0/phys_addr
for VDMA.
After I replaced the physical address, problem solved. Thank you for your time and precious guidance.
Hi, I'm trying to use u-dma-buffer on my ultra96 board. here is my device tree /include/ "system-conf.dtsi" / { reserved-memory {
address-cells = <2>;
};
below is part of linux boot report
linux version is 4.14
I read whole the related issues but can't fix the problem.
hope you can guide me.