I have two hawkeye 64MP cameras connected to a Pi5 with 4GB.
Both work fine in isolation, or together at 16MP, but when I run the two together at 64MP I get this error:
kernel: failed to map scatterlist
kernel: Error getting dmabuf scatterlist
I think this is just running out of CMA memory. I believe I’ve set this to its maximum - if I specify anymore it seems to default to a lower amount. So my /boot/firmware/config.txt looks like this:
[all]
dtoverlay=vc4-kms-v3d,cma-512
dtoverlay=arducam-64mp,cam0
dtoverlay=arducam-64mp,cam1
dtoverlay=arducam-64mp
The kernel confirms the CMA size on boot:
kernel: Memory: 3550064K/4190208K available (12352K kernel code, 2172K rwdata, 4076K rodata, 4288K init, 1083K bss, 115856K reserved, **524288K cma-reserved**)
So I’m wondering if there is anything else I can do to reduce memory usage/increase allocation without losing the 64MP resolution? I’ve already turned off the raw stream - using Picamera2, here’s my python code to configure the camera:
self.cam.start_preview(Preview.NULL)
config = self.cam.create_still_configuration(queue = False, buffer_count = 1, raw = None)
And here’s what the camera reports its full configuration as:
{'use_case': 'still',
'transform': <libcamera.Transform 'identity'>,
'colour_space': <libcamera.ColorSpace 'sYCC'>,
'buffer_count': 1,
'queue': False,
'main': {'format': 'BGR888', 'size': (9152, 6944)},
'lores': None,
'raw': None,
'controls': {'NoiseReductionMode': <NoiseReductionModeEnum.HighQuality: 2>,
'FrameDurationLimits': (100, 1000000000)},
'sensor': {},
'display': None,
'encode': None}
Note that I do later set the noise reduction to be ‘off’.
So I think I’m doing all I can to save memory. I’d be grateful for any other tips to enable taking two 64MP photos at the same time.
Cheers!