temp/libcamera: Use udmabuf by default
!5584 (merged), !5585 (merged) and !5586 (merged)
Depends onudmabufs 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:
- No "reservation" required, thus no size limit and no blocking of memory.
- 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:
Edited by Administrator