Open sombohan opened 3 years ago
Thank you for the issue
Check the boot log. Is the CMA area reserved? If so, you will see a message similar to the following in the boot log:
[ 0.000000] Reserved memory: created CMA memory pool at 0x38000000, size 128 MiB
[ 0.000000] OF: reserved mem: initialized node image_buf@1, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x30000000, size 128 MiB
[ 0.000000] OF: reserved mem: initialized node image_buf@0, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 16 MiB at 0x2f000000
Please also refer to #45.
Hi thank you for the quick response. Unfortunately I've tried the examples in your referenced thread. Without success, I've tried to use instead the dynamic variant of cma by supplying the size parameter but the only output in the log is: node linux,cma compatible matching fail
So I don't pass the cma stuff to get the u-dma-buf running.
Regards,
Sombohan
I've found thr reason for the -22. The CONFIG_DMA_CMA has to be set too.
Now after trying around. I can allocate 256MiB by CMA but if I try to use the complete chunk for one buffer its getting error -12 is there any extra space needed in u-dma-buf?
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
image_buf0: image_buf@0 {
compatible = "shared-dma-pool";
reusable;
size = <0x10000000>;
label = "image_buf0";
};
};
udmabuf@0 {
compatible = "ikwzm,u-dma-buf";
device-name = "udmabuf0";
size = <0x10000000>; // 256MiB
memory-region = <&image_buf0>;
};
Regards,
Sombohan
Hi,
I'm trying to include the module to my Kernel 5.4.54 the cma module is enabled in the menuconfig my device tree is configured as following.
The output of insmod:
How to resolve the error? Am I missing some extra configuration step in the kernel menuconfig?
What I want to accomplish: Reserving 2x 128MB of space for DMA Transfers.
Regards,
Sombohan