This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to increase CMA memory for OpenGL ?
#6
Eric Arnholt responded:

Hi Eric,

I am getting an error message from your VC4 code.
It happens infrequently but approximately once a day if the system is in
use.
The distribution is specific for marine navigation: OpenPlotter
http://sailoog.com/openplotter
The application that I think is causing the problem is a marine charting
program called OpenCPN.
It displays a moving map display and other information, sometimes quilting
together several charts to create the display. There is also rotation for
course up modes and display of other information such as routes and tracks.

The error that I see is:

pi@openplotter:~ $ dmesg

[21965.710804] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from
CMA:
[21965.710817] [drm] V3D: 176852kb BOs (345)
[21965.710821] [drm] V3D shader: 412kb BOs (100)
[21965.710824] [drm] dumb: 3088kb BOs (2)
[21965.710833] vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile
binning: -12. You may need to enable CMA or give it more memory.
pi@openplotter:~ $

I am not suggesting that this is an error in your code, I may simply be
running out of Graphics memory.
It appears that the memory is already set at 256M.


pi@openplotter:~ $ dmesg | grep cma

[ 0.000000] cma: Reserved 256 MiB at 0x1ec00000

[ 0.000000] Kernel command line: 8250.nr_uarts=0 cma=256M
bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=768 bcm2708_fb.fbswap=1
vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0
console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4
elevator=deadline fsck.repair=yes rootwait

[ 0.000000] Memory: 685600K/970752K available (8192K kernel code, 612K
rwdata, 2148K rodata, 1024K init, 821K bss, 23008K reserved, 262144K
cma-reserved)

[ 3.600272] vc_sm_cma: module is from the staging directory, the
quality is unknown, you have been warned.

[ 3.602447] bcm2835_vc_sm_cma_probe: Videocore shared memory driver

pi@openplotter:~ $



I see that you have implemented a patch to allow more than 256M, but I'm
not sure if that is in the Kernel version I am using ( 4.19.30-v7+) ?

Response:
It's already in. You can hack your kernel build to increase the value
in the overlay, but honestly if you're running out at 256, another 128
or so (you can't go too high or linux will just fail) likely isn't going
to help you, and you probably need to work on slimming down your
application.

So, CMA memory can be increased at Kernal buid time, but, probably not worth it.

I will persue this on the OpenCPN fourm.
Reply


Messages In This Thread
RE: How to increase CMA memory for OpenGL ? - by NahanniV - 2019-04-06, 02:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)