agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
539 stars 415 forks source link

cma=64M in /boot/cmdline.txt causes libcamera-apps to fail for full resolution image capture #1095

Closed tewarid closed 2 years ago

tewarid commented 2 years ago

Is there any need to set cma=64M in /boot/cmdline.txt by default any more given that it causes libcamera-apps to fail for full resolution image capture?

https://github.com/agherzan/meta-raspberrypi/blob/c57b464b88769c1336695e48e1eb8f35e258b9ae/recipes-bsp/bootfiles/rpi-cmdline.bb#L16

agherzan commented 2 years ago

@tewarid We would need to dig a bit into history to figure that out. I'm not using the camera directly so I haven't checked it out. Are you able to dig a bit into it?

tewarid commented 2 years ago

@agherzan Thanks - will do that.

tewarid commented 2 years ago

This was added by 8827040d9c218f68ae3ee6a5814929888ed61581 and hasn't been changed since. It sets cma=64M value when RASPBERRYPI_CAMERA_V2 = "1".

Raspberry Pi camera docs and cmdline.txt docs do not mention cma, so whatever the historical reason was to use that particular value no longer seems relevant.

The default cma values in kernel are way higher than the value specified in cmdline.txt

cat /proc/meminfo | grep -i cma
CmaTotal:         262144 kB
CmaFree:          242468 kB

Looks like we can let the kernel handle cma.