Open L123ee opened 1 year ago
You can increase the CMA size in the Linux kernel with the following bootargs in your device tree:
chosen { setenv bootargs " earlycon console=ttyPS1,115200 clk_ignore_unused root=/dev/ram0 rw init_fatal_sh=1 cma=1200M" };
你发给我的邮件已收到! ——王振华
hi @L123ee .Have you solved this problem? My CMA capacity is 256MB and I also get the same error
root@debian:/proc# dmesg | grep cma
[ 0.000000] cma: Reserved 256 MiB at 0x00000000f0000000
[ 0.000000] Memory: 3774496K/4192256K available (7046K kernel code, 4956K rwdata, 4096K rodata, 2158K init, 316K bss, 155616K reserved, 262144K cma-reserved)
[ 1545.942406] axidma: axidma_chrdev.c: axidma_mmap: 283: Please make sure that you specified cma=<size> on the kernel command line, and the size is large enough.
[ 1549.318456] axidma: axidma_chrdev.c: axidma_mmap: 283: Please make sure that you specified cma=<size> on the kernel command line, and the size is large enough.
When i test. " axidma-benchmark" application, print this error: """ AXI DMA Benchmark Parameters: Transmit Buffer Size: 7.91 Mb Receive Buffer Size: 7.91 Mb vma->vm_start = 0xb6659000 dma_alloc->user_addr = b6659000 dma_alloc->dma_addr=0x72612d78 vma->vm_page_prot = 0x71f
axidma axidma: coherent DMA mask is unset dma_alloc->size = 0x007e9000 axidma: axidma_chrdev.c: axidma_mmap: 294: Unable to allocate contiguous DMA memory region of size 8294400. axidma: axidma_chrdev.c: axidma_mmap: 296: Please make sure that you specified cma= on the kernel command line, and the size is large enough.
Unable to allocate transmit buffer from the AXI DMA device.: Cannot allocate memory
"""
32M of CMA memory has been configured in the kernel。
what may be the above problem and how to solve it?