Part Number:am5728
I use ti-processor-sdk-linux-am57xx-evm-03.03.00.04 on am5728
And want to allocate buffers for capture video. My dts:
reserved-memory {
#address-cells = <0x2>;
#size-cells = <0x2>;
ranges;
ipu1_cma@9d000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x9d000000 0x0 0x2000000>;
reusable;
status = "okay";
linux,phandle = <0xb5>;
phandle = <0xb5>;
};
ipu2_cma@95800000 {
compatible = "shared-dma-pool";
reg = <0x0 0x95800000 0x0 0x3800000>;
reusable;
status = "okay";
linux,phandle = <0xba>;
phandle = <0xba>;
};
dsp1_cma@99000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x99000000 0x0 0x4000000>;
reusable;
status = "okay";
linux,phandle = <0xc2>;
phandle = <0xc2>;
};
dsp2_cma@9f000000 {
compatible = "shared-dma-pool";
reg = <0x0 0x9f000000 0x0 0x800000>;
reusable;
status = "okay";
linux,phandle = <0x127>;
phandle = <0x127>;
};
cmem_block_mem@a0000000 {
reg = <0x0 0xa0000000 0x0 0xA000000>;
no-map;
status = "okay";
linux,phandle = <0x131>;
phandle = <0x131>;
};
myblock: cmem_block_mem@aa000000 {
reg = <0x0 0xaa000000 0x0 0x2000000>;
no-map;
status = "okay";
};
cmem_block_mem@40500000 {
reg = <0x0 0x40500000 0x0 0x100000>;
no-map;
status = "okay";
linux,phandle = <0x132>;
phandle = <0x132>;
};
};
cmem {
compatible = "ti,cmem";
#address-cells = <0x1>;
#size-cells = <0x0>;
#pool-size-cells = <0x2>;
status = "okay";
cmem_block@0 {
reg = <0x0>;
memory-region = <0x131>;
cmem-buf-pools = <0x1 0x0 0xA000000>;
};
cmem_block@1 {
reg = <0x1>;
memory-region = <&myblock>;
cmem-buf-pools =<0x6 0x0 0x96000>,<0x6 0x0 0x3f4800>;
};
cmem_block@2 {
reg = <0x2>;
memory-region = <0x132>;
};
};
CMEM loads fine
root@am57xx-evm:~# cat /proc/cmem
Block 0: Pool 0: 1 bufs size 0xa000000 (0xa000000 requested)
Pool 0 busy bufs:
Pool 0 free bufs:
id 0: phys addr 0xa0000000
Block 1: Pool 0: 6 bufs size 0x96000 (0x96000 requested)
Pool 0 busy bufs:
Pool 0 free bufs:
id 0: phys addr 0xabf6a000
id 1: phys addr 0xabed4000
id 2: phys addr 0xabe3e000
id 3: phys addr 0xabda8000
id 4: phys addr 0xabd12000
id 5: phys addr 0xabc7c000
Block 1: Pool 1: 6 bufs size 0x3f5000 (0x3f4800 requested)
Pool 1 busy bufs:
Pool 1 free bufs:
id 0: phys addr 0xab887000
id 1: phys addr 0xab492000
id 2: phys addr 0xab09d000
id 3: phys addr 0xaaca8000
id 4: phys addr 0xaa8b3000
id 5: phys addr 0xaa4be000
But sample program not works:
CMEM_AllocParams prms;
prms.alignment = 0;
prms.flags = CMEM_NONCACHED;
prms.type = CMEM_POOL;
CMEM_init();
void* ptr = CMEM_alloc(640*480*2,&prms);
printf("Got buffer %08X\n",ptr);
CMEM_free(ptr,&prms);
CMEM_exit();
CMEM Error: registerAlloc: ioctl CMEM_IOCREGUSER failed for phys addr 0xa0000000: -1
TIOCL FATAL: The TI Multicore Tools daemon (/usr/bin/ti-mctd) is not running. Re-run application after starting the daemon. Refer User Guide for details.
When try to run ti-mctd:
CMEM Error: allocHeap: ioctl CMEM_IOCALLOCHEAPCACHED failed: -1
ti-mctd: /home/gtbldadm/processor-sdk-linux-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/opencl/1.1.12.0-r0.0/git/host/mct-daemon/cmem_allocator.h:94: CmemAllocator::CmemAllocator(): Assertion `msmc_alloc_dsp_addr_ == msmc_addr' failed.