I'm running a custom board on AM5728 with SDK version 5.02 5.0.0.15 (kernel 4.14) and these KM/UM:
root@apex:~# dmesg | grep -i pvr
[ 4.774385] [drm] Initialized pvr 1.14.3699939 20110701 for 56000000.gpu on minor 1
I have set the CMA to 240MB from the device tree:
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
cmem_block_mem_0: cmem_block_mem@ba300000 {
compatible = "shared-dma-pool";
reg = <0x0 0xba300000 0x0 0x0f000000>;
no-map;
status = "okay";
};
.
.
.
};
cmem {
compatible = "ti,cmem"; // must be "ti,cmem"
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
cmem_block_0: cmem_block@0 {
reg = <0>;
memory-region = <&cmem_block_mem_0>;
cmem-buf-pools = <1 0x0f000000>; // 1x240MB
};
.
.
.
};
I can see that it's been allocated to 240MB:
root@apex:~# cat /proc/cmem
Block 0: Pool 0: 1 bufs size 0xf000000 (0xf000000 requested)
Pool 0 busy bufs:
Pool 0 free bufs:
id 0: phys addr 0xba300000
Block 1: Pool 0: 1 bufs size 0x2000000 (0x2000000 requested)
Pool 0 busy bufs:
Pool 0 free bufs:
id 0: phys addr 0x99000000
However, it looks like the PowerVR Tiler Memory (128MB) is still being used:
root@apex:~# ps aux | grep -i weston-simple-egl
root 1718 1.4 0.5 29044 9392 pts/0 S 12:40 0:01 weston-simple-egl -f
root 1720 1.5 0.5 29044 9324 pts/0 S 12:40 0:01 weston-simple-egl -f
root 1722 1.5 0.5 29040 9408 pts/0 S 12:40 0:01 weston-simple-egl -f
root 1726 1.6 0.5 29044 9352 pts/0 S 12:41 0:00 weston-simple-egl -f
root 1731 1.5 0.5 29044 9328 pts/0 S 12:41 0:00 weston-simple-egl -f
root 1734 1.5 0.5 29040 9340 pts/0 S 12:41 0:00 weston-simple-egl -f
root@apex:~# cat /sys/kernel/debug/dri/0/gem
All Objects:
02000003: 11 ( 3) 00016f3c 0x7806b000 ( 2) (null) 0 8294400
02000003: 12 ( 3) 00016753 0x78854000 ( 2) (null) 0 8294400
02000003: 9 ( 3) 00015f6a 0x7903d000 ( 2) (null) 0 8294400
02000003: 10 ( 3) 00015781 0x79826000 ( 2) (null) 0 8294400
02000003: 7 ( 3) 00014f98 0x7a00f000 ( 2) (null) 0 8294400
02000003: 8 ( 3) 000147af 0x7a7f8000 ( 2) (null) 0 8294400
02000003: 5 ( 3) 00013fc6 0x7afe1000 ( 2) (null) 0 8294400
02000003: 6 ( 3) 000137dd 0x7b7ca000 ( 2) (null) 0 8294400
02000003: 3 ( 3) 00012ff4 0x7bfb3000 ( 2) (null) 0 8294400
02000003: 4 ( 3) 0001280b 0x7c79c000 ( 2) (null) 0 8294400
02000003: 1 ( 3) 00012022 0x7cf85000 ( 2) (null) 0 8294400
02000003: 2 ( 3) 00011839 0x7d76e000 ( 2) (null) 0 8294400
02000003: 0 ( 4) 00010fd2 0x7dfd5000 ( 1) (null) 0 8294400
02000003: 0 ( 4) 000107e9 0x7e7be000 ( 1) (null) 0 8294400
02000003: 0 ( 4) 00010000 0x7efa7000 ( 2) (null) 0 8294400
02000003: 0 ( 1) 00000000 0x7f790000 ( 1) f1bfa000 0 8847360
Total 16 objects, 133263360 bytes
How do I use the CMA as the buffer and not the Tiler? Ty!