Page 1 of 1

GPU memory problem

Posted: Tue Sep 25, 2018 8:39 am
by gounthar
Hi,

a friend of mine has a really nice development environment based on ArchLinux, so I thought I could give it a try with the 3B+.
I almost installed everything, but I am facing some memory issue:

Code: Select all

[   55.989445] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   56.006893] [drm]                         kernel:   8100kb BOs (1)
[   56.023581] [drm]                            V3D:  50824kb BOs (19)
[   56.040312] [drm]                     V3D shader:     80kb BOs (20)
[   56.056912] [drm]                           dumb:     48kb BOs (3)
[   56.073536] [drm]                total purged BO:    264kb BOs (7)
[   56.090483] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   56.107844] [drm]                         kernel:   8100kb BOs (1)
[   56.124491] [drm]                            V3D:  50824kb BOs (19)
[   56.141166] [drm]                     V3D shader:     80kb BOs (20)
[   56.157832] [drm]                           dumb:     48kb BOs (3)
[   56.174388] [drm]                total purged BO:    264kb BOs (7)
I changed (ok, wild guesses) a few parameters, but I still have the problem:

Code: Select all

cat /boot/cmdline.txt
coherent_pool=6M smsc95xx.turbo_mode=N cma=128
poddingue in ~ at numeriquelles ➜ cat /boot/config.txt
enable_uart=1
gpu_mem=128
cma_lwm=16
cma_hwm=256
Would you have any suggestion?

Thanks.

Re: GPU memory problem

Posted: Tue Sep 25, 2018 12:46 pm
by cjan
to my knowledge, enable VC4 drive no need to add gpu_mem & cma.

Re: GPU memory problem

Posted: Tue Sep 25, 2018 1:28 pm
by gounthar
Thanks.
So, should I add something like that in config.txt?

Code: Select all

dtoverlay=vc4-kms-v3d
Probably not, as I got:

Code: Select all

[   30.204209] vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12. You may need to enable CMA or give it more memory.
[   30.217054] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   30.224165] [drm]                         kernel:   8100kb BOs (1)
[   30.230528] [drm]                            V3D:  49704kb BOs (15)
[   30.236915] [drm]                     V3D shader:     56kb BOs (14)
[   30.243352] [drm]                           dumb:     48kb BOs (3)
[   30.249664] [drm]                total purged BO:     12kb BOs (3)
Thanks.

Re: GPU memory problem

Posted: Wed Oct 03, 2018 4:20 pm
by gounthar
Sorry to bump this thread...
I am supposed to lead a small workshop at the University next week regarding collaborative development with a limited budget.
I'm ready for the Raspberry Pi Gitlab-ce server, Raspberry Pi Gitlab-ci runner, but I'm stuck with this Raspberry Pi development machine...
I know it was a bit ambitious for this machine running Atom/i3wm and so on, and I even don't know if this could work regarding memory constraints and my ArchLInux/Raspberry knowledge, but I'd like to go to the end... so that I know it could work (or not).
Could anyone give me a hint?
Thanks.

Re: GPU memory problem

Posted: Thu Oct 04, 2018 9:25 am
by jamesh
gounthar wrote:
Wed Oct 03, 2018 4:20 pm
Sorry to bump this thread...
I am supposed to lead a small workshop at the University next week regarding collaborative development with a limited budget.
I'm ready for the Raspberry Pi Gitlab-ce server, Raspberry Pi Gitlab-ci runner, but I'm stuck with this Raspberry Pi development machine...
I know it was a bit ambitious for this machine running Atom/i3wm and so on, and I even don't know if this could work regarding memory constraints and my ArchLInux/Raspberry knowledge, but I'd like to go to the end... so that I know it could work (or not).
Could anyone give me a hint?
Thanks.
Sorry, not idea what you are actually asking, and what it has to do with the thread title.

Re: GPU memory problem

Posted: Thu Oct 04, 2018 10:46 am
by gounthar
I'm asking for some help on how to handle the memory sharing between the GPU and CPU for my use case, which is (supposed to be) a fancy development environment under ArchLinux.
If this ever succeeds, I will use it in a workshop next week at the local university.
Thanks.

Re: GPU memory problem

Posted: Thu Oct 04, 2018 11:42 am
by jamesh
gounthar wrote:
Thu Oct 04, 2018 10:46 am
I'm asking for some help on how to handle the memory sharing between the GPU and CPU for my use case, which is (supposed to be) a fancy development environment under ArchLinux.
If this ever succeeds, I will use it in a workshop next week at the local university.
Thanks.
Just use the default I would think.

Re: GPU memory problem

Posted: Wed Jan 09, 2019 2:15 pm
by luntik2012
the same problem on rpi3 b+ and archlinux from http://os.archlinuxarm.org/os/ArchLinux ... est.tar.gz

Code: Select all

[   26.864213] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   26.871275] [drm]                            V3D:  51120kb BOs (48)
[   26.877632] [drm]                     V3D shader:     56kb BOs (14)
[   26.884030] [drm]                           dumb:   8148kb BOs (4)
[   26.890330] [drm]                total purged BO:   8236kb BOs (5)
[   26.896904] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   26.903931] [drm]                            V3D:  51052kb BOs (46)
[   26.910322] [drm]                     V3D shader:     56kb BOs (14)
[   26.916680] [drm]                           dumb:   8148kb BOs (4)
[   26.922969] [drm]                total purged BO:   8236kb BOs (5)
[   26.929682] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   26.936664] [drm]                            V3D:  51052kb BOs (46)
[   26.943072] [drm]                     V3D shader:     56kb BOs (14)
[   26.949460] [drm]                           dumb:   8148kb BOs (4)
[   26.955729] [drm]                total purged BO:   8236kb BOs (5)
[   26.962034] vc4_v3d 3fc00000.v3d: Failed to allocate memory for tile binning: -12. You may need to enable CMA or give it more memory.
[   26.974822] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   26.981875] [drm]                            V3D:  51052kb BOs (46)
[   26.988232] [drm]                     V3D shader:     56kb BOs (14)
[   26.994645] [drm]                           dumb:   8148kb BOs (4)
[   27.000939] [drm]                total purged BO:   8236kb BOs (5)
[   27.007531] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[   27.014539] [drm]                            V3D:  51052kb BOs (46)
[   27.020920] [drm]                     V3D shader:     56kb BOs (14)
[   27.027278] [drm]                           dumb:   8148kb BOs (4)
[   27.033638] [drm]                total purged BO:   8236kb BOs (5)

Code: Select all

[[email protected] ~]# cat /boot/config.txt 
#gpu_mem=256
dispmanx_offline=1
#dtoverlay=vc4-fkms-v3d
avoid_warnings=2
dtparam=audio=on
disable_overscan=1
dtoverlay=vc4-kms-v3d
cma_lwm=16
cma_hwm=256
cma_offline_start=16
dtparam=spi=on
[[email protected] ~]# cat /boot/cmdline.txt 
root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait loglevel=0 console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop cma=256M