Max Buffer Count for RAW & ISP captures

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.10.0
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
2.1.0
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Issue Description
Hi team, is there a limit on the max number of buffers we can register for RAW & ISP captures? Does the limit reduce as the number of cameras increase? I am running 8 4k cameras, and it seems like I am only allowed to register 7x RAW buffers and any higher throws NvSciError_ResourceError with these output NvMapMemAllocInternalTagged: 1075858947 error 12; NvMapMemHandleAlloc: error 0. Is there a way to increase the amount of memory since it seems like there is enough RAM.

Thanks!

Are you using nvsipl_camera with RAW and ISP outputs enabled and noticed this issue? May I know the camera module details and which API returned NvSciError_ResourceError ? Also, can you check if syslog has any details.

Hi Siva, yes with the later versions of nvsipl_camera, it is possible to specify --bufferAlloc 10 12 12 12 for example to specify the buffer count to use for each output. I tried with 8x 4k cameras with the arg --bufferAlloc 10 10 10 10 and see the syslog below. It runs fine however with --bufferAlloc 7 10 10 10. Running without ISP outputs with 10 RAW buffers also throws the same error.

We are trying out the OV 0X8D cameras and the API that returned the error is NvSciBufObjAlloc().

Syslog reports this:

2025-04-04T01:07:33.934753+08:00 tegra-ubuntu nvsipl_camera: [60113894007706] Module_id 45 Severity 2 : NvRmMemHandleAllocAttr failed. NvError:  6
2025-04-04T01:07:33.934931+08:00 tegra-ubuntu nvsipl_camera: [60113894025798] Module_id 45 Severity 2 : NvSciBufRmAlloc failed
2025-04-04T01:07:33.935059+08:00 tegra-ubuntu nvsipl_camera: [60113894028873] Module_id 45 Severity 2 : allocation failed for allocation type:  0
2025-04-04T01:07:33.935169+08:00 tegra-ubuntu nvsipl_camera: [60113894031928] Module_id 45 Severity 2 : Could not allocate buffer from allocation interface
2025-04-04T01:07:33.935292+08:00 tegra-ubuntu nvsipl_camera: [60113894034641] Module_id 45 Severity 2 : NvSciBufObj Getting attr failed

Dear @samuel.ongzx ,
I notice below information in /drive/drive-linux/include/NvSIPLCamera.hpp#531 in DRIVE OS 6.0.10 docker

     * @li Supported number of images that can be registered:
     *   @li [3, 40] for ICP output (live capture)
     *   @li [1, 40] for ICP output (reprocess mode) : Non-Safety
     *   @li [1, 64] for ISP outputs

Does this help to clarify?

Hi Siva, thanks for the prompt response!

Is the max count of 40 images for ICP output per camera stream, per platform, per process or per Orin? I could run 10x ICP buffers per camera stream for 6x 4k cameras, and 7x ICP buffers per camera stream for 8x 4k cameras. That seems like a cap of 60-ish ICP frames per Orin.

Hi @SivaRamaKrishnaNV, any updates on what is the buffer limit per camera / platform? It seems to me that it should be 40 per camera, so the 7x ICP buffer limit I am facing for 8x 4k cameras seems to be a bug.

Dear @samuel.ongzx ,
May I know the used DRIVE OS release?

I see the bufferAlloc is not enabled in DRIVE OS 6.0.10 release.

Hi @SivaRamaKrishnaNV just got around confirming this on our AGX Drive Orin development kit. We hooked up 7x 4k cameras, and modified CUtils.hpp of nvsipl_camera and changed NUM_CAPTURE_BUFFERS_PER_POOL.

Without running ISP, just RAW captures, we are able to allocate up to 13 RAW buffers for the 7x cameras. That seems to imply a limit of (3840 * 2160 * 2 (12bpp) * 13 buffers * 7 cams) = 1.51GB of memory limit before we get the BufferAlloc error.

Could we clarify what does the 40 buffer limit for ICP output (live capture) specified in NvSIPLCamera.hpp mean and how does it apply when streaming multiple cameras? It would be great to point us to how we can increase this buffer limit.

Hi @SivaRamaKrishnaNV any updates on the Orin memory limit of ~1.5GB for allocating RAW capture buffers?

Dear @samuel.ongzx ,
can you check modifying eserved-memory.generic_carveout.size in the dtsi file tegra234-p3710-0010-linux-gos.dtsi and reflash to see if it helps to increase the limit.

tegra-carveouts {
                dont-convert-iovmm-to-carveout;
                memory-region = <&generic_reserved &fsi_reserved>;
        };

        reserved-memory {
                generic_carveout {
                        size = <0 0x60000000>;
                        status = "okay";
                };
        };

Thank you! I will try it out and report back if it doesn’t work!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.