This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: error when request 4 buffers with resolution 3664x2748 in GRGB8 byer format(mt9j003)

Part Number: AM5728

soc: am5728
sdk: linux-rt 05.03.00.07

I developed an driver for sensor mt9j003(a 10MP sensor with max resolution 3664*2748), and i modified the MAX_W and MAX_H to 4000*4000 in vip.c. it runs okay when i set the format of the sensor to 2592*1944, but when I set the format to 3664*2748, it crashed when i request 4 buffers for in mmap mode. the message as below.


[ 317.072112] vb2-core: __setup_offsets: buffer 0, plane 0 offset 0x00000000
[ 317.079025] vb2-core: __vb2_queue_alloc: call_vb_qop(ee21988c, 0, buf_init) (nop)
[ 317.086548] vb2-core: __vb2_buf_mem_alloc: call_memop(ee21988c, 1, alloc)
[ 317.106887] vb2-core: __setup_offsets: buffer 1, plane 0 offset 0x0099b000
[ 317.113801] vb2-core: __vb2_queue_alloc: call_vb_qop(ee21988c, 1, buf_init) (nop)
[ 317.121324] vb2-core: __vb2_buf_mem_alloc: call_memop(ee21988c, 2, alloc)
[ 317.128151] cma: cma_alloc: alloc failed, req-size: 2459 pages, ret: -12
[ 317.134890] vip 48970000.vip: dma_alloc_coherent of size 10072064 failed
[ 317.141625] vb2-core: __vb2_queue_alloc: failed allocating memory for buffer 2
[ 317.148882] vb2-core: __vb2_queue_alloc: allocated 2 buffers, 1 plane(s) each
[ 317.156054] vb2-core: __vb2_queue_free: call_vb_qop(ee21988c, 0, buf_cleanup) (nop)
[ 317.163748] vb2-core: __vb2_queue_free: call_vb_qop(ee21988c, 1, buf_cleanup) (nop)
[ 317.171443] vb2-core: __vb2_buf_mem_free: call_memop(ee21988c, 0, put)
[ 317.183718] vb2-core: __vb2_buf_mem_free: freed plane 0 of buffer 0
[ 317.190018] vb2-core: __vb2_buf_mem_free: call_memop(ee21988c, 1, put)
[ 317.202263] vb2-core: __vb2_buf_mem_free: freed plane 0 of buffer 1
[ 317.208561] vb2: counters for queue ee21988c:
[ 317.212939] vb2: setup: 1 start_streaming: 0 stop_streaming: 0
[ 317.219147] vb2: wait_prepare: 0 wait_finish: 0
[ 317.224049] vb2: counters for queue ee21988c, buffer 0:
[ 317.229473] vb2: buf_init: 1 buf_cleanup: 1 buf_prepare: 0 buf_finish: 0
[ 317.236554] vb2: buf_queue: 0 buf_done: 0
[ 317.240931] vb2: alloc: 1 put: 1 prepare: 0 finish: 0 mmap: 0
[ 317.247052] vb2: get_userptr: 0 put_userptr: 0
[ 317.251867] vb2: attach_dmabuf: 0 detach_dmabuf: 0 map_dmabuf: 0 unmap_dmabuf: 0
[ 317.259643] vb2: get_dmabuf: 0 num_users: 0 vaddr: 0 cookie: 0
[ 317.265853] vb2: counters for queue ee21988c, buffer 1:
[ 317.271284] vb2: buf_init: 1 buf_cleanup: 1 buf_prepare: 0 buf_finish: 0
[ 317.278364] vb2: buf_queue: 0 buf_done: 0
[ 317.282742] vb2: alloc: 1 put: 1 prepare: 0 finish: 0 mmap: 0
[ 317.288862] vb2: get_userptr: 0 put_userptr: 0
[ 317.293676] vb2: attach_dmabuf: 0 detach_dmabuf: 0 map_dmabuf: 0 unmap_dmabuf: 0
[ 317.301455] vb2: get_dmabuf: 0 num_users: 0 vaddr: 0 cookie: 0
[ 317.307706] vb2-core: vb2_core_streamon: no buffers have been allocated