nyanmisaka / ffmpeg-rockchip

FFmpeg with async and zero-copy Rockchip MPP & RGA support
Other
326 stars 48 forks source link

external library error? rkmpp decoder issue #25

Closed great9 closed 4 months ago

great9 commented 4 months ago
2024-02-08 15:33:35.670125850  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : Input #0, rtsp, from 'rtsp://*:*@0.0.0.1:554/cam/realmonitor?channel=1&subtype=2':
2024-02-08 15:33:35.670394175  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :   Metadata:
2024-02-08 15:33:35.670695166  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :     title           : Media Server
2024-02-08 15:33:35.670903993  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :   Duration: N/A, start: 0.080000, bitrate: N/A
2024-02-08 15:33:35.671047780  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :   Stream #0:0: Video: hevc (Main), yuvj420p(pc, bt470bg/bt470bg/smpte170m), 1920x1080, 25 fps, 25 tbr, 90k tbn
2024-02-08 15:33:35.671235607  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : Stream mapping:
2024-02-08 15:33:35.671427518  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :   Stream #0:0 -> #0:0 (hevc (hevc_rkmpp) -> rawvideo (native))
2024-02-08 15:33:35.671616512  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : Press [q] to stop, [?] for help
2024-02-08 15:33:35.671804048  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : Output #0, rawvideo, to 'pipe:':
2024-02-08 15:33:35.671993626  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :   Metadata:
2024-02-08 15:33:35.672180870  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :     title           : Media Server
2024-02-08 15:33:35.672371323  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :     encoder         : Lavf60.16.100
2024-02-08 15:33:35.672562650  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :   Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(pc, bt470bg/bt470bg/smpte170m, progressive), 1920x1080, q=2-31, 622080 kb/s, 25 fps, 25 tbn
2024-02-08 15:33:35.672759519  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :     Metadata:
2024-02-08 15:33:35.672947347  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   :       encoder         : Lavc60.31.102 rawvideo
2024-02-08 15:33:35.673150341  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=    0 fps=0.0 q=0.0 size=       0kB time=N/A bitrate=N/A dup=0 drop=1 speed=N/A    
2024-02-08 15:33:35.673332627  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=    0 fps=0.0 q=0.0 size=       0kB time=N/A bitrate=N/A dup=0 drop=1 speed=N/A    
2024-02-08 15:33:35.673523079  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=   38 fps=9.4 q=-0.0 size=  112388kB time=00:00:01.80 bitrate=511488.0kbits/s dup=0 drop=1 speed=0.445x    
2024-02-08 15:33:35.673711490  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  103 fps= 23 q=-0.0 size=  309825kB time=00:00:04.40 bitrate=576837.8kbits/s dup=0 drop=1 speed=0.967x    
2024-02-08 15:33:35.673923234  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  141 fps= 28 q=-0.0 size=  425250kB time=00:00:05.64 bitrate=617668.1kbits/s dup=0 drop=1 speed=1.11x    
2024-02-08 15:33:35.674118353  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  155 fps= 28 q=-0.0 size=  467775kB time=00:00:06.16 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.09x    
2024-02-08 15:33:35.674309680  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  161 fps= 26 q=-0.0 size=  486000kB time=00:00:06.44 bitrate=618216.1kbits/s dup=0 drop=1 speed=1.04x    
2024-02-08 15:33:35.674503049  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  167 fps= 23 q=-0.0 size=  504225kB time=00:00:06.64 bitrate=622080.0kbits/s dup=0 drop=1 speed=0.926x    
2024-02-08 15:33:35.674690293  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  192 fps= 23 q=-0.0 size=  580162kB time=00:00:07.64 bitrate=622080.0kbits/s dup=0 drop=1 speed=0.925x    
2024-02-08 15:33:35.674876371  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  217 fps= 24 q=-0.0 size=  656100kB time=00:00:08.64 bitrate=622080.0kbits/s dup=0 drop=1 speed=0.959x    
2024-02-08 15:33:35.675067115  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  253 fps= 26 q=-0.0 size=  765450kB time=00:00:10.08 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.05x    
2024-02-08 15:33:35.675254360  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  266 fps= 26 q=-0.0 size=  804938kB time=00:00:10.64 bitrate=619741.4kbits/s dup=0 drop=1 speed=1.05x    
2024-02-08 15:33:35.675450354  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  280 fps= 26 q=-0.0 size=  847462kB time=00:00:11.16 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.05x    
2024-02-08 15:33:35.675640514  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  289 fps= 26 q=-0.0 size=  874800kB time=00:00:11.56 bitrate=619927.5kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.675829800  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  292 fps= 25 q=-0.0 size=  883912kB time=00:00:11.64 bitrate=622080.0kbits/s dup=0 drop=1 speed=0.986x    
2024-02-08 15:33:35.676017920  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  295 fps= 23 q=-0.0 size=  893025kB time=00:00:12.08 bitrate=605601.1kbits/s dup=0 drop=1 speed=0.96x    
2024-02-08 15:33:35.676206914  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  297 fps= 22 q=-0.0 size=  899100kB time=00:00:12.16 bitrate=605709.5kbits/s dup=0 drop=1 speed=0.902x    
2024-02-08 15:33:35.676396200  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  305 fps= 22 q=-0.0 size=  923400kB time=00:00:12.48 bitrate=606129.2kbits/s dup=0 drop=1 speed=0.891x    
2024-02-08 15:33:35.676588110  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  309 fps= 21 q=-0.0 size=  935550kB time=00:00:12.64 bitrate=606331.1kbits/s dup=0 drop=1 speed=0.87x    
2024-02-08 15:33:35.676783229  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  312 fps= 21 q=-0.0 size=  944662kB time=00:00:12.76 bitrate=606479.2kbits/s dup=0 drop=1 speed=0.845x    
2024-02-08 15:33:35.676975140  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  366 fps= 23 q=-0.0 size= 1108688kB time=00:00:14.92 bitrate=608737.8kbits/s dup=0 drop=1 speed=0.956x    
2024-02-08 15:33:35.677174926  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  411 fps= 26 q=-0.0 size= 1245375kB time=00:00:16.52 bitrate=617561.3kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.677384919  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  432 fps= 26 q=-0.0 size= 1309162kB time=00:00:17.24 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.04x    
2024-02-08 15:33:35.677586747  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  441 fps= 25 q=-0.0 size= 1336500kB time=00:00:17.64 bitrate=620669.4kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.677778949  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  461 fps= 26 q=-0.0 size= 1397250kB time=00:00:18.40 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.677971151  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  466 fps= 25 q=-0.0 size= 1412438kB time=00:00:18.64 bitrate=620745.1kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.678168604  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  488 fps= 26 q=-0.0 size= 1479262kB time=00:00:19.48 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.678365764  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  499 fps= 26 q=-0.0 size= 1512675kB time=00:00:19.96 bitrate=620833.3kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.678553592  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  514 fps= 26 q=-0.0 size= 1558238kB time=00:00:20.56 bitrate=620869.7kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.678749003  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  525 fps= 26 q=-0.0 size= 1591650kB time=00:00:21.00 bitrate=620895.1kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.678938580  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  536 fps= 25 q=-0.0 size= 1625062kB time=00:00:21.40 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.01x    
2024-02-08 15:33:35.679126408  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  540 fps= 25 q=-0.0 size= 1637212kB time=00:00:21.64 bitrate=619780.3kbits/s dup=0 drop=1 speed=0.986x    
2024-02-08 15:33:35.679323860  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  544 fps= 24 q=-0.0 size= 1649362kB time=00:00:22.04 bitrate=613048.0kbits/s dup=0 drop=1 speed=0.978x    
2024-02-08 15:33:35.679540853  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  545 fps= 24 q=-0.0 size= 1652400kB time=00:00:22.08 bitrate=613064.3kbits/s dup=0 drop=1 speed=0.955x    
2024-02-08 15:33:35.679714098  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  548 fps= 23 q=-0.0 size= 1658475kB time=00:00:22.16 bitrate=613096.9kbits/s dup=0 drop=1 speed=0.926x    
2024-02-08 15:33:35.679903676  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  610 fps= 25 q=-0.0 size= 1849838kB time=00:00:24.68 bitrate=614014.1kbits/s dup=0 drop=1 speed=1.01x    
2024-02-08 15:33:35.680097920  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  641 fps= 26 q=-0.0 size= 1944000kB time=00:00:25.60 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.03x    
2024-02-08 15:33:35.680290414  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  651 fps= 26 q=-0.0 size= 1974375kB time=00:00:26.00 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.680481158  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  659 fps= 25 q=-0.0 size= 1998675kB time=00:00:26.36 bitrate=621136.0kbits/s dup=0 drop=1 speed=1.01x    
2024-02-08 15:33:35.680699318  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  667 fps= 24 q=-0.0 size= 2022975kB time=00:00:26.64 bitrate=622080.0kbits/s dup=0 drop=1 speed=0.975x    
2024-02-08 15:33:35.680896770  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  695 fps= 25 q=-0.0 size= 2108025kB time=00:00:28.08 bitrate=614990.8kbits/s dup=0 drop=1 speed=1.01x    
2024-02-08 15:33:35.681086640  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  716 fps= 25 q=-0.0 size= 2171812kB time=00:00:28.64 bitrate=621211.2kbits/s dup=0 drop=1 speed=1.01x    
2024-02-08 15:33:35.681279425  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  741 fps= 26 q=-0.0 size= 2247750kB time=00:00:29.60 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.681462295  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  751 fps= 25 q=-0.0 size= 2278125kB time=00:00:30.04 bitrate=621251.7kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.681648956  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  768 fps= 26 q=-0.0 size= 2329762kB time=00:00:30.68 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.681852241  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  780 fps= 26 q=-0.0 size= 2366212kB time=00:00:31.16 bitrate=622080.0kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.682038902  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  787 fps= 25 q=-0.0 size= 2387475kB time=00:00:31.52 bitrate=620501.1kbits/s dup=0 drop=1 speed=1.02x    
2024-02-08 15:33:35.682225271  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  791 fps= 25 q=-0.0 size= 2399625kB time=00:00:31.64 bitrate=621293.6kbits/s dup=0 drop=1 speed=0.996x    
2024-02-08 15:33:35.682425349  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  796 fps= 24 q=-0.0 size= 2414812kB time=00:00:32.12 bitrate=615882.4kbits/s dup=0 drop=1 speed=0.984x    
2024-02-08 15:33:35.682614634  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  797 fps= 24 q=-0.0 size= 2417850kB time=00:00:32.16 bitrate=615890.1kbits/s dup=0 drop=1 speed=0.97x    
2024-02-08 15:33:35.682804212  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : [Parsed_scale_rkrga_0 @ 0x55a1a43f10] RGA blit failed: -12
2024-02-08 15:33:35.682989123  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : [vf#0:0 @ 0x55a1a16150] Error while filtering: Generic error in an external library
2024-02-08 15:33:35.683178992  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : Failed to inject frame into filter network: Generic error in an external library
2024-02-08 15:33:35.683375570  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : Error while filtering: Generic error in an external library
2024-02-08 15:33:35.683587313  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : [out#0/rawvideo @ 0x55a1a47bd0] video:2454300kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
2024-02-08 15:33:35.683766391  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : frame=  808 fps= 24 q=-0.0 Lsize= 2454300kB time=00:00:32.28 bitrate=622850.9kbits/s dup=0 drop=1 speed=0.949x    
2024-02-08 15:33:35.683989801  [2024-02-08 15:33:35] ffmpeg.camera2.detect ERROR   : Conversion failed!
nyanmisaka commented 4 months ago

Linux error -12 is -ENOMEM (cannot allocate memory).

This is more like RGA2 running out of 4GB dma32 memory than an ffmpeg error. You'd better check dmesg to see the more detailed error info of RGA driver.

great9 commented 4 months ago
[2739068.437367] warn_alloc: 82 callbacks suppressed
[2739068.437373] ffmpeg: page allocation failure: order:0, mode:0x140dc6(GFP_HIGHUSER|GFP_DMA32|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=15aae0b0f1d00ff317bd3caf7622267d962dbe6eec8db424c1791fa5434adddb,mems_allowed=0
[2739068.437385] CPU: 7 PID: 3962807 Comm: ffmpeg Tainted: G           O      5.10.110-37-rockchip-g74457be0716d #rockchip
[2739068.437386] Hardware name: Radxa ROCK 5B (DT)
[2739068.437388] Call trace:
[2739068.437394]  dump_backtrace+0x0/0x1a8
[2739068.437396]  show_stack+0x2c/0x38
[2739068.437400]  dump_stack_lvl+0xd0/0xfc
[2739068.437402]  dump_stack+0x14/0x2c
[2739068.437406]  warn_alloc+0xe0/0x174
[2739068.437409]  __alloc_pages_slowpath.constprop.150+0x3f4/0x728
[2739068.437411]  __alloc_pages_nodemask+0x194/0x258
[2739068.437414]  dmabuf_page_pool_alloc+0x78/0x7c
[2739068.437417]  system_heap_do_allocate.isra.11+0x2a4/0x54c
[2739068.437419]  system_heap_allocate+0x38/0x48
[2739068.437421]  dma_heap_buffer_alloc+0x5c/0x74
[2739068.437422]  dma_heap_bufferfd_alloc+0x3c/0x7c
[2739068.437424]  dma_heap_ioctl+0x200/0x284
[2739068.437427]  vfs_ioctl+0x58/0x68
[2739068.437429]  __arm64_sys_ioctl+0x80/0xb0
[2739068.437431]  el0_svc_common.constprop.5+0x134/0x1e8
[2739068.437433]  do_el0_svc+0x80/0x9c
[2739068.437435]  el0_svc+0x1c/0x28
[2739068.437437]  el0_sync_handler+0x64/0x12c
[2739068.437439]  el0_sync+0x178/0x180
[2739068.437441] Mem-Info:
[2739068.437446] active_anon:141204 inactive_anon:161343 isolated_anon:0
                  active_file:16015 inactive_file:22274 isolated_file:0
                  unevictable:0 dirty:193 writeback:0
                  slab_reclaimable:22466 slab_unreclaimable:31709
                  mapped:20568 shmem:26028 pagetables:8850 bounce:0
                  free:234484 free_pcp:746 free_cma:60461
[2739068.437451] Node 0 active_anon:564816kB inactive_anon:645372kB active_file:64060kB inactive_file:89096kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:82272kB dirty:772kB writeback:0kB shmem:104112kB writeback_tmp:0kB kernel_stack:16144kB all_unreclaimable? yes
[2739068.437455] DMA free:247188kB min:5452kB low:9276kB high:13100kB reserved_highatomic:0KB active_anon:44kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3930112kB managed:3839940kB mlocked:0kB pagetables:948kB bounce:0kB free_pcp:252kB local_pcp:248kB free_cma:241844kB
[2739068.437456] lowmem_reserve[]: 0 0 3941 3941
[2739068.437463] Normal free:690748kB min:5756kB low:9792kB high:13828kB reserved_highatomic:4096KB active_anon:564772kB inactive_anon:645456kB active_file:64060kB inactive_file:89096kB unevictable:0kB writepending:772kB present:4194304kB managed:4036540kB mlocked:0kB pagetables:34452kB bounce:0kB free_pcp:2732kB local_pcp:300kB free_cma:0kB
[2739068.437464] lowmem_reserve[]: 0 0 0 0
[2739068.437468] DMA: 48*4kB (UEC) 28*8kB (UEC) 19*16kB (EC) 173*32kB (UEC) 12*64kB (C) 12*128kB (C) 9*256kB (C) 8*512kB (C) 7*1024kB (C) 6*2048kB (C) 52*4096kB (C) = 247408kB
[2739068.437485] Normal: 38713*4kB (UMEH) 33912*8kB (UMEH) 14447*16kB (UMEH) 1038*32kB (UMEH) 4*64kB (H) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 690772kB
nyanmisaka commented 4 months ago
ffmpeg: page allocation failure: order:0, mode:0x140dc6(GFP_HIGHUSER|GFP_DMA32|__GFP_COMP|__GFP_ZERO)

The DMA32 address requested by ffmpeg has been exhausted, so it automatically falls back to the DMA64 address. And RGA2 only supports DMA32, so it cannot use this memory.

Try reducing the number of concurrent video streams, and setting :async_depth=0 for scale_rkrga may also help.

great9 commented 4 months ago
ffmpeg: page allocation failure: order:0, mode:0x140dc6(GFP_HIGHUSER|GFP_DMA32|__GFP_COMP|__GFP_ZERO)

The DMA32 address requested by ffmpeg has been exhausted, so it automatically falls back to the DMA64 address. And RGA2 only supports DMA32, so it cannot use this memory.

Try reducing the number of concurrent video streams, and setting :async_depth=0 for scale_rkrga may also help.

RGA2 had this problem for a while as far as I know. Who's responsible for it? Rockchip?

nyanmisaka commented 4 months ago
ffmpeg: page allocation failure: order:0, mode:0x140dc6(GFP_HIGHUSER|GFP_DMA32|__GFP_COMP|__GFP_ZERO)

The DMA32 address requested by ffmpeg has been exhausted, so it automatically falls back to the DMA64 address. And RGA2 only supports DMA32, so it cannot use this memory. Try reducing the number of concurrent video streams, and setting :async_depth=0 for scale_rkrga may also help.

RGA2 had this problem for a while as far as I know. Who's responsible for it? Rockchip?

This is a hardware limitation and is determined by the hardware designer. So yes rockchip.

RGA3 does not have this limitation but it cannot output YUV420P, you can switch to another format and use RGA3 instead.