I couldn’t see anywhere a configuration file to change the amount of RAM we can reserve for GPU. If this is dynamically allocated (GPU auto takes more RAM when it needs) or we have to say it in a config.
This could help a game/emulator runs if we increase this amount, so maybe this could be an interesting thing to know.
Here they explain how to reserve for sunxi kernel, but our u-boot doesn’t have a config file:
https://linux-sunxi.org/Cedrus/libvdpau-sunxi
There are mentions about reserving memory to CMA in kernel that seems to be our case. So in kernel we could allocate more memory setting:
CONFIG_CMA=y
CONFIG_CMA_SIZE_MBYTES=64
64MB is what we have in our kernel, I changed it to 256MB, but I don’t actually know if the GPU is taking it or not. I still see the same memory available for use when I ran free
:
cpi@clockworkpi:~$ free -m
total used free shared buff/cache available
Mem: 1004 58 788 9 157 915
Swap: 0 0 0
But now I can see that CMA changed:
cpi@clockworkpi:~$ dmesg | grep cma
[ 0.000000] cma: Reserved 256 MiB at 0x60000000
[ 0.000000] Memory: 765360K/1048276K available (7168K kernel code, 407K rwdata, 1760K rodata, 1024K init, 255K bss, 20772K reserved, 262144K cma-reserved, 261832K highmem)
So, how I can see the memory reserved for GPU? Is it possible to change?
Best regards