-
Notifications
You must be signed in to change notification settings - Fork 5.2k
CMA not working with Kernels 3.12.y #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note that this is possibly related to the new CONFIG_DMA_CMA config option, which is not enabled in the defconfigs... Recompiling the kernel 3.12 kernel with this enabled to see if this solves the issue... Martin |
Well - now with CONFIG_DMA_CMA configured the original error is gone! BUT - now there are issues allocating some DMA-memory for the USB and SD card driver...
The full booting sequence now looks like this:
So there is still an issue somewhere... |
found out that from now on you have to use the cma=16M in /boot/cmdline.txt for everything to work. So please add that to the default_configs of the kernel ... |
actually you can define |
As far as I understand it requires the following diff for the config to make it work with 3.12 and 3.13:
|
I don't know if this is related. But usually (kernel 3.10.y and 3.11.y I'm able to increase the max sample rate using HDMI from 48kHz to 192kHz. Changed to: However, using kernel 3.12.6 and 3.12.7 I'm unable to do this. The module builds without error, but somehow the card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] is not present. |
Ok - the patch above does not handle everything correctly - the camera stops to work and I get messages like this when running rpi-still:
This may also be related to changes to the CMA infrastructure, because without CMA everything works as expected... Seems as if drivers/char/broadcom/vc_cma/vc_cma.c needs to get reviewed for necessary changes. For now I will run without CMA. |
I also have issues with cma when it is enabled. Uname http://codepad.org/vj0i85Hw dmesg http://codepad.org/so1Tvc0j .. the error happens when I start xbmc, the screen turns white an I have to kill over ssh. |
It seems that with 3.12.y two CMA regions are created:
The way I understand the problem, is that when the Videocore nudges that it wants to borrow a little bit of extra memory from ARM, the vc_cma code requests some CMA space from the kernel, but gets assigned a piece from region 1, while it was expecting to receive from 2, and it complains about that with that error message. You can teach Linux to treat pool 2 as a private pool, and always assign the vc_cma code memory from there, and all other modules from pool 1 by reverting this patch: 6e1f8bc |
Hi!
CMA settings are not working with kernels 3.12 and later - this is related to #503, but in a much broader context than just a fixed memory split, so a different ticket as it may or may not be related.
So here in summary again:
booting with the following config.txt:
and kernel parameters
coherent_pool=6M smsc95xx.turbo_mode=N ...
works perfectly fine on a 3.11 kernel (8f768c5) but on a 3.12 (a93bfa0) and 3.13(6928683) kernel it does not work and some memory allocations fail making the Network fail to work.
Seems as if this is mostly related to a change in the early memory management of coherent dma memory regions...
Here the "offending" lines in the dmesg messages (which unfortunately do not make it into /var/log/messages, why is an open question and hinders debugging a bit...)
So there are 2 issues:
First a cosmetic missing newline in the format string of "-> initial 0, size 14c00000, base a000000" (in 3.12 in file drivers/char/broadcom/vc_cma/vc_cma.c on line 178)
And secondly the failed
dma_declare_contiguous(14c00000,a000000)
call.This is probably related to changes that have occurred in the upstream kernels with either commit f825c73 or a254738 and are probably related to configs having moved to different locations....
Martin
P.s: all kernels have been compiled with the default configs shipped with that specific kernel (
make bcmrpi_defconfig
)The text was updated successfully, but these errors were encountered: