Skip to content

temp/libcamera: Use udmabuf by default

Administrator requested to merge libcamera-udmabuf into master

Depends on !5584 (merged), !5585 (merged) and !5586 (merged)

udmabufs appears to be the better solution for buffer allocation than CMA heaps and distros like Fedora will use them by default for the libcamera swISP. Notably systemd 257 will allow users to use them by default.

They use "normal" memory allocation which has several benefits:

  1. No "reservation" required, thus no size limit and no blocking of memory.
  2. Allocation size is properly attributed, cgroup limits are enforced etc.

The big disadvantage is that they require GPUs to have IOMMUs in order to be able to import buffers without copy. This is the case for all more modern devices - such as (most|all)? qcom ones, but some older ones from the GLES 2.0 era might not have it. Crucially we need to check:

  • Librem5 - works
  • PinePhone - works

and keep CMA enabled there.


Notes:

  • udmabuf support was added to libcamera 0.3.1 following upstream discussion.
  • sdm670 and sdm845 already ship with udmabuf enabled but could now disable CMA reservation

See also:

  1. https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2174#note_2081391111
  2. !5399 (comment 2077524825)
Edited by Administrator

Merge request reports

Loading