Hello,
I am currently trying to allocate a bit more than 2 GB of buffer via the VIDIOC_REQBUFS ioctl of V4L2 on a Jetson Xavier working with L4T 31.1
Our image size is 566442562 = 48 211 968 Bytes and we need to allocate 36 buffers for our application.
I noticed that the current maximum number of buffer is 32.
The dmesg output is the following
[ 330.080662] Unable to handle kernel NULL pointer dereference at virtual address 00000020
[ 330.088563] Mem abort info:
[ 330.091547] ESR = 0x96000005
[ 330.094774] Exception class = DABT (current EL), IL = 32 bits
[ 330.100791] SET = 0, FnV = 0
[ 330.103876] EA = 0, S1PTW = 0
[ 330.107078] Data abort info:
[ 330.109978] ISV = 0, ISS = 0x00000005
[ 330.113896] CM = 0, WnR = 0
[ 330.117055] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc3a2ea6000
[ 330.123353] [0000000000000020] *pgd=0000000000000000, *pud=0000000000000000
[ 330.130924] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 330.136699] Modules linked in:
[ 330.139630] CPU: 3 PID: 10671 Comm: user_process_camera_ Not tainted 4.9.108+ #124
[ 330.146930] Hardware name: jetson-xavier (DT)
[ 330.151394] task: ffffffc36b921c00 task.stack: ffffffc3ed81c000
[ 330.157458] PC is at iommu_dma_alloc_iova+0xdc/0x130
[ 330.162502] LR is at iommu_dma_alloc_iova+0xdc/0x130
[ 330.167491] pc : [<ffffff80086d6a24>] lr : [<ffffff80086d6a24>] pstate: 80400145
[ 330.174925] sp : ffffffc3ed81f870
[ 330.178337] x29: ffffffc3ed81f880 x28: 0000000000000000
[ 330.183849] x27: 000000000000003f x26: ffffffc3ec0a4fb8
[ 330.189376] x25: 0000000000000000 x24: 0000000000000000
[ 330.194977] x23: 0000000000000001 x22: 000000ffffffffff
[ 330.200910] x21: ffffffc3ec347800 x20: 0000000000002dfb
[ 330.206086] x19: 000000000000000c x18: 0000000000000010
[ 330.211863] x17: 0000007fb7d40b10 x16: ffffff80082622c0
[ 330.217376] x15: 0000000000000006 x14: 64656e67696c615f
[ 330.223313] x13: 657a69732c32313d x12: 7466696873206666
[ 330.229088] x11: 6666666666666666 x10: 203d74696d696c5f
[ 330.234613] x9 : 00000000000007b8 x8 : 00000000000000c8
[ 330.240677] x7 : ffffff8009ed4f88 x6 : ffffffc3ffdf6c30
[ 330.246155] x5 : ffffffc370f65940 x4 : ffffffc3ffe03c80
[ 330.251236] x3 : 0000000000008183 x2 : ffffffc370f65900
[ 330.256825] x1 : 0000000000000009 x0 : 0000000000000000
[ 330.261910]
[ 330.263340] Process user_process_camera_ (pid: 10671, stack limit = 0xffffffc3ed81c028)
[ 330.270481] Call trace:
[ 330.272861] [<ffffff80086d6a24>] iommu_dma_alloc_iova+0xdc/0x130
[ 330.278706] [<ffffff80086d6fe8>] iommu_dma_alloc+0x378/0x450
[ 330.284053] [<ffffff80080a1e74>] __iommu_alloc_attrs+0xac/0x3f8
[ 330.289685] [<ffffff8008b5e198>] vb2_dc_alloc+0x140/0x1a0
[ 330.294720] [<ffffff8008b5728c>] __vb2_queue_alloc+0x15c/0x430
[ 330.300316] [<ffffff8008b58410>] vb2_core_reqbufs+0x148/0x348
[ 330.305397] [<ffffff8008b5b2c8>] vb2_ioctl_reqbufs+0x78/0xa8
[ 330.310994] [<ffffff8008b3d378>] v4l_reqbufs+0x50/0x60
[ 330.315546] [<ffffff8008b3bcec>] __video_do_ioctl+0x24c/0x2b8
[ 330.321141] [<ffffff8008b3b694>] video_usercopy+0x2cc/0x688
[ 330.326391] [<ffffff8008b3ba8c>] video_ioctl2+0x3c/0x50
[ 330.331382] [<ffffff8008b362a0>] v4l2_ioctl+0xf8/0x128
[ 330.336722] [<ffffff8008261a78>] do_vfs_ioctl+0xb0/0x8f8
[ 330.342227] [<ffffff8008262354>] SyS_ioctl+0x94/0xa8
[ 330.347228] [<ffffff8008083580>] el0_svc_naked+0x34/0x38
[ 330.352393] ---[ end trace 733c07b2a206b1e2 ]---
How can we increase the DMA memory size to allocate more buffers ?
Thanks in advance,