[PATCH v2 4/4] arm64: dts: qcom: x1-dell-thena: bump linux,cma to 256 MiB
Val Packett
val at packett.cool
Wed May 20 20:52:47 PDT 2026
On 5/20/26 10:09 PM, Michael Scott wrote:
> The 128 MiB linux,cma reserved-memory pool on dell-thena is too small
> to support the camera pipeline in parallel with the normal Linux
> desktop. On a freshly-booted system with GNOME running, the typical
> runtime consumers — msm DRM framebuffers (Wayland triple buffering on
> the eDP panel), qcom_iris video codec buffers, qcom_camss VFE
> pre-allocated buffers — already occupy ~100 MiB of the pool, leaving
> only ~25 MiB free.
Huh, I'm surprised that drm framebuffers use CMA… IIRC, msm drm can work
fine without a cma node present at all.
Indeed, with a desktop on a 4K monitor I'm seeing..
CmaTotal: 131072 kB
CmaFree: 1704 kB
> The libcamera "simple" pipeline handler used by /dev/media0 on
> dell-thena allocates four ABGR8888 frames at 1920×1088 = 32 MiB total.
> That request fails on the fourth frame:
>
> ERROR DmaBufAllocator: dma-heap allocation failure for frame-3
> ERROR Allocator: Stream is not part of /base/.../camera at 10 active configuration
> Can't allocate buffers
> Failed to start camera session
>
> resulting in gnome-snapshot's "Could not play camera stream" and any
> other libcamera-mediated app being unable to actually stream.
..however I couldn't reproduce any failures, Snapshot started up just
fine, lowering CmaFree to 300 kB.
I have even launched both Snapshot and ffplay with a 4K AV1 video
through av1_v4l2m2m, CmaFree went all the way down to zero but there
were no errors whatsoever, both worked simultaneously just fine. o_0
I think drm buffers might just get evicted from that area or something?
> Bumping linux,cma to 256 MiB (a 0.9% reservation on these laptops'
> typical 27 GiB RAM) leaves ~150 MiB free at runtime — sufficient for
> the libcamera buffer set plus headroom for video playback or other
> CMA-hungry workloads in parallel.
>
> Tested on Dell Latitude 7455: with the 256 MiB pool, CmaFree at
> GNOME-desktop idle is ~150 MiB, gnome-snapshot streams the OV02E10
> camera cleanly, and `cam -c 1 --capture=2` succeeds.
>
> The companion board files dell-inspiron-14-plus-7441 and the upstream
> .dts variants inherit from x1-dell-thena.dtsi, so this changes the
> pool size for every dell-thena-based laptop in one place.
In any case, that's not an objection of course, just wondering why it's
working fine for me and not for you..
Acked-by: Val Packett <val at packett.cool>
~val
More information about the linux-phy
mailing list