AnsweredAssumed Answered

dma allocation failed whiling taking picture

Question asked by raymond wang on Mar 20, 2014
Latest reply on Jan 12, 2015 by raymond wang

my board design is based on SabreSD, and my kernel is 3.0.35, android release is android_jb_4.2.2_1.1.0.

After system running a time (one day or more) ,I found kernel report dma allocation failure as following message.

<6>Write initial setting done.
<6>Write af fw start...
<6>Write af fw end
<4> new frame_rate is 1,capturemode is 0!
<6>binder: 2950:2960 refcount change on invalid ref 38
<3>Writting resolution [2592x1944] done
<3>wait 400 ms for state 7
<4> new frame_rate is 1,capturemode is 6!
<4>RequestHandle: page allocation failure: order:12, mode:0xd1
<4>[<c004e9e4>] (unwind_backtrace+0x0/0x138) from [<c00f6754>] (warn_alloc_failed+0xc8/0x100)
<4>[<c00f6754>] (warn_alloc_failed+0xc8/0x100) from [<c00f9164>] (__alloc_pages_nodemask+0x5a8/0x7a4)
<4>[<c00f9164>] (__alloc_pages_nodemask+0x5a8/0x7a4) from [<c0051ab0>] (__dma_alloc+0xa0/0x2fc)
<4>[<c0051ab0>] (__dma_alloc+0xa0/0x2fc) from [<c00522e8>] (dma_alloc_coherent+0x54/0x60)
<4>[<c00522e8>] (dma_alloc_coherent+0x54/0x60) from [<c03ede94>] (csi_enc_enabling_tasks+0x294/0x348)
<4>[<c03ede94>] (csi_enc_enabling_tasks+0x294/0x348) from [<c03e7238>] (mxc_streamon+0x8c/0x258)
<4>[<c03e7238>] (mxc_streamon+0x8c/0x258) from [<c03e97fc>] (mxc_v4l_do_ioctl+0x720/0x28a8)
<4>[<c03e97fc>] (mxc_v4l_do_ioctl+0x720/0x28a8) from [<c03da074>] (video_usercopy+0x98/0x4d4)
<4>[<c03da074>] (video_usercopy+0x98/0x4d4) from [<c03d961c>] (v4l2_ioctl+0x11c/0x138)
<4>[<c03d961c>] (v4l2_ioctl+0x11c/0x138) from [<c0139e4c>] (do_vfs_ioctl+0x80/0x54c)
<4>[<c0139e4c>] (do_vfs_ioctl+0x80/0x54c) from [<c013a350>] (sys_ioctl+0x38/0x5c)
<4>[<c013a350>] (sys_ioctl+0x38/0x5c) from [<c0047900>] (ret_fast_syscall+0x0/0x30)
<4>Mem-info:
<4>Normal per-cpu:
<4>CPU 0: hi: 186, btch: 31 usd: 0
<4>CPU 1: hi: 186, btch: 31 usd: 0
<4>HighMem per-cpu:
<4>CPU 0: hi: 186, btch: 31 usd: 179
<4>CPU 1: hi: 186, btch: 31 usd: 0
<4>active_anon:89460 inactive_anon:147 isolated_anon:0
<4> active_file:14756 inactive_file:17833 isolated_file:32
<4> unevictable:202 dirty:5 writeback:0 unstable:0
<4> free:49183 slab_reclaimable:1232 slab_unreclaimable:3369
<4> mapped:15164 shmem:161 pagetables:3040 bounce:0
<4>Normal free:131428kB min:2516kB low:3144kB high:3772kB active_anon:168116kB inactive_anon:188kB active_file:0kB inactive_file:104kB unevictable:0kB isolated(anon):0kB
resent:396160kB mlocked:0kB dirty:0kB writeback:0kB mapped:324kB shmem:200kB slab_reclaimable:4928kB slab_unreclaimable:13476kB kernel_stack:5896kB pagetables:12160kB uns
writeback_tmp:0kB pages_scanned:663 all_unreclaimable? yes
<4>lowmem_reserve[]: 0 3281 3281
<4>HighMem free:65924kB min:408kB low:1072kB high:1740kB active_anon:189724kB inactive_anon:400kB active_file:59128kB inactive_file:70676kB unevictable:808kB isolated(ano
):0kB present:419968kB mlocked:0kB dirty:20kB writeback:0kB mapped:59876kB shmem:444kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstabl
teback_tmp:0kB pages_scanned:2 all_unreclaimable? no
<4>lowmem_reserve[]: 0 0 0
<4>Normal: 1263*4kB 539*8kB 241*16kB 186*32kB 126*64kB 74*128kB 46*256kB 42*512kB 8*1024kB 6*2048kB 4*4096kB 3*8192kB 0*16384kB 0*32768kB = 131428kB
<4>HighMem: 1961*4kB 879*8kB 475*16kB 163*32kB 73*64kB 30*128kB 11*256kB 6*512kB 2*1024kB 1*2048kB 1*4096kB 2*8192kB 0*16384kB 0*32768kB = 66668kB
<4>32643 total pagecache pages
<4>0 pages in swap cache
<4>Swap cache stats: add 0, delete 0, find 0/0
<4>Free swap = 0kB
<4>Total swap = 0kB
<4>262144 pages of RAM
<4>55171 free pages
<4>69466 reserved pages
<4>4601 slab pages
<4>150544 pages shared
<4>0 pages swap cached
<3>ERROR: v4l2 capture: Allocate dummy frame failed.
<6>otg udc vbus rising wakeup
<7>try_wake_up_udc: udc out low power mode
<3>qpower-charger qpower-charger.0: Charger charging
<6>android_usb gadget: high speed config #1: android
<6>mtp_open


  I have merge patch from imx6q dma allocation error !, but it still can be repeated. Anyone encounter same issue?

Outcomes