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.

SK-AM62A-LP: AM62ax: the raw data captured from v4l2 DQBUF has some error.

Part Number: SK-AM62A-LP

We are porting our dToF sensor to TI AM62ax SoC platform. We had porting this dToF sensor to rockchip rk3568 last year, It works well.   Recently we are porting it to Am62ax.  The Linux kernel version is 6.1.46.

We already modified dts and added ads6311.c as a camera sensor driver, we almost are done, except some errors as below:

1. There is some errors in the log, it looks some DMA error are happening, but we don't know why so?

[ 138.058123] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
[ 138.065813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
[ 138.178139] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
[ 138.185813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
[ 138.298207] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
[ 138.305888] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
[ 138.394094] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
[ 138.401778] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
[ 138.466288] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
[ 138.473983] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus

2. Some captured raw data files are incorrect according the MD5sum value.  BTW, I enabled TEST PATTERN output for our dToF sensor, the output raw data is fixed, with a fixed MD5 value, as I tested before on Rk3568.  As below, the highlighted files has incorrect MD5 value, while other files are correct.

root@am62axx-evm:~# md5sum /tmp/video*
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame000_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame001_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame002_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame003_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame004_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame005_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame006_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame007_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame008_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video0_frame009_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video1_frame000_2688x192_1032192.depth_raw
47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame001_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video1_frame002_2688x192_1032192.depth_raw
47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame003_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video1_frame004_2688x192_1032192.depth_raw
47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame005_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video1_frame006_2688x192_1032192.depth_raw
47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame007_2688x192_1032192.depth_raw
6471076892740e3a2aab7206a01869c4 /tmp/video1_frame008_2688x192_1032192.depth_raw
47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame009_2688x192_1032192.depth_raw

I will post the complete log too. Would you please help to check the error log and find the root reason? Thanks

  • root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~# cat hawk/info
    Adaps Ads6311 dToF Sensor Driver
    Version: 2.0.0_LM20240308a
    Build UTC Time: Mar 8 2024,08:54:53
    Chip Id: 0x0
    Bus Type: SPI
    Bus Num: 1
    SPI mode: 3
    SPI max speed: 1000000Hz (1MHz)
    SPI Read Mode: Linux default (2-frames)
    
    root@am62axx-evm:~# echo 0x142a > /sys/kernel/debug/adaps/dbg_ctrl
    root@am62axx-evm:~# export save_frame_enable=true
    root@am62axx-evm:~# export debug_info_enable=true
    root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video0/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video1/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video2/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video3/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    root@am62axx-evm:~# media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"
    [ 120.352232] --HAWK--<subdev_do_ioctl> Line: 475--subdev_do_ioctl()-owner:, v4l2_subdev_name:cdns_csi2rx.30101000.csi-bridge, cmd:0xc0285627---
    root@am62axx-evm:~# media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 1/0 [1], 0/1 -> 2/0 [1], 0/2 -> 3/0 [1], 0/3 -> 4/0 [1]]"
    [ 120.473683] --HAWK--<subdev_do_ioctl> Line: 475--subdev_do_ioctl()-owner:(null), v4l2_subdev_name:30102000.ticsi2rx, cmd:0xc0285627---
    root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~# ./hawk_concurrency_test --setworkmode 2 --dumpframe 10 > hawk_concurrency_test4.log
    [ 135.436999] <DRV_ADS6311> [2024-02-04 18:28:38 073.013.890] v4l2_cb <sensor_init_cfg> L2570:client: hawk_concurrenc (1286:1286) is running on CPU 1
    [ 135.450296] <DRV_ADS6311> [2024-02-04 18:28:38 086.313.640] v4l2_cb <sensor_open> L4004:---- S_OPEN from hawk_concurrenc (1286:1286) on CPU 1
    [ 135.463148] <DRV_ADS6311> [2024-02-04 18:28:38 099.167.130] <I> 5118 sensor->mmap_buffer_base: 00000000221e2b2f, 0xffff000807200000
    [ 135.474988] <DRV_ADS6311> [2024-02-04 18:28:38 111.005.980] <I> 5119 client: hawk_concurrenc (1286)
    [ 135.484036] <DRV_ADS6311> [2024-02-04 18:28:38 120.054.685] <I> 5120 code section: [0x400000 0x41529e]
    [ 135.493600] <DRV_ADS6311> [2024-02-04 18:28:38 129.618.945] <I> 5121 data section: [0x425db8 0x4262b0]
    [ 135.503163] <DRV_ADS6311> [2024-02-04 18:28:38 139.182.505] <I> 5122 brk section: s: 0x27416000, c: 0x27437000
    [ 135.513333] <DRV_ADS6311> [2024-02-04 18:28:38 149.351.935] <I> 5123 mmap section: s: 0xffff8574b000
    [ 135.522549] <DRV_ADS6311> [2024-02-04 18:28:38 158.568.040] <I> 5124 stack section: s: 0xffffc7730a20
    [ 135.531765] <DRV_ADS6311> [2024-02-04 18:28:38 167.783.825] <I> 5125 arg section: [0xffffc7731b28 0xffffc7731b5f]
    [ 135.542370] <DRV_ADS6311> [2024-02-04 18:28:38 178.388.870] <I> 5126 env section: [0xffffc7731b5f 0xffffc7731fe0]
    [ 135.542370]
    [ 135.554514] --HAWK--<subdev_do_ioctl> Line: 475--subdev_do_ioctl()-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, cmd:0xc0585605---
    [ 135.566604] --HAWK--<subdev_do_ioctl> Line: 612--before set_fmt() callback-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [ 135.578634] <DRV_ADS6311> [2024-02-04 18:28:38 214.652.685] v4l2_cb <sensor_set_fmt> L2612:client: hawk_concurrenc (1286:1286) is running on CPU 1, load_script: 0, streaming: 0, pad: 0, stream: 0, code: 0x0, state: 00000000517af3ba, which:0x1, width:2688, height:192
    [ 135.602172] <DRV_ADS6311> [2024-02-04 18:28:38 238.191.350] <I> 2664 fmt->which: 1, pad: 0, stream: 0, code: 0x3008, w*h: 2688*192.
    [ 135.613991] --HAWK--<subdev_do_ioctl> Line: 614--after set_fmt() callback-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [ 135.639474] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:0 -> "cdns_csi2rx.30101000.csi-bridge":0:0
    [ 135.651452] --HAWK--<v4l2_subdev_link_validate_get_format> Line: 1061--after get_fmt()- v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:-515---
    [ 135.664148] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:0 (but that's ok)
    [ 135.674497] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:1 -> "cdns_csi2rx.30101000.csi-bridge":0:1
    [ 135.686400] --HAWK--<v4l2_subdev_link_validate_get_format> Line: 1061--after get_fmt()- v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:-515---
    [ 135.699084] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:1 (but that's ok)
    [ 135.709426] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:2 -> "cdns_csi2rx.30101000.csi-bridge":0:2
    [ 135.721330] --HAWK--<v4l2_subdev_link_validate_get_format> Line: 1061--after get_fmt()- v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:-515---
    [ 135.734013] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:2 (but that's ok)
    [ 135.744358] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:3 -> "cdns_csi2rx.30101000.csi-bridge":0:3
    [ 135.756271] --HAWK--<v4l2_subdev_link_validate_get_format> Line: 1061--after get_fmt()- v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:-515---
    [ 135.769047] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:3 (but that's ok)
    [ 135.779407] cdns-csi2rx 30101000.csi-bridge: subdev: m00_dToF_ads6311 spi1.0, entity.name: cdns_csi2rx.30101000.csi-bridge, remote_pad index: 0.
    [ 135.792357] <DRV_ADS6311> [2024-02-04 18:28:38 428.374.235] v4l2_cb <sensor_get_frame_desc> L2486:client: hawk_concurrenc (1286:1286) is running on CPU 1, pad: 0, name:m00_dToF_ads6311 spi1.0, fd: 000000008017a187
    [ 135.811292] <DRV_ADS6311> [2024-02-04 18:28:38 447.311.005] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 0
    [ 135.821721] <DRV_ADS6311> [2024-02-04 18:28:38 457.740.570] <I> 2530 num_entries: 0, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 135.832860] <DRV_ADS6311> [2024-02-04 18:28:38 468.878.740] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 1
    [ 135.843291] <DRV_ADS6311> [2024-02-04 18:28:38 479.310.380] <I> 2530 num_entries: 1, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 135.854415] <DRV_ADS6311> [2024-02-04 18:28:38 490.434.480] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 2
    [ 135.864844] <DRV_ADS6311> [2024-02-04 18:28:38 500.863.565] <I> 2530 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 135.875535] <DRV_ADS6311> [2024-02-04 18:28:38 511.554.490] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 3
    [ 135.885972] <DRV_ADS6311> [2024-02-04 18:28:38 521.991.585] <I> 2530 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 135.896676] cdns-csi2rx 30101000.csi-bridge: num_entries: 4, type: 2, flags: 1, stream: 0, vc*dt: 0*44;
    [ 135.896676] flags: 1, stream: 1, vc*dt: 1*44; flags: 1, stream: 2, vc*dt: 0*48; flags: 1, stream: 3, vc*dt: 1*48.
    [ 135.916927] cdns-csi2rx 30101000.csi-bridge: csi2rx->max_streams: 4, cur stream: 0, cfg reg addr: 0x9b7e10c, value: 0x100, data reg addr: 0x9b7e108, value: 0x0.
    [ 135.931283] cdns-csi2rx 30101000.csi-bridge: csi2rx->max_streams: 4, cur stream: 1, cfg reg addr: 0x9b7e20c, value: 0x100, data reg addr: 0x9b7e208, value: 0x0.
    [ 135.945657] cdns-csi2rx 30101000.csi-bridge: csi2rx->max_streams: 4, cur stream: 2, cfg reg addr: 0x9b7e30c, value: 0x100, data reg addr: 0x9b7e308, value: 0x0.
    [ 135.960000] cdns-csi2rx 30101000.csi-bridge: csi2rx->max_streams: 4, cur stream: 3, cfg reg addr: 0x9b7e40c, value: 0x100, data reg addr: 0x9b7e408, value: 0x0.
    [ 135.974373] cdns-csi2rx 30101000.csi-bridge: csi2rx_enable_streams: cdns_csi2rx.30101000.csi-bridge.
    [ 135.983513] <DRV_ADS6311> [2024-02-04 18:28:38 619.529.960] v4l2_cb <sensor_s_stream> L3603:--on:1, console_loglevel:7, dbg_ctrl:0x142a, wkmode:2(FHR), linkFreq:500000000, exposureTime:1200 us, power_on:0, mcu_chipid:0, mcu_fw_type: 0x0, drv_version: 2.0.0_LM20240308a---
    [ 136.028406] <DRV_ADS6311> [2024-02-04 18:28:38 664.423.900] <I> 3688 sensor reset cost 2651 us, sensor chip id: 0x3400
    [ 136.028406]
    [ 136.042843] <DRV_ADS6311> [2024-02-04 18:28:38 678.861.000] v4l2_cb <sensor_set_ctrl> L4279:client: hawk_concurrenc (1286:1286) is running on CPU 1, ctrl->id: 0x9f0901, ctrl->val: 1, V4L2_CID_EXPOSURE: 0x980911
    [ 136.061511] <DRV_ADS6311> [2024-02-04 18:28:38.697.530.710] <N> 4301 sensor_set_ctrl Unhandled id:0x9f0901, val:0x1
    [ 136.061511]
    [ 136.073416] <DRV_ADS6311> [2024-02-04 18:28:38 709.435.295] v4l2_cb <sensor_set_ctrl> L4279:client: hawk_concurrenc (1286:1286) is running on CPU 1, ctrl->id: 0x980911, ctrl->val: 100, V4L2_CID_EXPOSURE: 0x980911
    [ 136.216797] <DRV_ADS6311> [2024-02-04 18:28:38.852.815.495] <N> 3504 ---roi sram read back matched !!!---
    [ 136.226364] <DRV_ADS6311> [2024-02-04 18:28:38 862.383.655] <I> 3161 set_vcsel_state: 1, call from Line:3509.
    [ 136.226364]
    [ 136.237889] <DRV_ADS6311> [2024-02-04 18:28:38.873.908.725] <N> 2330 ============= Register Dump from <__sensor_start_stream> Line: 3554, Power_on: Yes =============
    [ 136.252662] <DRV_ADS6311> [2024-02-04 18:28:38.888.681.245] <N> 2339 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 136.267284] <DRV_ADS6311> [2024-02-04 18:28:38.903.303.320] <N> 2365 0000: 34 00 00 00 45 49 01 01 00 00 00 0A 0A 1F F0 00
    [ 136.281918] <DRV_ADS6311> [2024-02-04 18:28:38.917.936.405] <N> 2365 0010: 07 F0 FF 00 01 03 00 A7 A8 01 00 10 00 00 00 04
    [ 136.296531] <DRV_ADS6311> [2024-02-04 18:28:38.932.550.795] <N> 2365 0020: 04 08 00 00 00 00 00 00 FF 03 01 00 00 00 00 F0
    [ 136.311146] <DRV_ADS6311> [2024-02-04 18:28:38.947.165.385] <N> 2365 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 136.325766] <DRV_ADS6311> [2024-02-04 18:28:38.961.785.050] <N> 2365 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 136.340383] <DRV_ADS6311> [2024-02-04 18:28:38.976.402.165] <N> 2365 0050: 00 00 00 00 D2 FF 84 04 00 DC 16 00 00 00 00 00
    [ 136.354999] <DRV_ADS6311> [2024-02-04 18:28:38.991.018.205] <N> 2365 0060: 00 10 00 11 10 10 00 00 00 81 32 FA 00 83 20 37
    [ 136.369616] <DRV_ADS6311> [2024-02-04 18:28:39.005.635.460] <N> 2365 0070: 00 00 00 00 00 54 1D 41 30 F0 00 00 00 00 0C 00
    [ 136.384236] <DRV_ADS6311> [2024-02-04 18:28:39.020.254.490] <N> 2365 0080: 00 00 00 00 00 00 00 00 00 00 21 43 65 87 09 00
    [ 136.398855] <DRV_ADS6311> [2024-02-04 18:28:39.034.873.990] <N> 2365 0090: 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 00 00
    [ 136.413472] <DRV_ADS6311> [2024-02-04 18:28:39.049.491.370] <N> 2365 00a0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00
    [ 136.428088] <DRV_ADS6311> [2024-02-04 18:28:39.064.107.740] <N> 2365 00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 136.442706] <DRV_ADS6311> [2024-02-04 18:28:39.078.725.600] <N> 2365 00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 136.457327] <DRV_ADS6311> [2024-02-04 18:28:39.093.346.745] <N> 2365 00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 136.471953] <DRV_ADS6311> [2024-02-04 18:28:39.107.972.215] <N> 2365 00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 136.485765] <DRV_ADS6311> [2024-02-04 18:28:39.121.784.090] <N> 2370 =====================================================================================
    [ 136.485765]
    [ 136.501052] <DRV_ADS6311> [2024-02-04 18:28:39.137.071.255] <N> 2330 ============= Register Dump from <__sensor_start_stream> Line: 3555, Power_on: Yes =============
    [ 136.515818] <DRV_ADS6311> [2024-02-04 18:28:39.151.837.655] <N> 2339 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 136.530445] <DRV_ADS6311> [2024-02-04 18:28:39.166.464.260] <N> 2365 0100: 8B 01 00 00 0C 10 10 24 FA 00 1F 00 05 05 00 00
    [ 136.545059] <DRV_ADS6311> [2024-02-04 18:28:39.181.078.615] <N> 2365 0110: 00 00 20 00 2C 2C 00 00 C0 0F C0 0F 00 00 00 00
    [ 136.559674] <DRV_ADS6311> [2024-02-04 18:28:39.195.693.620] <N> 2365 0120: FF FF FF FF 00 00 00 00 C0 00 C0 00 00 00 00 00
    [ 136.574305] <DRV_ADS6311> [2024-02-04 18:28:39.210.324.615] <N> 2365 0130: 00 00 01 00 FF 40 00 30 00 00 00 00 05 00 C0 00
    [ 136.588919] <DRV_ADS6311> [2024-02-04 18:28:39.224.938.420] <N> 2365 0140: AD 00 00 00 00 00 00 00 00 00 00 00 00 05 01 00
    [ 136.603488] <DRV_ADS6311> [2024-02-04 18:28:39.239.507.805] <N> 2365 0150: C0 C0 00 00 00 00 00 00 64 0A 0A 00 01 01 00 --
    [ 136.617302] <DRV_ADS6311> [2024-02-04 18:28:39.253.321.390] <N> 2365 0160: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.631112] <DRV_ADS6311> [2024-02-04 18:28:39.267.131.970] <N> 2365 0170: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.644921] <DRV_ADS6311> [2024-02-04 18:28:39.280.940.590] <N> 2365 0180: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.658729] <DRV_ADS6311> [2024-02-04 18:28:39.294.748.060] <N> 2365 0190: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.672538] <DRV_ADS6311> [2024-02-04 18:28:39.308.557.205] <N> 2365 01a0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.686349] <DRV_ADS6311> [2024-02-04 18:28:39.322.368.400] <N> 2365 01b0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.700163] <DRV_ADS6311> [2024-02-04 18:28:39.336.182.465] <N> 2365 01c0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.713974] <DRV_ADS6311> [2024-02-04 18:28:39.349.993.645] <N> 2365 01d0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.727788] <DRV_ADS6311> [2024-02-04 18:28:39.363.807.460] <N> 2365 01e0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.741597] <DRV_ADS6311> [2024-02-04 18:28:39.377.616.325] <N> 2370 =====================================================================================
    [ 136.741597]
    [ 136.756883] <DRV_ADS6311> [2024-02-04 18:28:39.392.902.280] <N> 2330 ============= Register Dump from <__sensor_start_stream> Line: 3557, Power_on: Yes =============
    [ 136.771651] <DRV_ADS6311> [2024-02-04 18:28:39.407.669.985] <N> 2339 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 136.786279] <DRV_ADS6311> [2024-02-04 18:28:39.422.298.090] <N> 2365 0200: 30 30 30 30 10 00 00 00 00 AB 6C 3A 02 04 00 00
    [ 136.800893] <DRV_ADS6311> [2024-02-04 18:28:39.436.912.855] <N> 2365 0210: 01 14 C8 34 08 AA 33 F0 7F 55 CC 0F 80 5D 03 54
    [ 136.815506] <DRV_ADS6311> [2024-02-04 18:28:39.451.525.985] <N> 2365 0220: 64 A0 40 01 00 00 02 3C 0F 00 00 02 00 32 11 48
    [ 136.829976] <DRV_ADS6311> [2024-02-04 18:28:39.465.995.035] <N> 2365 0230: 08 A3 02 A0 64 21 84 00 00 00 00 44 00 -- -- --
    [ 136.843782] <DRV_ADS6311> [2024-02-04 18:28:39.479.801.670] <N> 2365 0240: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.857598] <DRV_ADS6311> [2024-02-04 18:28:39.493.617.250] <N> 2365 0250: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.871409] <DRV_ADS6311> [2024-02-04 18:28:39.507.428.205] <N> 2365 0260: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.885220] <DRV_ADS6311> [2024-02-04 18:28:39.521.239.695] <N> 2365 0270: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.899033] <DRV_ADS6311> [2024-02-04 18:28:39.535.052.030] <N> 2365 0280: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.912844] <DRV_ADS6311> [2024-02-04 18:28:39.548.863.360] <N> 2365 0290: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.926664] <DRV_ADS6311> [2024-02-04 18:28:39.562.683.460] <N> 2365 02a0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.940477] <DRV_ADS6311> [2024-02-04 18:28:39.576.496.260] <N> 2365 02b0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.954293] <DRV_ADS6311> [2024-02-04 18:28:39.590.312.085] <N> 2365 02c0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.968104] <DRV_ADS6311> [2024-02-04 18:28:39.604.123.140] <N> 2365 02d0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.981918] <DRV_ADS6311> [2024-02-04 18:28:39.617.937.830] <N> 2365 02e0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 136.995728] <DRV_ADS6311> [2024-02-04 18:28:39.631.747.580] <N> 2370 =====================================================================================
    [ 136.995728]
    [ 137.011017] <DRV_ADS6311> [2024-02-04 18:28:39.647.036.400] <N> 6797 ====================MCU Register Dump from <__sensor_start_stream> Line: 3558=====================
    [ 137.025960] <DRV_ADS6311> [2024-02-04 18:28:39.661.979.415] <N> 6806 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 137.039777] <DRV_ADS6311> [2024-02-04 18:28:39.675.796.655] <N> 6829 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.053593] <DRV_ADS6311> [2024-02-04 18:28:39.689.612.555] <N> 6829 0010: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.067411] <DRV_ADS6311> [2024-02-04 18:28:39.703.430.750] <N> 6829 0020: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.081231] <DRV_ADS6311> [2024-02-04 18:28:39.717.250.545] <N> 6829 0030: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.095049] <DRV_ADS6311> [2024-02-04 18:28:39.731.068.910] <N> 6829 0040: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.108871] <DRV_ADS6311> [2024-02-04 18:28:39.744.890.150] <N> 6829 0050: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.122687] <DRV_ADS6311> [2024-02-04 18:28:39.758.705.830] <N> 6829 0060: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.136503] <DRV_ADS6311> [2024-02-04 18:28:39.772.522.645] <N> 6829 0070: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.150319] <DRV_ADS6311> [2024-02-04 18:28:39.786.338.935] <N> 6829 0080: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.164134] <DRV_ADS6311> [2024-02-04 18:28:39.800.153.240] <N> 6829 0090: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.177949] <DRV_ADS6311> [2024-02-04 18:28:39.813.968.615] <N> 6829 00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.191767] <DRV_ADS6311> [2024-02-04 18:28:39.827.786.155] <N> 6829 00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.205586] <DRV_ADS6311> [2024-02-04 18:28:39.841.605.965] <N> 6829 00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.219403] <DRV_ADS6311> [2024-02-04 18:28:39.855.422.720] <N> 6829 00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.233227] <DRV_ADS6311> [2024-02-04 18:28:39.869.245.750] <N> 6829 00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.247044] <DRV_ADS6311> [2024-02-04 18:28:39.883.063.490] <N> 6829 00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 137.260853] <DRV_ADS6311> [2024-02-04 18:28:39.896.872.240] <N> 6834 =====================================================================================
    [ 137.260853]
    [ 137.276139] --HAWK--<v4l2_subdev_enable_streams_fallback> Line: 1835--s_stream(1)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [ 137.288793] cdns-csi2rx 30101000.csi-bridge: subdev: m00_dToF_ads6311 spi1.0, entity.name: cdns_csi2rx.30101000.csi-bridge, remote_pad index: 0.
    [ 137.301740] <DRV_ADS6311> [2024-02-04 18:28:39 937.759.060] v4l2_cb <sensor_get_frame_desc> L2486:client: hawk_concurrenc (1286:1286) is running on CPU 1, pad: 0, name:m00_dToF_ads6311 spi1.0, fd: 000000008017a187
    [ 137.320680] <DRV_ADS6311> [2024-02-04 18:28:39 956.697.240] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 0
    [ 137.331120] <DRV_ADS6311> [2024-02-04 18:28:39 967.139.075] <I> 2530 num_entries: 0, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 137.342249] <DRV_ADS6311> [2024-02-04 18:28:39 978.268.150] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 1
    [ 137.352679] <DRV_ADS6311> [2024-02-04 18:28:39 988.698.835] <I> 2530 num_entries: 1, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 137.363809] <DRV_ADS6311> [2024-02-04 18:28:39 999.827.320] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 2
    [ 137.374240] <DRV_ADS6311> [2024-02-04 18:28:40 010.259.430] <I> 2530 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 137.384931] <DRV_ADS6311> [2024-02-04 18:28:40 020.949.840] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 3
    [ 137.395359] <DRV_ADS6311> [2024-02-04 18:28:40 031.378.900] <I> 2530 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 137.406054] cdns-csi2rx 30101000.csi-bridge: num_entries: 4, type: 2, flags: 1, stream: 0, vc*dt: 0*44;
    [ 137.406054] flags: 1, stream: 1, vc*dt: 1*44; flags: 1, stream: 2, vc*dt: 0*48; flags: 1, stream: 3, vc*dt: 1*48.
    [ 137.425759] cdns-csi2rx 30101000.csi-bridge: subdev: m00_dToF_ads6311 spi1.0, entity.name: cdns_csi2rx.30101000.csi-bridge, remote_pad index: 0.
    [ 137.438708] <DRV_ADS6311> [2024-02-04 18:28:40 074.725.135] v4l2_cb <sensor_get_frame_desc> L2486:client: hawk_concurrenc (1286:1286) is running on CPU 1, pad: 0, name:m00_dToF_ads6311 spi1.0, fd: 000000008017a187
    [ 137.457645] <DRV_ADS6311> [2024-02-04 18:28:40 093.663.770] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 0
    [ 137.468076] <DRV_ADS6311> [2024-02-04 18:28:40 104.095.310] <I> 2530 num_entries: 0, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 137.479202] <DRV_ADS6311> [2024-02-04 18:28:40 115.221.335] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 1
    [ 137.489639] <DRV_ADS6311> [2024-02-04 18:28:40 125.657.665] <I> 2530 num_entries: 1, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 137.500764] <DRV_ADS6311> [2024-02-04 18:28:40 136.783.375] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 2
    [ 137.511194] <DRV_ADS6311> [2024-02-04 18:28:40 147.212.845] <I> 2530 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 137.521883] <DRV_ADS6311> [2024-02-04 18:28:40 157.902.705] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 3
    [ 137.532313] <DRV_ADS6311> [2024-02-04 18:28:40 168.332.655] <I> 2530 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 137.543012] cdns-csi2rx 30101000.csi-bridge: num_entries: 4, type: 2, flags: 1, stream: 0, vc*dt: 0*44;
    [ 137.543012] flags: 1, stream: 1, vc*dt: 1*44; flags: 1, stream: 2, vc*dt: 0*48; flags: 1, stream: 3, vc*dt: 1*48.
    [ 137.562719] cdns-csi2rx 30101000.csi-bridge: subdev: m00_dToF_ads6311 spi1.0, entity.name: cdns_csi2rx.30101000.csi-bridge, remote_pad index: 0.
    [ 137.575662] <DRV_ADS6311> [2024-02-04 18:28:40 211.680.520] v4l2_cb <sensor_get_frame_desc> L2486:client: hawk_concurrenc (1286:1286) is running on CPU 1, pad: 0, name:m00_dToF_ads6311 spi1.0, fd: 000000008017a187
    [ 137.594599] <DRV_ADS6311> [2024-02-04 18:28:40 230.617.130] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 0
    [ 137.605031] <DRV_ADS6311> [2024-02-04 18:28:40 241.050.345] <I> 2530 num_entries: 0, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 137.616161] <DRV_ADS6311> [2024-02-04 18:28:40 252.180.470] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 1
    [ 137.626607] <DRV_ADS6311> [2024-02-04 18:28:40 262.625.950] <I> 2530 num_entries: 1, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 137.637764] <DRV_ADS6311> [2024-02-04 18:28:40 273.782.180] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 2
    [ 137.648211] <DRV_ADS6311> [2024-02-04 18:28:40 284.230.620] <I> 2530 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 137.658908] <DRV_ADS6311> [2024-02-04 18:28:40 294.927.145] <I> 2502 num_routes: 4, source_pad: 0, source_stream: 3
    [ 137.669339] <DRV_ADS6311> [2024-02-04 18:28:40 305.358.510] <I> 2530 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 137.680037] cdns-csi2rx 30101000.csi-bridge: num_entries: 4, type: 2, flags: 1, stream: 0, vc*dt: 0*44;
    [ 137.680037] flags: 1, stream: 1, vc*dt: 1*44; flags: 1, stream: 2, vc*dt: 0*48; flags: 1, stream: 3, vc*dt: 1*48.
    [ 138.058123] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.065813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.178139] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.185813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.298207] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.305888] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.394094] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.401778] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
    [ 138.466288] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.473983] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
    [ 138.485369] <DRV_ADS6311> [2024-02-04 18:28:41 121.385.765] v4l2_cb <sensor_s_stream> L3603:--on:0, console_loglevel:7, dbg_ctrl:0x142a, wkmode:2(FHR), linkFreq:500000000, exposureTime:1000 us, power_on:1, mcu_chipid:0, mcu_fw_type: 0x0, drv_version: 2.0.0_LM20240308a---
    [ 138.509447] <DRV_ADS6311> [2024-02-04 18:28:41 145.462.455] <I> 3161 set_vcsel_state: 0, call from Line:3570.
    [ 138.509447]
    [ 138.521007] --HAWK--<v4l2_subdev_disable_streams_fallback> Line: 1948--s_stream(0)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [ 138.533786] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: 4, cur stream: 0, ctrl reg addr: 0x9b7e100, value: 0x2, status reg addr: 0x9b7e104, value: 0x0.
    [ 138.547573] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: 4, cur stream: 1, ctrl reg addr: 0x9b7e200, value: 0x0, status reg addr: 0x9b7e204, value: 0x0.
    [ 138.561318] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: 4, cur stream: 2, ctrl reg addr: 0x9b7e300, value: 0x2, status reg addr: 0x9b7e304, value: 0x0.
    [ 138.575125] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: 4, cur stream: 3, ctrl reg addr: 0x9b7e400, value: 0x2, status reg addr: 0x9b7e404, value: 0x0.
    [ 138.588913] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: dphy lane ctrl reg addr: 0x9b7e040, value: 0x0.
    [ 138.598534] cdns-csi2rx 30101000.csi-bridge: csi2rx_disable_streams: cdns_csi2rx.30101000.csi-bridge.
    [ 139.609896] ti-udma 4e230000.dma-controller: chan3 teardown timeout!
    [ 139.617571] <DRV_ADS6311> [2024-02-04 18:28:42 253.589.605] v4l2_cb <sensor_close> L3976:---- S_CLOSE from hawk_concurrenc (1286:1286) on CPU 1
    root@am62axx-evm:~#
    root@am62axx-evm:~#
    root@am62axx-evm:~# cat hawk_concurrency_test4.log
    Hawk concurrency test util
    Version: 1.0.0_LM20240306a
    Build Time: Mar 8 2024,07:43:50
    
    [2024-02-04 18:28:38.072.221.960] INFO: <hawk_concurrency_test.cpp-Hawk_Concurrency_Test() 112> input work_mode: 2
    [2024-02-04 18:28:38.072.320.800] INFO: <hawk_concurrency_test.cpp-Hawk_Concurrency_Test() 113> input test_case: 0
    [2024-02-04 18:28:38.072.347.530] INFO: <hawk_concurrency_test.cpp-Hawk_Concurrency_Test() 114> input dumpframe: 10
    [2024-02-04 18:28:38.072.371.400] INFO: <hawk_concurrency_test.cpp-Hawk_Concurrency_Test() 115> test_stream_cnt: 4
    [2024-02-04 18:28:38.072.403.665] INFO: <v4l2_dev.cpp-V4l2_Dev() 32> video_dev: /dev/video0
    [2024-02-04 18:28:38.072.428.170] INFO: <v4l2_dev.cpp-V4l2_Dev() 33> preset width: 2688
    [2024-02-04 18:28:38.072.454.650] INFO: <v4l2_dev.cpp-V4l2_Dev() 34> preset height: 192
    [2024-02-04 18:28:38.072.478.840] INFO: <v4l2_dev.cpp-V4l2_Dev() 35> preset pixel_format: 0x32314742
    [2024-02-04 18:28:38.072.502.455] INFO: <v4l2_dev.cpp-V4l2_Dev() 36> preset frame_buffer_count: 6
    [2024-02-04 18:28:38.072.524.960] INFO: <v4l2_dev.cpp-V4l2_Dev() 37> preset sensor_type: 0
    [2024-02-04 18:28:38.072.578.075] INFO: <hawk_stream.cpp-Initialize() 38> m_v4l2_snr_sd: 0x274292f0, raw_width:2688, raw_height:192...
    
    [2024-02-04 18:28:38.072.641.120] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 71> searching sensor m00_dToF_ads6311 spi1.0...
    [2024-02-04 18:28:38.072.666.635] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 72> enum entities...
    [2024-02-04 18:28:38.072.689.180] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 73> major:minor id entity_name device node
    [2024-02-04 18:28:38.072.712.350] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 74> -------------------------------------------------------
    [2024-02-04 18:28:38.072.821.465] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 88> 81: 6 1 30102000.ticsi2rx /dev/v4l-subdev0
    [2024-02-04 18:28:38.072.885.215] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 88> 81: 7 9 cdns_csi2rx.30101000.csi-bridge /dev/v4l-subdev1
    [2024-02-04 18:28:38.072.945.920] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 88> 81: 8 15 m00_dToF_ads6311 spi1.0 /dev/v4l-subdev2
    [2024-02-04 18:28:38.072.971.995] INFO: <v4l2_sensor_subdev.cpp-get_subdev_node_4_sensor() 93> sd_devnode_4_dtof: /dev/v4l-subdev2
    [2024-02-04 18:28:38.190.485.040] INFO: <v4l2_sensor_subdev.cpp-Set_param_4_sensor_sub_device() 112> --VIDIOC_SUBDEV_S_FMT--fd_4_dtof:4, sd_devnode_4_dtof:/dev/v4l-subdev2, width:2688, height:192
    [2024-02-04 18:28:38.261.916.485] INFO: <v4l2_sensor_subdev.cpp-Set_param_4_sensor_sub_device() 115> --VIDIOC_SUBDEV_S_FMT--ret: 0, fd_4_dtof:4, sd_devnode_4_dtof:/dev/v4l-subdev2, width:2688, height:192
    [2024-02-04 18:28:38.261.951.585] INFO: <hawk_stream.cpp-Initialize() 50> result: 0, raw_width:2688, raw_height:192...
    
    [2024-02-04 18:28:38.262.028.215] INFO: <v4l2_dev.cpp-Initialize() 252> driver: j721e-csi2rx
    [2024-02-04 18:28:38.262.047.755] INFO: <v4l2_dev.cpp-Initialize() 253> card: j721e-csi2rx
    [2024-02-04 18:28:38.262.067.300] INFO: <v4l2_dev.cpp-Initialize() 254> bus_info: platform:30102000.ticsi2rx
    [2024-02-04 18:28:38.262.083.070] INFO: <v4l2_dev.cpp-Initialize() 255> version: 0x6012e
    [2024-02-04 18:28:38.262.097.680] INFO: <v4l2_dev.cpp-Initialize() 256> capabilities: 0xa4200001
    [2024-02-04 18:28:38.262.112.815] INFO: <v4l2_dev.cpp-Initialize() 257> device_caps: 0xa4200001
    [2024-02-04 18:28:38.262.129.950] INFO: <v4l2_dev.cpp-Initialize() 275> Buffer type: V4L2_BUF_TYPE_VIDEO_CAPTURE
    [2024-02-04 18:28:38.262.145.195] INFO: <v4l2_dev.cpp-Initialize() 312> --VIDIOC_S_FMT--fd:6, video_dev:/dev/video0, 2688 X 192, pixel_format: 0x32314742, raw_width:2688, raw_height:192...
    
    [2024-02-04 18:28:38.262.227.835] INFO: <v4l2_dev.cpp-Initialize() 335> fmt.type: 1
    [2024-02-04 18:28:38.262.245.260] INFO: <v4l2_dev.cpp-Initialize() 336> pix.width: 2688
    [2024-02-04 18:28:38.262.260.510] INFO: <v4l2_dev.cpp-Initialize() 337> pix.height: 192
    [2024-02-04 18:28:38.262.278.125] INFO: <v4l2_dev.cpp-Initialize() 338> pix.field: 1
    [2024-02-04 18:28:38.264.839.020] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[0].start: 0xffff85164000, length: 1032192
    [2024-02-04 18:28:38.265.005.080] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[1].start: 0xffff85068000, length: 1032192
    [2024-02-04 18:28:38.265.117.595] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[2].start: 0xffff84f6c000, length: 1032192
    [2024-02-04 18:28:38.265.221.260] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[3].start: 0xffff84e70000, length: 1032192
    [2024-02-04 18:28:38.265.328.205] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[4].start: 0xffff84d74000, length: 1032192
    [2024-02-04 18:28:38.265.430.175] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[5].start: 0xffff84c78000, length: 1032192
    [2024-02-04 18:28:38.265.481.845] INFO: <v4l2_dev.cpp-Initialize() 366> init dev /dev/video0 [OK]
    [2024-02-04 18:28:38.265.507.600] INFO: <v4l2_dev.cpp-V4l2_Dev() 32> video_dev: /dev/video1
    [2024-02-04 18:28:38.265.523.580] INFO: <v4l2_dev.cpp-V4l2_Dev() 33> preset width: 2688
    [2024-02-04 18:28:38.265.538.375] INFO: <v4l2_dev.cpp-V4l2_Dev() 34> preset height: 192
    [2024-02-04 18:28:38.265.554.015] INFO: <v4l2_dev.cpp-V4l2_Dev() 35> preset pixel_format: 0x32314742
    [2024-02-04 18:28:38.265.571.040] INFO: <v4l2_dev.cpp-V4l2_Dev() 36> preset frame_buffer_count: 6
    [2024-02-04 18:28:38.265.585.725] INFO: <v4l2_dev.cpp-V4l2_Dev() 37> preset sensor_type: 0
    [2024-02-04 18:28:38.265.601.545] INFO: <hawk_stream.cpp-Initialize() 38> m_v4l2_snr_sd: (nil), raw_width:2688, raw_height:192...
    
    [2024-02-04 18:28:38.265.671.620] INFO: <v4l2_dev.cpp-Initialize() 252> driver: j721e-csi2rx
    [2024-02-04 18:28:38.265.688.785] INFO: <v4l2_dev.cpp-Initialize() 253> card: j721e-csi2rx
    [2024-02-04 18:28:38.265.706.815] INFO: <v4l2_dev.cpp-Initialize() 254> bus_info: platform:30102000.ticsi2rx
    [2024-02-04 18:28:38.265.722.005] INFO: <v4l2_dev.cpp-Initialize() 255> version: 0x6012e
    [2024-02-04 18:28:38.265.736.125] INFO: <v4l2_dev.cpp-Initialize() 256> capabilities: 0xa4200001
    [2024-02-04 18:28:38.265.750.890] INFO: <v4l2_dev.cpp-Initialize() 257> device_caps: 0xa4200001
    [2024-02-04 18:28:38.265.829.425] INFO: <v4l2_dev.cpp-Initialize() 275> Buffer type: V4L2_BUF_TYPE_VIDEO_CAPTURE
    [2024-02-04 18:28:38.265.845.410] INFO: <v4l2_dev.cpp-Initialize() 312> --VIDIOC_S_FMT--fd:7, video_dev:/dev/video1, 2688 X 192, pixel_format: 0x32314742, raw_width:2688, raw_height:192...
    
    [2024-02-04 18:28:38.265.927.840] INFO: <v4l2_dev.cpp-Initialize() 335> fmt.type: 1
    [2024-02-04 18:28:38.265.945.645] INFO: <v4l2_dev.cpp-Initialize() 336> pix.width: 2688
    [2024-02-04 18:28:38.265.960.815] INFO: <v4l2_dev.cpp-Initialize() 337> pix.height: 192
    [2024-02-04 18:28:38.265.975.360] INFO: <v4l2_dev.cpp-Initialize() 338> pix.field: 1
    [2024-02-04 18:28:38.268.547.975] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[0].start: 0xffff84b7c000, length: 1032192
    [2024-02-04 18:28:38.268.706.315] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[1].start: 0xffff84a80000, length: 1032192
    [2024-02-04 18:28:38.268.821.965] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[2].start: 0xffff84984000, length: 1032192
    [2024-02-04 18:28:38.268.927.535] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[3].start: 0xffff84888000, length: 1032192
    [2024-02-04 18:28:38.269.035.860] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[4].start: 0xffff8478c000, length: 1032192
    [2024-02-04 18:28:38.269.139.130] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[5].start: 0xffff84690000, length: 1032192
    [2024-02-04 18:28:38.269.190.580] INFO: <v4l2_dev.cpp-Initialize() 366> init dev /dev/video1 [OK]
    [2024-02-04 18:28:38.269.216.435] INFO: <v4l2_dev.cpp-V4l2_Dev() 32> video_dev: /dev/video2
    [2024-02-04 18:28:38.269.232.345] INFO: <v4l2_dev.cpp-V4l2_Dev() 33> preset width: 40
    [2024-02-04 18:28:38.269.249.610] INFO: <v4l2_dev.cpp-V4l2_Dev() 34> preset height: 1
    [2024-02-04 18:28:38.269.264.340] INFO: <v4l2_dev.cpp-V4l2_Dev() 35> preset pixel_format: 0x31384142
    [2024-02-04 18:28:38.269.279.105] INFO: <v4l2_dev.cpp-V4l2_Dev() 36> preset frame_buffer_count: 6
    [2024-02-04 18:28:38.269.406.235] INFO: <v4l2_dev.cpp-V4l2_Dev() 37> preset sensor_type: 0
    [2024-02-04 18:28:38.269.428.040] INFO: <hawk_stream.cpp-Initialize() 38> m_v4l2_snr_sd: (nil), raw_width:40, raw_height:1...
    
    [2024-02-04 18:28:38.269.504.740] INFO: <v4l2_dev.cpp-Initialize() 252> driver: j721e-csi2rx
    [2024-02-04 18:28:38.269.526.685] INFO: <v4l2_dev.cpp-Initialize() 253> card: j721e-csi2rx
    [2024-02-04 18:28:38.269.542.435] INFO: <v4l2_dev.cpp-Initialize() 254> bus_info: platform:30102000.ticsi2rx
    [2024-02-04 18:28:38.269.556.875] INFO: <v4l2_dev.cpp-Initialize() 255> version: 0x6012e
    [2024-02-04 18:28:38.269.572.025] INFO: <v4l2_dev.cpp-Initialize() 256> capabilities: 0xa4200001
    [2024-02-04 18:28:38.269.587.205] INFO: <v4l2_dev.cpp-Initialize() 257> device_caps: 0xa4200001
    [2024-02-04 18:28:38.269.602.015] INFO: <v4l2_dev.cpp-Initialize() 275> Buffer type: V4L2_BUF_TYPE_VIDEO_CAPTURE
    [2024-02-04 18:28:38.269.616.935] INFO: <v4l2_dev.cpp-Initialize() 312> --VIDIOC_S_FMT--fd:8, video_dev:/dev/video2, 40 X 1, pixel_format: 0x31384142, raw_width:40, raw_height:1...
    
    [2024-02-04 18:28:38.269.693.015] INFO: <v4l2_dev.cpp-Initialize() 335> fmt.type: 1
    [2024-02-04 18:28:38.269.709.565] INFO: <v4l2_dev.cpp-Initialize() 336> pix.width: 40
    [2024-02-04 18:28:38.269.727.720] INFO: <v4l2_dev.cpp-Initialize() 337> pix.height: 1
    [2024-02-04 18:28:38.269.742.200] INFO: <v4l2_dev.cpp-Initialize() 338> pix.field: 1
    [2024-02-04 18:28:38.270.048.480] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[0].start: 0xffff8573d000, length: 40
    [2024-02-04 18:28:38.270.174.565] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[1].start: 0xffff8573c000, length: 40
    [2024-02-04 18:28:38.270.282.625] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[2].start: 0xffff8573b000, length: 40
    [2024-02-04 18:28:38.270.382.385] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[3].start: 0xffff8573a000, length: 40
    [2024-02-04 18:28:38.270.481.165] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[4].start: 0xffff85739000, length: 40
    [2024-02-04 18:28:38.270.578.975] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[5].start: 0xffff85738000, length: 40
    [2024-02-04 18:28:38.270.630.360] INFO: <v4l2_dev.cpp-Initialize() 366> init dev /dev/video2 [OK]
    [2024-02-04 18:28:38.270.654.160] INFO: <v4l2_dev.cpp-V4l2_Dev() 32> video_dev: /dev/video3
    [2024-02-04 18:28:38.270.669.710] INFO: <v4l2_dev.cpp-V4l2_Dev() 33> preset width: 40
    [2024-02-04 18:28:38.270.684.025] INFO: <v4l2_dev.cpp-V4l2_Dev() 34> preset height: 1
    [2024-02-04 18:28:38.270.698.085] INFO: <v4l2_dev.cpp-V4l2_Dev() 35> preset pixel_format: 0x31384142
    [2024-02-04 18:28:38.270.713.795] INFO: <v4l2_dev.cpp-V4l2_Dev() 36> preset frame_buffer_count: 6
    [2024-02-04 18:28:38.270.728.320] INFO: <v4l2_dev.cpp-V4l2_Dev() 37> preset sensor_type: 0
    [2024-02-04 18:28:38.270.743.390] INFO: <hawk_stream.cpp-Initialize() 38> m_v4l2_snr_sd: (nil), raw_width:40, raw_height:1...
    
    [2024-02-04 18:28:38.270.812.195] INFO: <v4l2_dev.cpp-Initialize() 252> driver: j721e-csi2rx
    [2024-02-04 18:28:38.270.829.995] INFO: <v4l2_dev.cpp-Initialize() 253> card: j721e-csi2rx
    [2024-02-04 18:28:38.270.846.110] INFO: <v4l2_dev.cpp-Initialize() 254> bus_info: platform:30102000.ticsi2rx
    [2024-02-04 18:28:38.270.863.500] INFO: <v4l2_dev.cpp-Initialize() 255> version: 0x6012e
    [2024-02-04 18:28:38.270.877.815] INFO: <v4l2_dev.cpp-Initialize() 256> capabilities: 0xa4200001
    [2024-02-04 18:28:38.270.892.160] INFO: <v4l2_dev.cpp-Initialize() 257> device_caps: 0xa4200001
    [2024-02-04 18:28:38.270.907.235] INFO: <v4l2_dev.cpp-Initialize() 275> Buffer type: V4L2_BUF_TYPE_VIDEO_CAPTURE
    [2024-02-04 18:28:38.270.921.670] INFO: <v4l2_dev.cpp-Initialize() 312> --VIDIOC_S_FMT--fd:9, video_dev:/dev/video3, 40 X 1, pixel_format: 0x31384142, raw_width:40, raw_height:1...
    
    [2024-02-04 18:28:38.270.995.850] INFO: <v4l2_dev.cpp-Initialize() 335> fmt.type: 1
    [2024-02-04 18:28:38.271.012.695] INFO: <v4l2_dev.cpp-Initialize() 336> pix.width: 40
    [2024-02-04 18:28:38.271.027.915] INFO: <v4l2_dev.cpp-Initialize() 337> pix.height: 1
    [2024-02-04 18:28:38.271.042.250] INFO: <v4l2_dev.cpp-Initialize() 338> pix.field: 1
    [2024-02-04 18:28:38.271.283.175] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[0].start: 0xffff8570d000, length: 40
    [2024-02-04 18:28:38.271.392.205] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[1].start: 0xffff8570c000, length: 40
    [2024-02-04 18:28:38.271.495.220] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[2].start: 0xffff8570b000, length: 40
    [2024-02-04 18:28:38.271.596.620] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[3].start: 0xffff8570a000, length: 40
    [2024-02-04 18:28:38.271.707.890] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[4].start: 0xffff85709000, length: 40
    [2024-02-04 18:28:38.271.809.155] INFO: <v4l2_dev.cpp-alloc_buffers() 189> buffer[5].start: 0xffff85708000, length: 40
    [2024-02-04 18:28:38.271.860.730] INFO: <v4l2_dev.cpp-Initialize() 366> init dev /dev/video3 [OK]
    [2024-02-04 18:28:40.335.790.255] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=0 frame_sequence: 0 bytesused=1032192, buffer length:1032192 timestamp=136054-
    [2024-02-04 18:28:40.354.945.930] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 0/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.363.940.795] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=0 frame_sequence: 0 bytesused=1032192, buffer length:1032192 timestamp=137538-
    [2024-02-04 18:28:40.382.960.580] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 0/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.383.066.870] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=0 frame_sequence: 0 bytesused=40, buffer length:40 timestamp=137538-
    [2024-02-04 18:28:40.383.241.065] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 0/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.383.296.750] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=0 frame_sequence: 0 bytesused=40, buffer length:40 timestamp=137538-
    [2024-02-04 18:28:40.383.397.875] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 0/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.383.453.070] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=1 frame_sequence: 1 bytesused=1032192, buffer length:1032192 timestamp=136060-
    [2024-02-04 18:28:40.402.488.055] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 1/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.402.596.495] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=1 frame_sequence: 1 bytesused=1032192, buffer length:1032192 timestamp=137576-
    [2024-02-04 18:28:40.421.831.965] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 1/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.421.937.415] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=1 frame_sequence: 1 bytesused=40, buffer length:40 timestamp=137584-
    [2024-02-04 18:28:40.422.114.035] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 1/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.422.171.740] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=1 frame_sequence: 1 bytesused=40, buffer length:40 timestamp=137584-
    [2024-02-04 18:28:40.422.280.085] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 1/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.422.335.650] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=2 frame_sequence: 2 bytesused=1032192, buffer length:1032192 timestamp=136066-
    [2024-02-04 18:28:40.441.386.650] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 2/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.441.493.890] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=2 frame_sequence: 2 bytesused=1032192, buffer length:1032192 timestamp=137584-
    [2024-02-04 18:28:40.460.739.790] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 2/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.460.960.470] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=2 frame_sequence: 2 bytesused=40, buffer length:40 timestamp=137625-
    [2024-02-04 18:28:40.461.131.260] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 2/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.461.188.285] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=2 frame_sequence: 2 bytesused=40, buffer length:40 timestamp=137625-
    [2024-02-04 18:28:40.461.285.710] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 2/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.461.340.715] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=3 frame_sequence: 3 bytesused=1032192, buffer length:1032192 timestamp=136072-
    [2024-02-04 18:28:40.480.283.840] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 3/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.480.394.445] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=3 frame_sequence: 3 bytesused=1032192, buffer length:1032192 timestamp=137615-
    [2024-02-04 18:28:40.499.625.290] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 3/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.499.723.590] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=3 frame_sequence: 3 bytesused=40, buffer length:40 timestamp=137660-
    [2024-02-04 18:28:40.499.895.405] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 3/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.499.954.565] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=3 frame_sequence: 3 bytesused=40, buffer length:40 timestamp=137660-
    [2024-02-04 18:28:40.500.052.850] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 3/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.500.108.570] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=4 frame_sequence: 4 bytesused=1032192, buffer length:1032192 timestamp=136077-
    [2024-02-04 18:28:40.519.094.940] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 4/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.519.204.325] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=4 frame_sequence: 4 bytesused=1032192, buffer length:1032192 timestamp=137625-
    [2024-02-04 18:28:40.538.365.615] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 4/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.538.473.650] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=4 frame_sequence: 4 bytesused=40, buffer length:40 timestamp=137701-
    [2024-02-04 18:28:40.538.652.755] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 4/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.538.710.035] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=4 frame_sequence: 4 bytesused=40, buffer length:40 timestamp=137701-
    [2024-02-04 18:28:40.538.807.870] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 4/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.538.863.810] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=5 frame_sequence: 5 bytesused=1032192, buffer length:1032192 timestamp=136083-
    [2024-02-04 18:28:40.557.829.345] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 5/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.557.941.005] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=5 frame_sequence: 5 bytesused=1032192, buffer length:1032192 timestamp=137654-
    [2024-02-04 18:28:40.577.140.050] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 5/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.577.249.535] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=5 frame_sequence: 5 bytesused=40, buffer length:40 timestamp=137736-
    [2024-02-04 18:28:40.577.548.540] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 5/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.577.612.315] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=5 frame_sequence: 5 bytesused=40, buffer length:40 timestamp=137736-
    [2024-02-04 18:28:40.577.709.740] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 5/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.577.812.285] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=0 frame_sequence: 6 bytesused=1032192, buffer length:1032192 timestamp=137538-
    [2024-02-04 18:28:40.596.865.810] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 6/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.596.977.720] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=0 frame_sequence: 6 bytesused=1032192, buffer length:1032192 timestamp=137660-
    [2024-02-04 18:28:40.616.069.585] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 6/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.620.954.375] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=0 frame_sequence: 6 bytesused=40, buffer length:40 timestamp=137795-
    [2024-02-04 18:28:40.621.151.250] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 6/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.621.213.925] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=0 frame_sequence: 6 bytesused=40, buffer length:40 timestamp=137795-
    [2024-02-04 18:28:40.621.325.200] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 6/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.621.382.185] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=1 frame_sequence: 7 bytesused=1032192, buffer length:1032192 timestamp=137584-
    [2024-02-04 18:28:40.710.235.410] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 7/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.710.379.235] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=1 frame_sequence: 7 bytesused=1032192, buffer length:1032192 timestamp=137693-
    [2024-02-04 18:28:40.729.509.000] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 7/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.737.823.600] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=1 frame_sequence: 7 bytesused=40, buffer length:40 timestamp=137911-
    [2024-02-04 18:28:40.738.071.360] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 7/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.738.143.900] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=1 frame_sequence: 7 bytesused=40, buffer length:40 timestamp=137911-
    [2024-02-04 18:28:40.738.266.890] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 7/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.738.336.810] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=2 frame_sequence: 8 bytesused=1032192, buffer length:1032192 timestamp=137625-
    [2024-02-04 18:28:40.830.165.920] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 8/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.830.284.950] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=2 frame_sequence: 8 bytesused=1032192, buffer length:1032192 timestamp=137701-
    [2024-02-04 18:28:40.851.003.280] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 8/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.860.470.965] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=2 frame_sequence: 8 bytesused=40, buffer length:40 timestamp=138034-
    [2024-02-04 18:28:40.860.833.825] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 8/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.860.906.715] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=2 frame_sequence: 8 bytesused=40, buffer length:40 timestamp=138034-
    [2024-02-04 18:28:40.861.042.795] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 8/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:40.861.111.320] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video0, buffer index=3 frame_sequence: 9 bytesused=1032192, buffer length:1032192 timestamp=137660-
    [2024-02-04 18:28:40.950.258.630] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 9/10, test_stream_cnt: 0/4, ret: 0
    [2024-02-04 18:28:40.950.395.635] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video1, buffer index=3 frame_sequence: 9 bytesused=1032192, buffer length:1032192 timestamp=137731-
    [2024-02-04 18:28:40.972.403.490] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 9/10, test_stream_cnt: 1/4, ret: 0
    [2024-02-04 18:28:40.977.271.135] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video2, buffer index=3 frame_sequence: 9 bytesused=40, buffer length:40 timestamp=138151-
    [2024-02-04 18:28:40.977.498.725] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 9/10, test_stream_cnt: 2/4, ret: 0
    [2024-02-04 18:28:40.977.571.795] INFO: <v4l2_dev.cpp-Capture_frame() 442> ===Get a mipi frame from /dev/video3, buffer index=3 frame_sequence: 9 bytesused=40, buffer length:40 timestamp=138151-
    [2024-02-04 18:28:40.977.692.740] INFO: <hawk_concurrency_test.cpp-Testcase0() 185> dumpframe: 9/10, test_stream_cnt: 3/4, ret: 0
    [2024-02-04 18:28:42.275.031.960] NOTICE: <hawk_concurrency_test.cpp-Testcase0() 209> ------Testcase 0 PASSED--------
    
    [2024-02-04 18:28:42.275.113.975] NOTICE: <hawk_concurrency_test.cpp-main() 609> ------Test End--------
    
    root@am62axx-evm:~# ls -l /tmp
    total 20240
    drwx------ 2 root root 40 Feb 4 18:26 runtime-root
    drwx------ 3 root root 60 Feb 4 18:26 systemd-private-eb68a976a4614e20bceb79a9453f3d5c-dbus-broker.service-2D7sBd
    drwx------ 3 root root 60 Feb 4 18:26 systemd-private-eb68a976a4614e20bceb79a9453f3d5c-systemd-logind.service-7xs0lv
    drwx------ 3 root root 60 Feb 4 18:26 systemd-private-eb68a976a4614e20bceb79a9453f3d5c-systemd-resolved.service-Qux0f3
    drwx------ 3 root root 60 Apr 28 2022 systemd-private-eb68a976a4614e20bceb79a9453f3d5c-systemd-timesyncd.service-DX9U9e
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame000_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame001_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame002_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame003_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame004_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame005_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame006_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame007_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame008_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video0_frame009_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame000_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame001_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame002_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame003_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame004_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame005_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame006_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame007_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame008_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 1032192 Feb 4 18:28 video1_frame009_2688x192_1032192.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame000_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame001_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame002_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame003_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame004_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame005_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame006_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame007_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame008_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video2_frame009_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame000_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame001_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame002_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame003_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame004_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame005_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame006_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame007_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame008_40x1_40.depth_raw
    -rw-r--r-- 1 root root 40 Feb 4 18:28 video3_frame009_40x1_40.depth_raw
    root@am62axx-evm:~#
    root@am62axx-evm:~# md5sum /tmp/video*
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame000_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame001_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame002_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame003_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame004_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame005_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame006_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame007_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame008_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame009_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame000_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame001_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame002_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame003_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame004_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame005_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame006_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame007_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame008_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame009_2688x192_1032192.depth_raw
    609ba7f10ec84101d530bc69471b6599 /tmp/video2_frame000_40x1_40.depth_raw
    307ff53ccaaefc134e0544de1ceb0b00 /tmp/video2_frame001_40x1_40.depth_raw
    ab8cf0729f190bfb5e8f680d866c2b00 /tmp/video2_frame002_40x1_40.depth_raw
    c04327c77a8f29f4a8e86836f6ddd671 /tmp/video2_frame003_40x1_40.depth_raw
    55f46baa404eacc83bd5a645cd40e9d5 /tmp/video2_frame004_40x1_40.depth_raw
    e35ded43fe55fcb7a0be39a84d68d05c /tmp/video2_frame005_40x1_40.depth_raw
    87e8e734f2d7fde7562e564a84fc5e1b /tmp/video2_frame006_40x1_40.depth_raw
    737ba373d0dab1df152fa88741b3e42e /tmp/video2_frame007_40x1_40.depth_raw
    db0f5d525d03f41a83e34e30e389e982 /tmp/video2_frame008_40x1_40.depth_raw
    0bcaa489c07e1b4c30849e476e339e2c /tmp/video2_frame009_40x1_40.depth_raw
    609ba7f10ec84101d530bc69471b6599 /tmp/video3_frame000_40x1_40.depth_raw
    307ff53ccaaefc134e0544de1ceb0b00 /tmp/video3_frame001_40x1_40.depth_raw
    ab8cf0729f190bfb5e8f680d866c2b00 /tmp/video3_frame002_40x1_40.depth_raw
    c04327c77a8f29f4a8e86836f6ddd671 /tmp/video3_frame003_40x1_40.depth_raw
    55f46baa404eacc83bd5a645cd40e9d5 /tmp/video3_frame004_40x1_40.depth_raw
    e35ded43fe55fcb7a0be39a84d68d05c /tmp/video3_frame005_40x1_40.depth_raw
    87e8e734f2d7fde7562e564a84fc5e1b /tmp/video3_frame006_40x1_40.depth_raw
    737ba373d0dab1df152fa88741b3e42e /tmp/video3_frame007_40x1_40.depth_raw
    db0f5d525d03f41a83e34e30e389e982 /tmp/video3_frame008_40x1_40.depth_raw
    0bcaa489c07e1b4c30849e476e339e2c /tmp/video3_frame009_40x1_40.depth_raw
    root@am62axx-evm:~#

  • BTW, In j721e-csi2rx.c under <board-support\ti-linux-kernel-6.1.46+gitAUTOINC+247b2535b2-g247b2535b2\drivers\media\platform\ti\j721e-csi2rx\>, some error was printed with dev_dbg, I changed 'dev_dbg' to 'dev_err' to see these error log when it happens.

  • Hi David,

    We already modified dts

    Can you share the changes you made to dts?

    The "Failed to drain DMA" error was likely caused by your user application not queueing buffers quickly enough for the CSI Rx driver.

    Thanks,

    Jianzhong

  • Hi JIanzhong, 

        I have reviewed my changes for dts, I added a new file named k3-am62a7-sk-csi2-ads6311.dtso (Of course, I also modified uEnv.txt for u-boot to load k3-am62a7-sk-csi2-ads6311.dtbo), the content is as below:

    On the other hand, we also modified k3-am62a7-sk.dts, but most changes is for pinmux configure. I will post my copy next reply.

  • // SPDX-License-Identifier: GPL-2.0
    /*
     * AM62A SK: https://www.ti.com/lit/zip/sprr459
     *
     * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    /dts-v1/;
    
    #include <dt-bindings/leds/common.h>
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include "k3-am62a7.dtsi"
    
    / {
    	compatible =  "ti,am62a7-sk", "ti,am62a7";
    	model = "Texas Instruments AM62A7 SK";
    
    	aliases {
    		serial0 = &mcu_uart0;
    		serial1 = &wkup_uart0;
    		serial2 = &main_uart0;
    		mmc0 = &sdhci0;
    		mmc1 = &sdhci1;
    		ethernet0 = &cpsw_port1;
    		spi0 = &ospi0;
    	};
    
    	chosen {
    		stdout-path = "serial2:115200n8";
    	};
    
    	memory@80000000 {
    		device_type = "memory";
    		/* 4G RAM */
    		reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
    			  <0x00000008 0x80000000 0x00000000 0x80000000>;
    	};
    
    	dma_buf_phys {
    		compatible = "ti,dma-buf-phys";
    	};
    
    	reserved-memory {
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		/* global cma region */
    		linux,cma {
    			compatible = "shared-dma-pool";
    			reusable;
    			size = <0x00 0x24000000>;
    			alloc-ranges = <0x00 0xc0000000 0x00 0x24000000>;
    			linux,cma-default;
    		};
    
    		secure_tfa_ddr: tfa@9e780000 {
    			reg = <0x00 0x9e780000 0x00 0x80000>;
    			alignment = <0x1000>;
    			no-map;
    		};
    
    		secure_ddr: optee@9e800000 {
    			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
    			alignment = <0x1000>;
    			no-map;
    		};
    
    		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9c800000 0x00 0x100000>;
    			no-map;
    		};
    
    		wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9c900000 0x00 0x01e00000>;
    			no-map;
    		};
    
    		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@9b800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9b800000 0x00 0x100000>;
    			no-map;
    		};
    
    		mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9b900000 0x00 0x0f00000>;
    			no-map;
    		};
    
    		c7x_0_dma_memory_region: c7x-dma-memory@99800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x99800000 0x00 0x100000>;
    			no-map;
    		};
    
    		c7x_0_memory_region: c7x-memory@99900000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x99900000 0x00 0x01efffff>;
    			no-map;
    		};
    
    		edgeai_rtos_ipc_memory_region: edgeai-rtos-ipc-memory-region {
    			reg = <0x00 0xa0000000 0x00 0x01000000>;
    			no-map;
    		};
    
    		edgeai_memory_region: edgeai-dma-memory@a1000000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0xa1000000 0x00 0x02000000>;
    			no-map;
    		};
    
    		edgeai_shared_region: edgeai_shared-memories {
    			compatible = "dma-heap-carveout";
    			reg = <0x00 0xa3000000 0x00 0x00100000>;
    		};
    		edgeai_core_heaps: edgeai-core-heap-memory@a3100000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0xa3100000 0x00 0x02400000>;
    			no-map;
    		};
    	};
    
    	vmain_pd: regulator-0 {
    		/* TPS25750 PD CONTROLLER OUTPUT */
    		compatible = "regulator-fixed";
    		regulator-name = "vmain_pd";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vcc_5v0: regulator-1 {
    		/* Output of TPS63070 */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_5v0";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		vin-supply = <&vmain_pd>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vcc_3v3_main: regulator-2 {
    		/* output of LM5141-Q1 */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_3v3_main";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		vin-supply = <&vmain_pd>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vdd_mmc1: regulator-3 {
    		/* TPS22918DBVR */
    		compatible = "regulator-fixed";
    		regulator-name = "vdd_mmc1";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		enable-active-high;
    		/* gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; */
    	};
    
    	vcc_3v3_sys: regulator-4 {
    		/* output of TPS222965DSGT */
    		compatible = "regulator-fixed";
    		regulator-name = "vcc_3v3_sys";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		vin-supply = <&vcc_3v3_main>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vddshv_sdio: regulator-5 {
    		compatible = "regulator-gpio";
    		regulator-name = "vddshv_sdio";
    		pinctrl-names = "default";
    		/* pinctrl-0 = <&vddshv_sdio_pins_default>; */
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		vin-supply = <&ldo1>;
    		regulator-always-on;
    		/* gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>; */
    		states = <1800000 0x0>,
    			 <3300000 0x1>;
    	};
    
    	tlv320_mclk: clk-0 {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <12288000>;
    	};
    
    	codec_audio: sound {
    		compatible = "simple-audio-card";
    		simple-audio-card,name = "AM62Ax-SKEVM";
    		simple-audio-card,widgets =
    			"Headphone",	"Headphone Jack",
    			"Line",		"Line In",
    			"Microphone",	"Microphone Jack";
    		simple-audio-card,routing =
    			"Headphone Jack",	"HPLOUT",
    			"Headphone Jack",	"HPROUT",
    			"LINE1L",		"Line In",
    			"LINE1R",		"Line In",
    			"MIC3R",		"Microphone Jack",
    			"Microphone Jack",	"Mic Bias";
    		simple-audio-card,format = "dsp_b";
    		simple-audio-card,bitclock-master = <&sound_master>;
    		simple-audio-card,frame-master = <&sound_master>;
    		simple-audio-card,bitclock-inversion;
    
    		simple-audio-card,cpu {
    			sound-dai = <&mcasp1>;
    		};
    
    		sound_master: simple-audio-card,codec {
    			sound-dai = <&tlv320aic3106>;
    			clocks = <&tlv320_mclk>;
    		};
    	};
    };
    
    &main_pmx0 {
    	main_uart0_pins_default: main-uart0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
    			AM62AX_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
    		>;
    	};
    
    	main_i2c0_pins_default: main-i2c0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */
    			AM62AX_IOPAD(0x1e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */
    		>;
    	};
    
    	main_i2c1_pins_default: main-i2c1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x1e8, PIN_INPUT_PULLUP, 0) /* (B17) I2C1_SCL */
    			AM62AX_IOPAD(0x1ec, PIN_INPUT_PULLUP, 0) /* (A17) I2C1_SDA */
    		>;
    	};
    
    	main_i2c2_pins_default: main-i2c2-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x0b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */
    			AM62AX_IOPAD(0x0b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */
    		>;
    	};
    
    	main_mmc1_pins_default: main-mmc1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x23c, PIN_INPUT, 0) /* (A21) MMC1_CMD */
    			AM62AX_IOPAD(0x234, PIN_INPUT, 0) /* (B22) MMC1_CLK */
    			AM62AX_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */
    			AM62AX_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */
    			AM62AX_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */
    			AM62AX_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */
    			AM62AX_IOPAD(0x240, PIN_INPUT, 0) /* (D17) MMC1_SDCD */
    		>;
    	};
    
    	main_usb1_pins_default: main-usb1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */
    		>;
    	};
    
    	main_mdio1_pins_default: main-mdio1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x160, PIN_OUTPUT, 0) /* (V12) MDIO0_MDC */
    			AM62AX_IOPAD(0x15c, PIN_INPUT, 0) /* (V13) MDIO0_MDIO */
    		>;
    	};
    
    	main_rgmii1_pins_default: main-rgmii1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x14c, PIN_INPUT, 0) /* (AB16) RGMII1_RD0 */
    			AM62AX_IOPAD(0x150, PIN_INPUT, 0) /* (V15) RGMII1_RD1 */
    			AM62AX_IOPAD(0x154, PIN_INPUT, 0) /* (W15) RGMII1_RD2 */
    			AM62AX_IOPAD(0x158, PIN_INPUT, 0) /* (V14) RGMII1_RD3 */
    			AM62AX_IOPAD(0x148, PIN_INPUT, 0) /* (AA16) RGMII1_RXC */
    			AM62AX_IOPAD(0x144, PIN_INPUT, 0) /* (AA15) RGMII1_RX_CTL */
    			AM62AX_IOPAD(0x134, PIN_INPUT, 0) /* (Y17) RGMII1_TD0 */
    			AM62AX_IOPAD(0x138, PIN_INPUT, 0) /* (V16) RGMII1_TD1 */
    			AM62AX_IOPAD(0x13c, PIN_INPUT, 0) /* (Y16) RGMII1_TD2 */
    			AM62AX_IOPAD(0x140, PIN_INPUT, 0) /* (AA17) RGMII1_TD3 */
    			AM62AX_IOPAD(0x130, PIN_INPUT, 0) /* (AB17) RGMII1_TXC */
    			AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */
    		>;
    	};
    
    	main_mcasp1_pins_default: main-mcasp1-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x090, PIN_INPUT, 2) /* (L19) GPMC0_BE0n_CLE.MCASP1_ACLKX */
    			AM62AX_IOPAD(0x098, PIN_INPUT, 2) /* (R18) GPMC0_WAIT0.MCASP1_AFSX */
    			AM62AX_IOPAD(0x08c, PIN_OUTPUT, 2) /* (K19) GPMC0_WEn.MCASP1_AXR0 */
    			AM62AX_IOPAD(0x084, PIN_INPUT, 2) /* (L18) GPMC0_ADVn_ALE.MCASP1_AXR2 */
    		>;
    	};
    
    	main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x01d4, PIN_INPUT, 7) /* (C15) UART0_RTSn.GPIO1_23 */
    
    		>;
    	};
    
    	main_ads6311_pins_default: main-ads6311-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x00f0, PIN_INPUT_PULLDOWN, 7) /* (Y21) VOUT0_DATA14.GPIO0_59 */
    			AM62AX_IOPAD(0x00f4, PIN_OUTPUT, 7) /* (Y22) VOUT0_DATA15.GPIO0_60 */
    			/* AM62AX_IOPAD(0x00f4, PIN_OUTPUT_PULLUP, 7) (Y22) VOUT0_DATA15.GPIO0_60 */
    		>;
    	};
    
    	spi_4_ads6311_pins_default: spi_4_ads6311-default-pins {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x01bc, PIN_OUTPUT, 0) /* (A17) SPI0_CLK */
    			AM62AX_IOPAD(0x01b4, PIN_OUTPUT, 0) /* (D16) SPI0_CS0 */
    			AM62AX_IOPAD(0x01c0, PIN_INPUT, 0) /* (B15) SPI0_D0 */
    			AM62AX_IOPAD(0x01c4, PIN_INPUT, 0) /* (E15) SPI0_D1 */
    		>;
    	};
    
    	main_mmc0_pins_default: main-mmc0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x220, PIN_INPUT, 0) /* (Y3) MMC0_CMD */
    			AM62AX_IOPAD(0x218, PIN_INPUT, 0) /* (AB1) MMC0_CLKLB */
    			AM62AX_IOPAD(0x21c, PIN_INPUT, 0) /* (AB1) MMC0_CLK */
    			AM62AX_IOPAD(0x214, PIN_INPUT, 0) /* (AA2) MMC0_DAT0 */
    			AM62AX_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
    			AM62AX_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
    			AM62AX_IOPAD(0x208, PIN_INPUT_PULLUP, 0) /* (Y4) MMC0_DAT3 */
    			AM62AX_IOPAD(0x204, PIN_INPUT_PULLUP, 0) /* (AB2) MMC0_DAT4 */
    			AM62AX_IOPAD(0x200, PIN_INPUT_PULLUP, 0) /* (AC1) MMC0_DAT5 */
    			AM62AX_IOPAD(0x1fc, PIN_INPUT_PULLUP, 0) /* (AD2) MMC0_DAT6 */
    			AM62AX_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
    		>;
    	};
    
    	ospi0_pins_default: ospi0-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x000, PIN_OUTPUT, 0) /* (L22) OSPI0_CLK */
    			AM62AX_IOPAD(0x02c, PIN_OUTPUT, 0) /* (H21) OSPI0_CSn0 */
    			AM62AX_IOPAD(0x00c, PIN_INPUT, 0) /* (J21) OSPI0_D0 */
    			AM62AX_IOPAD(0x010, PIN_INPUT, 0) /* (J18) OSPI0_D1 */
    			AM62AX_IOPAD(0x014, PIN_INPUT, 0) /* (J19) OSPI0_D2 */
    			AM62AX_IOPAD(0x018, PIN_INPUT, 0) /* (H18) OSPI0_D3 */
    			AM62AX_IOPAD(0x01c, PIN_INPUT, 0) /* (K21) OSPI0_D4 */
    			AM62AX_IOPAD(0x020, PIN_INPUT, 0) /* (H19) OSPI0_D5 */
    			AM62AX_IOPAD(0x024, PIN_INPUT, 0) /* (J20) OSPI0_D6 */
    			AM62AX_IOPAD(0x028, PIN_INPUT, 0) /* (J22) OSPI0_D7 */
    			AM62AX_IOPAD(0x008, PIN_INPUT, 0) /* (L21) OSPI0_DQS */
    		>;
    	};
    
    	wkup_gpio_pins_default: wkup-gpio-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_MCU_IOPAD(0x0024, PIN_INPUT, 7) /* (C9) WKUP_UART0_RXD.MCU_GPIO0_9 */
    			AM62AX_MCU_IOPAD(0x0028, PIN_INPUT, 7) /* (E9) WKUP_UART0_TXD.MCU_GPIO0_10 */
    			AM62AX_MCU_IOPAD(0x002c, PIN_OUTPUT, 7) /* (C10) WKUP_UART0_CTSn.MCU_GPIO0_11 */
    			AM62AX_MCU_IOPAD(0x0030, PIN_INPUT, 7) /* (C8) WKUP_UART0_RTSn.MCU_GPIO0_12 */
    			AM62AX_MCU_IOPAD(0x004c, PIN_OUTPUT, 7) /* (D13) WKUP_I2C0_SCL.MCU_GPIO0_19 */
    			AM62AX_MCU_IOPAD(0x0084, PIN_OUTPUT, 7) /* (B10) WKUP_CLKOUT0.MCU_GPIO0_23 */
    			AM62AX_MCU_IOPAD(0x000, PIN_OUTPUT, 7) /* (E11) MCU_GPIO0_0 */
    		>;
    	};
    
    	epwm_pins_default: epwm-default-pins {
    		pinctrl-single,pins = <
    			AM62AX_IOPAD(0x01a0, PIN_OUTPUT, 6) /* (B20) MCASP0_AXR0.EHRPWM1_B */
    		>;
    	};
    };
    
    &epwm1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&epwm_pins_default>;
    };
    
    &mcu_pmx0 {
    	status = "okay";
    
    	pmic_irq_pins_default: pmic-irq-pins-default {
    		pinctrl-single,pins = <
    			AM62AX_MCU_IOPAD(0x0038, PIN_INPUT, 7) /* (E8) MCU_MCAN0_RX.MCU_GPIO0_14 */
    		>;
    	};
    };
    
    &mcu_gpio0 {
    	status = "okay";
    };
    
    &mcu_gpio_intr {
    	status = "okay";
    };
    
    &main_i2c0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c0_pins_default>;
    	clock-frequency = <400000>;
    
    	tps659312: pmic@48 {
    		compatible = "ti,tps6593-q1";
    		reg = <0x48>;
    		ti,primary-pmic;
    		system-power-controller;
    
    		gpio-controller;
    		#gpio-cells = <2>;
    
    		pinctrl-names = "default";
    		pinctrl-0 = <&pmic_irq_pins_default>;
    		interrupt-parent = <&mcu_gpio0>;
    		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
    
    		buck123-supply = <&vcc_3v3_sys>;
    		buck4-supply = <&vcc_3v3_sys>;
    		buck5-supply = <&vcc_3v3_sys>;
    		ldo1-supply = <&vcc_3v3_sys>;
    		ldo2-supply = <&vcc_3v3_sys>;
    		ldo3-supply = <&buck5>;
    		ldo4-supply = <&vcc_3v3_sys>;
    
    		regulators {
    			buck123: buck123 {
    				regulator-name = "vcc_core";
    				regulator-min-microvolt = <715000>;
    				regulator-max-microvolt = <895000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			buck4: buck4 {
    				regulator-name = "vcc_1v1";
    				regulator-min-microvolt = <1100000>;
    				regulator-max-microvolt = <1100000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			buck5: buck5 {
    				regulator-name = "vcc_1v8_sys";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo1: ldo1 {
    				regulator-name = "vddshv5_sdio";
    				regulator-min-microvolt = <3300000>;
    				regulator-max-microvolt = <3300000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo2: ldo2 {
    				regulator-name = "vpp_1v8";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo3: ldo3 {
    				regulator-name = "vcc_0v85";
    				regulator-min-microvolt = <850000>;
    				regulator-max-microvolt = <850000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    
    			ldo4: ldo4 {
    				regulator-name = "vdda_1v8";
    				regulator-min-microvolt = <1800000>;
    				regulator-max-microvolt = <1800000>;
    				regulator-boot-on;
    				regulator-always-on;
    			};
    		};
    	};
    };
    
    &main_i2c1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c1_pins_default>;
    	clock-frequency = <100000>;
    
    	exp1: gpio@22 {
    		compatible = "ti,tca6424";
    		reg = <0x22>;
    		gpio-controller;
    		#gpio-cells = <2>;
    
    		interrupt-parent = <&main_gpio1>;
    		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    
    		gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
    				   "BT_EN_SOC", "MMC1_SD_EN",
    				   "VPP_EN", "EXP_PS_3V3_En",
    				   "EXP_PS_5V0_En", "EXP_HAT_DETECT",
    				   "GPIO_AUD_RSTn", "GPIO_eMMC_RSTn",
    				   "UART1_FET_BUF_EN", "BT_UART_WAKE_SOC",
    				   "GPIO_HDMI_RSTn", "CSI_GPIO0",
    				   "CSI_GPIO1", "WLAN_ALERTn",
    				   "HDMI_INTn", "TEST_GPIO2",
    				   "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
    				   "MCASP1_FET_SEL", "UART1_FET_SEL",
    				   "PD_I2C_IRQ", "IO_EXP_TEST_LED";
    
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
    	};
    
    	exp2: gpio@23 {
    		compatible = "ti,tca6424";
    		reg = <0x23>;
    		gpio-controller;
    		#gpio-cells = <2>;
    
    		gpio-line-names = "", "",
    				  "", "",
    				  "", "",
    				  "", "",
    				  "WL_LT_EN", "CSI_RSTz",
    				  "", "",
    				  "", "",
    				  "", "",
    				  "SPI0_FET_SEL", "SPI0_FET_OE",
    				  "RGMII2_BRD_CONN_DET", "CSI_SEL2",
    				  "CSI_EN", "AUTO_100M_1000M_CONFIG",
    				  "CSI_VLDO_SEL", "SoC_WLAN_SDIO_RST";
    	};
    
    	tlv320aic3106: audio-codec@1b {
    		#sound-dai-cells = <0>;
    		compatible = "ti,tlv320aic3106";
    		reg = <0x1b>;
    		ai3x-micbias-vg = <1>;	/* 2.0V */
    		ai3x-ocmv = <1>;	/* 1.5V */
    
    		/* Regulators */
    		AVDD-supply = <&vcc_3v3_sys>;
    		IOVDD-supply = <&vcc_3v3_sys>;
    		DRVDD-supply = <&vcc_3v3_sys>;
    	};
    };
    
    &main_i2c2 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c2_pins_default>;
    	clock-frequency = <400000>;
    };
    
    &sdhci1 {
    	/* SD/MMC */
    	status = "okay";
    	vmmc-supply = <&vdd_mmc1>;
    	vqmmc-supply = <&vddshv_sdio>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc1_pins_default>;
    	ti,driver-strength-ohm = <50>;
    	disable-wp;
    	no-1-8-v;
    };
    
    &main_gpio0 {
    	status = "okay";
    };
    
    &main_gpio1 {
    	status = "okay";
    };
    
    &main_gpio_intr {
    	status = "okay";
    };
    
    &main_uart0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart0_pins_default>;
    	interrupts-extended = <&gic500 GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
    			<&main_pmx0 0x1c8>; /* (D14) UART0_RXD PADCONFIG114 */
    	interrupt-names = "irq", "wakeup";
    };
    
    &usbss0 {
    	status = "okay";
    	ti,vbus-divider;
    };
    
    &usb0 {
    	dr_mode = "host";
    	pinctrl-names = "default";
    };
    
    &usbss1 {
    	status = "okay";
    };
    
    &usb1 {
    	dr_mode = "host";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usb1_pins_default>;
    };
    
    &cpsw3g {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_rgmii1_pins_default>;
    
    	cpts@3d000 {
    		/* MAP HW3_TS_PUSH to GENF1 */
    		ti,pps = <2 1>;
    	};
    };
    
    &cpsw_port1 {
    	status = "okay";
    	phy-mode = "rgmii-rxid";
    	phy-handle = <&cpsw3g_phy0>;
    };
    
    &cpsw_port2 {
    	status = "disabled";
    };
    
    &cpsw3g_mdio {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mdio1_pins_default>;
    
    	cpsw3g_phy0: ethernet-phy@2 {
    		compatible = "ethernet-phy-id002b.0980";
    		reg = <2>;
    		ti,rx-internal-delay = <10>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    	};
    };
    
    &mcasp1 {
    	status = "okay";
    	#sound-dai-cells = <0>;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mcasp1_pins_default>;
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    
    	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
    	       1 0 2 0
    	       0 0 0 0
    	       0 0 0 0
    	       0 0 0 0
    	>;
    	tx-num-evt = <32>;
    	rx-num-evt = <32>;
    };
    
    &ti_csi2rx0 {
    	status = "okay";
    };
    
    &dphy0 {
    	status = "okay";
    };
    
    &fss {
    	status = "okay";
    };
    
    &ospi0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&ospi0_pins_default>;
    
    	flash@0{
    		compatible = "spi-nand";
    		reg = <0x0>;
    		spi-tx-bus-width = <8>;
    		spi-rx-bus-width = <8>;
    		spi-max-frequency = <25000000>;
    		cdns,tshsl-ns = <60>;
    		cdns,tsd2d-ns = <60>;
    		cdns,tchsh-ns = <60>;
    		cdns,tslch-ns = <60>;
    		cdns,read-delay = <2>;
    		cdns,phy-mode;
    
    		partitions {
    			compatible = "fixed-partitions";
    			#address-cells = <1>;
    			#size-cells = <1>;
    
    			partition@0 {
    				label = "ospi_nand.tiboot3";
    				reg = <0x0 0x80000>;
    			};
    
    			partition@80000 {
    				label = "ospi_nand.tispl";
    				reg = <0x80000 0x200000>;
    			};
    
    			partition@280000 {
    				label = "ospi_nand.u-boot";
    				reg = <0x280000 0x400000>;
    			};
    
    			partition@680000 {
    				label = "ospi_nand.env";
    				reg = <0x680000 0x40000>;
    			};
    
    			partition@6c0000 {
    				label = "ospi_nand.env.backup";
    				reg = <0x6c0000 0x40000>;
    			};
    
    			partition@2000000 {
    				label = "ospi_nand.rootfs";
    				reg = <0x2000000 0x5fc0000>;
    			};
    
    			partition@7fc0000 {
    				label = "ospi_nand.phypattern";
    				reg = <0x7fc0000 0x40000>;
    			};
    		};
    	};
    };
    
    &mailbox0_cluster0 {
    	ti,mbox-num-fifos = <2>;
    	mbox_r5_0: mbox-r5-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &mailbox0_cluster1 {
    	ti,mbox-num-fifos = <2>;
    	mbox_c7x_0: mbox-c7x-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &mailbox0_cluster2 {
    	ti,mbox-num-fifos = <2>;
    	mbox_mcu_r5_0: mbox-mcu_r5-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &c7x_0 {
    	mboxes = <&mailbox0_cluster1 &mbox_c7x_0>;
    	memory-region = <&c7x_0_dma_memory_region>,
    			<&c7x_0_memory_region>;
    };
    
    &wkup_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
    	memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
    		<&wkup_r5fss0_core0_memory_region>;
    };
    
    &mcu_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster2 &mbox_mcu_r5_0>;
    	memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
    			<&mcu_r5fss0_core0_memory_region>;
    };
    
    #define K3_TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
    
    &timesync_router {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&cpsw_cpts>;
    
    	/* Use Time Sync Router to map GENF1 input to HW3_TS_PUSH output */
    	cpsw_cpts: cpsw-cpts {
    		pinctrl-single,pins = <
    			/* pps [cpsw cpts genf1] in17 -> out12 [cpsw cpts hw3_push] */
    			K3_TS_OFFSET(12, 17)
    			>;
    	};
    };
    
    &sdhci0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_mmc0_pins_default>;
    	ti,driver-strength-ohm = <50>;
    	disable-wp;
    };
    

  • Hi Jianzhong,

       The last reply is my k3-am62a7-sk.dts. Thanks

  • Hi David,

    Looks like you reduced the size of edgeai_shared_region and edgeai_core_heaps:

            edgeai_shared_region: edgeai_shared-memories {
                compatible = "dma-heap-carveout";
                reg = <0x00 0xa3000000 0x00 0x00100000>;
            };
            edgeai_core_heaps: edgeai-core-heap-memory@a3100000 {
                compatible = "shared-dma-pool";
                reg = <0x00 0xa3100000 0x00 0x02400000>;
                no-map;
            };

    Are you using these memories in your application?

    What does "hawk_concurrency_test" do?

    Regards,

    Jianzhong

  • Hi Jianzhong,

       Looks like you reduced the size of edgeai_shared_region and edgeai_core_heaps: --- This modification is done by Desay SW engineer, I'm not sure what does it mean. Anyway, are there any side effects because of this modification? If need, I can restore it to try tomorrow.

       On the other hand, "hawk_concurrency_test" is an simple application by me, which used v4l2 api to capture raw data, it is similar with yavta or v4l2-ctl, but it is much simplier.

    Thanks and best regards

    David

  • Hi David,

    Can you try yavta and see if that helps?

    Regards,

    Jianzhong

  • Hi Jianzhong,

        I will try yavta today when I get to our office, but this may be not the issue. Qingfeng ever used v4l-ctl utils to do test, some same thing happened.

        Now we are seeing 3 points:

    1. There is some errors in the log, it looks some DMA error are happening:

    [ 138.058123] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.065813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.178139] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.185813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.298207] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.305888] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.394094] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.401778] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
    [ 138.466288] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.473983] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus

    2. Some captured raw data files are incorrect according the MD5sum value.  BTW, I enabled TEST PATTERN output for our dToF sensor, the output raw data should be fixed, with a fixed MD5 value, as I tested before on Rk3568.  As below, the highlighted files has incorrect MD5 value, while other files are correct.

    root@am62axx-evm:~# md5sum /tmp/video*
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame000_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame001_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame002_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame003_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame004_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame005_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame006_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame007_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame008_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame009_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame000_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame001_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame002_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame003_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame004_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame005_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame006_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame007_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video1_frame008_2688x192_1032192.depth_raw
    47532ad8274f164da0c6e804f1e65223 /tmp/video1_frame009_2688x192_1032192.depth_raw

     

    3. It looks some ecc/crc error are happening from the status registers, we added some code at the begin of csi2rx_stop() of drivers\media\platform\cadence\cdns-csi2rx.c, is this a correct location for printing these status? I tested many times, some err_irqs is as below, according to my search result for keyword "err_irqs".

    4. In set_fmt() callback of our senor driver, I setup the link frequency (500MHz) and pixel rate with the following code, is it enough? Can I view and check the current mipi frequency setting for SoC mipi RX side by checking someone register(s)? We don't find these code util now, we do have some worry.

    /* pixel rate = link frequency * 2 * lanes / BITS_PER_SAMPLE */
    static u64 __maybe_unused to_pixel_rate(u32 f_index)
    {
    u64 pixel_rate = sensor_link_freq_items[f_index] * 2LL * SENSOR_LANES;

    do_div(pixel_rate, SENSOR_BITS_PER_SAMPLE);

    return pixel_rate;
    }

    __v4l2_ctrl_s_ctrl(sensor->ctrl_linkfreqency, sensor->cur_mode->link_freq_index);
    __v4l2_ctrl_s_ctrl_int64(sensor->ctrl_pixelrate, to_pixel_rate(sensor->cur_mode->link_freq_index));

       Please help to check the above points, maybe it help.

    Thanks and Best Regards,

    David

  • Hi Jianzhong,

        This morning, I tried to use v4l2 ultils to capture some raw file from our dToF sensor. The steps are as below:

    1. Insmod our dToF sensor driver, 

         CMD: insmod ads6311.ko;

    2. Open some run-time switches of ads6311.c driver to enable TEST PATTERN to output the fixed raw data, and enable more debug log;

        CMD: echo 0x142a > /sys/kernel/debug/adaps/dbg_ctrl

    3. open some run-time switches of v4l2 devices and subdevices

        CMD:

         echo 0xff > /sys/class/video4linux/video0/dev_debug
         echo 0xff > /sys/class/video4linux/video1/dev_debug
         echo 0xff > /sys/class/video4linux/video2/dev_debug
         echo 0xff > /sys/class/video4linux/video3/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug

    4. set v4l2 routing for cdns_csi2rx.30101000.csi-bridge and 30102000.ticsi2rx:

       CMD:

       media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"
       media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 1/0 [1], 0/1 -> 2/0 [1], 0/2 -> 3/0 [1], 0/3 -> 4/0 [1]]"

    5. start up stream 0---3 step by step, and capture 10 frames for every stream, and save to files (/tmp)

      CMD:

       v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=10 --stream-poll > v4l2_ctl_v0.log 2>v4l2_ctl_v0_error.log

       v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC1.raw12 --stream-count=10 --stream-poll >> v4l2_ctl_v1.log 2>>v4l2_ctl_v1_error.log

       v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=10 --stream-poll >> v4l2_ctl_v0.log 2>>v4l2_ctl_v0_error.log

       v4l2-ctl --verbose -d /dev/video3 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC1.raw8 --stream-count=10 --stream-poll >> v4l2_ctl_v1.log 2>>v4l2_ctl_v1_error.log

    6.  view and check the md5 value for raw files (For v4l2-ctl, 10-frames raw data is saved to the same file for every stream)

        CMD:

        md5sum /tmp/2688x192_SBGGR12_1X12_VC*  // this will output as below

    4f1de82b9fc1ac88ee059f06b95153e0 /tmp/2688x192_SBGGR12_1X12_VC0.raw12
    5cd4d9a618b339640a241f79e817d3fc /tmp/2688x192_SBGGR12_1X12_VC1.raw12
       

    7. copy the raw files at /tmp to TF card (/run/media/BOOT-mmcblk1p1/4G), to transfer to my PC

       CMD:

        cp /tmp/2688x192_SBGGR12_1X12_VC* .

    ---------------------------The following steps is done on my PC--------------------------------------

    8. check the md5sum value for raw file copied to my PC

    David.chen@SZ-PC002 MINGW64 /c/work/Desay/raw/0312a
    $ md5sum 2688x192_SBGGR12_1X12_VC1.raw12
    4f1de82b9fc1ac88ee059f06b95153e0 *2688x192_SBGGR12_1X12_VC1.raw12

    David.chen@SZ-PC002 MINGW64 /c/work/Desay/raw/0312a
    $ md5sum 2688x192_SBGGR12_1X12_VC0.raw12
    5cd4d9a618b339640a241f79e817d3fc *2688x192_SBGGR12_1X12_VC0.raw12

    9. Split the raw file to 10 parts:

        CMD:

        c:\work\tools\split_binary_file.py 2688x192_SBGGR12_1X12_VC0.raw12 10

        c:\work\tools\split_binary_file.py 2688x192_SBGGR12_1X12_VC1.raw12 10

    10. check the md5sum values for every parts:


    $ md5sum 2688x192_SBGGR12_1X12_VC0.raw12_part*
    5e946032e9053ffd742c618718fb2808 *2688x192_SBGGR12_1X12_VC0.raw12_part1
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC0.raw12_part10
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC0.raw12_part2
    5e946032e9053ffd742c618718fb2808 *2688x192_SBGGR12_1X12_VC0.raw12_part3
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC0.raw12_part4
    5e946032e9053ffd742c618718fb2808 *2688x192_SBGGR12_1X12_VC0.raw12_part5
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC0.raw12_part6
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC0.raw12_part7
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC0.raw12_part8
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC0.raw12_part9


    $ md5sum 2688x192_SBGGR12_1X12_VC1.raw12_part*
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part1
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part10
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part2
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part3
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part4
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part5
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part6
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part7
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part8
    6471076892740e3a2aab7206a01869c4 *2688x192_SBGGR12_1X12_VC1.raw12_part9

    Conclusion:

       As you can see, some raw files has incorrect md5sum value even if I used v4l2-ctl utils instead of my hawk_concurrency_test App. 

  • Hi Jianzhong,

       Today I paid more attention to mipi status, I tested many times, found it seems crc error always are there, but most time the raw data is correct. Please see my summaried result as below:

    Best Regards,

    David

  •    Hi David,

    1. for the Drain dma buffer: There is some errors in the log, it looks some DMA error are happening:

    [ 138.058123] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.065813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.178139] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.185813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.298207] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.305888] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.394094] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.401778] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
    [ 138.466288] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.473983] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus

    Jai will provide the patch to confirm this is a real error or wrong print only, if it is a wrong print, You can ignore this error. in the next version sdk will be fixed.

    2. for the md5 sum error:

    media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 2/0 [1], 0/1 -> 3/0 [1], 0/2 -> 4/0 [1], 0/3 -> 5/0 [1]]"

    3. CRC error, this is cadence IP status register. cadence IP hardware receive error. May related the steam on one by one, need combine the stream use below command:

    v4l2-ctl -d 0 ... & v4l2-ctl -d 1 ... & v4l2-ctl -d 3 ... & v4l2-ctl -d 4

    BR,

    Biao 

  •    Hi David,

    1. for the Drain dma buffer: There is some errors in the log, it looks some DMA error are happening:

    [ 138.058123] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.065813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.178139] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.185813] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.298207] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.305888] j721e-csi2rx 30102000.ticsi2rx: Failed to drain DMA. Next frame might be bogus
    [ 138.394094] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.401778] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
    [ 138.466288] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [ 138.473983] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus

    Jai will provide the patch to confirm this is a real error or wrong print only, if it is a wrong print, You can ignore this error. in the next version sdk will be fixed.

    2. for the md5 sum error, try not to use video0, but use video1 to video 4 instead:

    media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 2/0 [1], 0/1 -> 3/0 [1], 0/2 -> 4/0 [1], 0/3 -> 5/0 [1]]"

    3. CRC error, this is cadence IP status register. cadence IP hardware receive error. May related the steam on one by one, need combine the stream use below command:

    v4l2-ctl -d 0 ... & v4l2-ctl -d 1 ... & v4l2-ctl -d 3 ... & v4l2-ctl -d 4

    4. Link frequency can check in TRM, need Jianzhong and Jai help point out the specific register. 

    BR,

    Biao 

  • David,

    Please provide an update about the impact of the patch that removed the limit of 16-byte aligned transfer, i.e. the difference before and after applying the patch.

    Thank you.

    Jianzhong

  • Hi Biao and Jianzhong,

    2. for the md5 sum error:

    media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 2/0 [1], 0/1 -> 3/0 [1], 0/2 -> 4/0 [1], 0/3 -> 5/0 [1]]"

     I tried this with the following steps, but the captured result still has mismatched md5 value. So I think it doesn't help.

    -------------------------------------------

    1. Insmod our dToF sensor driver, 

         CMD: insmod ads6311.ko;

    2. Open some run-time switches of ads6311.c driver to enable TEST PATTERN to output the fixed raw data, and enable more debug log;

        CMD: echo 0x142a > /sys/kernel/debug/adaps/dbg_ctrl

    3. open some run-time switches of v4l2 devices and subdevices

        CMD:

         echo 0xff > /sys/class/video4linux/video0/dev_debug
         echo 0xff > /sys/class/video4linux/video1/dev_debug
         echo 0xff > /sys/class/video4linux/video2/dev_debug
         echo 0xff > /sys/class/video4linux/video3/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug

    4. set v4l2 routing for cdns_csi2rx.30101000.csi-bridge and 30102000.ticsi2rx:

       CMD:

       media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"

       media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 2/0 [1], 0/1 -> 3/0 [1], 0/2 -> 4/0 [1], 0/3 -> 5/0 [1]]"

    5. set format for dToF sensor sub device (whose driver is Ads6311.c)

        CMD:

        media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/0 [fmt:SBGGR12_1X12/2688x192]'
        media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/1 [fmt:SBGGR12_1X12/2688x192]'
        media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/2 [fmt:SBGGR8_1X8/40x1]'
        media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/3 [fmt:SBGGR8_1X8/40x1]'

    6. start up stream 0---3 step by step, and capture 10 frames for every stream, and save to files (/tmp)

        CMD:

         v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=10 --stream-poll > v4l2_ctl_v0.log 2>v4l2_ctl_v0_error.log

         v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC1.raw12 --stream-count=10 --stream-poll >> v4l2_ctl_v1.log 2>>v4l2_ctl_v1_error.log

         v4l2-ctl --verbose -d /dev/video3 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=10 --stream-poll >> v4l2_ctl_v0.log 2>>v4l2_ctl_v0_error.log

         v4l2-ctl --verbose -d /dev/video4 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC1.raw8 --stream-count=10 --stream-poll >> v4l2_ctl_v1.log 2>>v4l2_ctl_v1_error.log

    7. view and check the md5 value for raw files (For v4l2-ctl, 10-frames raw data is saved to the same file for every stream)

       CMD:

       /tmp/2688*     // this will output as below,  the md5sum looks correct this time.

    4f1de82b9fc1ac88ee059f06b95153e0 /tmp/2688x192_SBGGR12_1X12_VC0.raw12
    4f1de82b9fc1ac88ee059f06b95153e0 /tmp/2688x192_SBGGR12_1X12_VC1.raw12

    8. remove the captured raw files: (To try once more)

       CMD:

       rm /tmp/*.raw12

       rm /tmp/*.raw8

    9. Repeat step 6 once more.

    10. view and check the md5 value for raw files again 

        CMD:

         md5sum /tmp/2688*    // it will output as below:

    d41d8cd98f00b204e9800998ecf8427e /tmp/2688x192_SBGGR12_1X12_VC0.raw12 
    c69e3dd8c33b0a6c48f1b07df861562f /tmp/2688x192_SBGGR12_1X12_VC1.raw12

        These 2 .raw12 file has incorrect md5sum value.

       Please check the detailed steps and log from he attched log file.MobaXterm_TI_SoC_Uart_20240313_141046.txt

  • Please provide an update about the impact of the patch that removed the limit of 16-byte aligned transfer, i.e. the difference before and after applying the patch.

    Hi Jianzhong,

       As I saw, this patch does help for our user data stream output, whose width is 40. Nothing else is helped.

    Thanks and Best Regards,

    David

  • 3. CRC error, this is cadence IP status register. cadence IP hardware receive error. May related the steam on one by one, need combine the stream use below command:

    v4l2-ctl -d 0 ... & v4l2-ctl -d 1 ... & v4l2-ctl -d 3 ... & v4l2-ctl -d 4

    I tried the following command, Linux kernel is crashed, please see attched log file MobaXterm_TI_SoC_Uart_20240313_143941.txt

    v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=10 --stream-poll &
    v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC1.raw12 --stream-count=10 --stream-poll &
    v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=10 --stream-poll &
    v4l2-ctl --verbose -d /dev/video3 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC1.raw8 --stream-count=10 --stream-poll >> v4l2_ctl_v1.log 2>>v4l2_ctl_v1_error.log

    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# insmod ads6311.ko
    [  194.596640] <DRV_ADS6311> [2022-04-30 00:24:34.900.761.285] <N> 8894 ----- Probe Start -------
    [  194.605407] ads6311 virtio0.ti.ipc4.ping-pong.-1.13: mcuctrl_rpmsg_probe() Line:7719
    [  194.613174] <DRV_ADS6311> [2022-04-30 00:24:34.917.299.910] <N> 7726 new channel: 0x401 -> 0xd, rpmsg_device_id: ti.ipc4.ping-pong, endpoint address: 0x401!
    [  194.613174]
    [  194.944884] <DRV_ADS6311> [2022-04-30 00:24:35.249.000.865] <N> 7739 done, ret:0!
    [  194.944884]
    [  194.954530] ads6311 virtio2.ti.ipc4.ping-pong.-1.14: mcuctrl_rpmsg_probe() Line:7719
    [  194.962352] <DRV_ADS6311> [2022-04-30 00:24:35.266.474.890] <E> 7722 This is NOT MCU core, rpdev->dst: 14
    [  194.971968] ads6311 virtio2.ti.ipc4.ping-pong.-1.14: rpmsg_dev_probe: failed: -22
    [  194.979509] ads6311: probe of virtio2.ti.ipc4.ping-pong.-1.14 failed with error -22
    [  194.987286] ads6311 virtio1.ti.ipc4.ping-pong.-1.14: mcuctrl_rpmsg_probe() Line:7719
    [  194.995062] <DRV_ADS6311> [2022-04-30 00:24:35.299.185.365] <E> 7722 This is NOT MCU core, rpdev->dst: 14
    [  195.004685] ads6311 virtio1.ti.ipc4.ping-pong.-1.14: rpmsg_dev_probe: failed: -22
    [  195.012198] ads6311: probe of virtio1.ti.ipc4.ping-pong.-1.14 failed with error -22
    [  195.019964] SPI driver adaps,ads6311spi has no spi_device_id for adaps,ads6311spi
    [  195.027675] adaps,ads6311spi spi1.0: cam_sensor_spi_driver_probe() Line:6178
    [  195.034940] adaps,ads6311spi spi1.0: Consider updating driver adaps,ads6311spi to match on endpoints
    [  195.049676] <DRV_ADS6311> [2022-04-30 00:24:35.353.737.865] <N> 6200 done, ret:0!
    [  195.049676]
    [  195.069069] <DRV_ADS6311> [2022-04-30 00:24:35.373.133.945] <N> 8942 ----- Start calib_flash_spi_driver Probe-------
    [  195.080331] SPI driver adaps,calib_flash has no spi_device_id for adaps,calib_flash
    [  195.092629] <DRV_ADS6311> [2022-04-30 00:24:35.396.751.190] <N> 8944 ----- Start calib_flash_spi_driver Probe--rc:0-----
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0x142a > /sys/kernel/debug/adaps/dbg_ctrl
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# [  195.136093] <DRV_ADS6311> [2022-04-30 00:24:35 440.215.060] v4l2_cb <sensor_init_cfg> L2580:client: v4l_id (1284:1284) is running on CPU 0
    [  195.149082] <DRV_ADS6311> [2022-04-30 00:24:35 453.205.155] v4l2_cb <sensor_open> L4000:---- S_OPEN  from v4l_id (1284:1284) on CPU 0
    [  195.161217] <DRV_ADS6311> [2022-04-30 00:24:35 465.341.590] v4l2_cb <sensor_close> L3972:---- S_CLOSE  from v4l_id (1284:1284) on CPU 0
    
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video0/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video1/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video2/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video3/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 1/0 [1], 0/1 -> 2/0 [1], 0/2 -> 3/0 [1], 0/3 -> 4/0 [1]]"
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# ls -l /tmp
    total 0
    drwx------ 2 root root 40 Apr 30 00:21 runtime-root
    drwx------ 3 root root 60 Apr 30 00:21 systemd-private-4ad8a9650e71455297dbdd36472e5822-dbus-broker.service-n2AunJ
    drwx------ 3 root root 60 Apr 30 00:21 systemd-private-4ad8a9650e71455297dbdd36472e5822-systemd-logind.service-Zjx7LP
    drwx------ 3 root root 60 Apr 30 00:21 systemd-private-4ad8a9650e71455297dbdd36472e5822-systemd-resolved.service-UsEVq4
    drwx------ 3 root root 60 Apr 28 17:42 systemd-private-4ad8a9650e71455297dbdd36472e5822-systemd-timesyncd.service-o6fzdG
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=10 --stream-poll &
    [1] 1289
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# VIDIOC_QUERYCAP: ok
    VIDIOC_G_FMT: ok
    VIDIOC_S_FMT: ok
    Format Video Capture:
            Width/Height      : 2688/192
            Pixel Format      : 'BG12' (12-bit Bayer BGBG/GRGR)
            Field             : None
            Bytes per Line    : 0
            Size Image        : 1032192
            Colorspace        : sRGB
            T[  258.856436] <DRV_ADS6311> [2022-04-30 00:25:39 160.558.020] v4l2_cb <sensor_get_frame_desc> L2496:client: v4l2-ctl (1289:1289) is running on CPU 1, pad: 0, name:m00_dToF_ads6311 spi1.0, fd: 000000004ab40293
    ransfer Function : Default (maps to sRGB)
            YCbCr/HSV Encoding: [  258.878347] <DRV_ADS6311> [2022-04-30 00:25:39 182.470.480] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 0
    Default (maps to ITU-R 601)
            Quantization      : Default (maps [  258.894252] <DRV_ADS6311> [2022-04-30 00:25:39 198.377.590] <I> 2540 num_entries: 0, w*h: 480 * 128, code: 0x3008, bpp: 16
    to Full Range)
            Flags             :
                    VIDIOC_REQBUFS returned[  258.910888] <DRV_ADS6311> [2022-04-30 00:25:39 215.013.870] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 1
     0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_Q[  258.927082] <DRV_ADS6311> [2022-04-30 00:25:39 231.208.635] <I> 2540 num_entries: 1, w*h: 480 * 128, code: 0x3008, bpp: 16
    UERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Succ[  258.943887] <DRV_ADS6311> [2022-04-30 00:25:39 248.013.240] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 2
    ess)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF [  258.960000] <DRV_ADS6311> [2022-04-30 00:25:39 264.125.685] <I> 2540 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    [  258.976258] <DRV_ADS6311> [2022-04-30 00:25:39 280.384.395] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 3
    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF returned 0 (Succ[  258.992224] <DRV_ADS6311> [2022-04-30 00:25:39 296.350.095] <I> 2540 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    ess)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF returned[  259.009140] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000024
     0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF [  259.022749] Mem abort info:
    returned 0 (Success)
    [  259.031069]   ESR = 0x0000000096000006
    [  259.036708]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  259.042016]   SET = 0, FnV = 0
    [  259.045068]   EA = 0, S1PTW = 0
    [  259.048208]   FSC = 0x06: level 2 translation fault
    [  259.053169] Data abort info:
    [  259.056138]   ISV = 0, ISS = 0x00000006
    [  259.060060]   CM = 0, WnR = 0
    [  259.063115] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000883b31000
    [  259.069638] [0000000000000024] pgd=080000089400f003, p4d=080000089400f003, pud=080000088c191003, pmd=0000000000000000
    [  259.080336] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
    [  259.086592] Modules linked in: ads6311 overlay cdns_csi2rx rpmsg_ctrl rpmsg_char v4l2_fwnode j721e_csi2rx videobuf2_dma_contig v4l2_mem2mem videobuf2_memops videobuf2_v4l2 ti_k3_r5_remoteproc videobuf2_common ti_k3_dsp_remoteproc v4l2_async virtio_rpmsg_bus videodev rpmsg_ns ti_k3_common cdns_dphy_rx mc spi_omap2_mcspi
    [  259.114837] CPU: 1 PID: 1289 Comm: v4l2-ctl Not tainted 6.1.46-dirty #1
    [  259.121437] Hardware name: Texas Instruments AM62A7 SK (DT)
    [  259.126995] pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  259.133942] pc : sensor_s_stream+0x284/0x51c [ads6311]
    [  259.139090] lr : sensor_s_stream+0x224/0x51c [ads6311]
    [  259.144227] sp : ffff80000ac238d0
    [  259.147529] x29: ffff80000ac23990 x28: ffff000805079600 x27: ffff000806c214b8
    [  259.154654] x26: 0000000000000000 x25: ffff000806c20c98 x24: ffff0008019a6010
    [  259.161779] x23: 0000000000000000 x22: ffff800000d2a000 x21: 0000000000000001
    [  259.168904] x20: ffff000803a78c00 x19: ffff000803a78800 x18: 000000000000ea60
    [  259.176028] x17: 0000947000000008 x16: 0000000000017318 x15: 0003ff700000ea60
    [  259.183152] x14: 00000000000000a0 x13: ffff800000d27280 x12: 0000000000000e0f
    [  259.190276] x11: 0000000000000007 x10: 0000000000000000 x9 : 00000000000f4240
    [  259.197486] x8 : 0000000000000000 x7 : 000000000004c7a2 x6 : 000000000000ddcc
    [  259.204783] x5 : ffff800009241000 x4 : ffff800000d26d00 x3 : 00000000000003e8
    [  259.212081] x2 : ffff800000d20528 x1 : 000000000000ddcc x0 : 0000000012abd170
    [  259.219379] Call trace:
    [  259.221v940l32]- c tsle n-s-ovre_rsb_osster e-adm +/0dxe2v8/4e[  259.227562]  v4l2_subdev_enable_streams+0x248/0x2bc [videodev]
    [  259.233453]  csi2rx_enable_streams+0x8c/0x1e0 [cdns_csi2rx]
    [  259.239020]  v4l2_subdev_enable_streams+0xf0/0x2bc [videodev]
    [  259.244810]  ti_csi2rx_sd_enable_streams+0xcc/0xf4 [j721e_csi2rx]
    [  259.250897]  v4l2_subdev_enable_streams+0xf0/0x2bc [videodev]
    [  259.256686]  ti_csi2rx_start_streaming+0x1b0/0x2cc [j721e_csi2rx]
    [  259.262773]  vb2_start_streaming+0x68/0x15c [videobuf2_common]
    [  259.268611]  vb2_core_streamon+0x90/0x190 [videobuf2_common]
    [  259.274270]  vb2_ioctl_streamon+0x5c/0xb0 [videobuf2_v4l2]
    [  259.279759]  v4l_streamon+0x24/0x30 [videodev]
    [  259.284247]  __video_do_ioctl+0x18c/0x3dc [videodev]
    [  259.289256]  video_usercopy+0x21c/0x6d0 [videodev]
    [  259.294092]  video_ioctl2+0x18/0x30 [videodev]
    [  259.298580]  v4l2_ioctl+0x40/0x60 [videodev]
    [  259.302895]  __arm64_sys_ioctl+0xa8/0xf0
    [  259.306816]  invoke_syscall+0x48/0x114
    [  259.310559]  el0_svc_common.constprop.0+0xd4/0xfc
    [  259.315254]  do_el0_svc+0x20/0x30
    [  259.318560]  el0_svc+0x28/0xa0
    [  259.321611]  el0t_64_sync_handler+0xbc/0x140
    [  259.325870]  el0t_64_sync+0x18c/0x190
    [  259.329529] Code: f9003fe2 9b0380ee b94320ab 5281c1ec (b9402505)
    [  259.335608] ---[ end trace 0000000000000000 ]---
    

    Then I tried the below command too, It seems not work too. please see attched log file MobaXterm_TI_SoC_Uart_20240313_144314.txt

    v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=10 --stream-poll &
    v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC1.raw12 --stream-count=10 --stream-poll &
    v4l2-ctl --verbose -d /dev/video3 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=10 --stream-poll &
    v4l2-ctl --verbose -d /dev/video4 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC1.raw8 --stream-count=10 --stream-poll >> v4l2_ctl_v1.log 2>>v4l2_ctl_v1_error.log

    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# insmod ads6311.ko
    [  111.088300] <DRV_ADS6311> [2022-04-30 00:27:13.347.953.055] <N> 8894 ----- Probe Start -------
    [  111.097114] ads6311 virtio1.ti.ipc4.ping-pong.-1.14: mcuctrl_rpmsg_probe() Line:7719
    [  111.104882] <DRV_ADS6311> [2022-04-30 00:27:13.364.539.475] <E> 7722 This is NOT MCU core, rpdev->dst: 14
    [  111.114490] ads6311 virtio1.ti.ipc4.ping-pong.-1.14: rpmsg_dev_probe: failed: -22
    [  111.121989] ads6311: probe of virtio1.ti.ipc4.ping-pong.-1.14 failed with error -22
    [  111.129728] ads6311 virtio0.ti.ipc4.ping-pong.-1.14: mcuctrl_rpmsg_probe() Line:7719
    [  111.137486] <DRV_ADS6311> [2022-04-30 00:27:13.397.143.350] <E> 7722 This is NOT MCU core, rpdev->dst: 14
    [  111.147062] ads6311 virtio0.ti.ipc4.ping-pong.-1.14: rpmsg_dev_probe: failed: -22
    [  111.154546] ads6311: probe of virtio0.ti.ipc4.ping-pong.-1.14 failed with error -22
    [  111.162251] ads6311 virtio2.ti.ipc4.ping-pong.-1.13: mcuctrl_rpmsg_probe() Line:7719
    [  111.169997] <DRV_ADS6311> [2022-04-30 00:27:13.429.654.565] <N> 7726 new channel: 0x401 -> 0xd, rpmsg_device_id: ti.ipc4.ping-pong, endpoint address: 0x401!
    [  111.169997]
    [  111.501538] <DRV_ADS6311> [2022-04-30 00:27:13.761.191.360] <N> 7739 done, ret:0!
    [  111.501538]
    [  111.510818] SPI driver adaps,ads6311spi has no spi_device_id for adaps,ads6311spi
    [  111.518706] adaps,ads6311spi spi1.0: cam_sensor_spi_driver_probe() Line:6178
    [  111.526058] adaps,ads6311spi spi1.0: Consider updating driver adaps,ads6311spi to match on endpoints
    [  111.537400] <DRV_ADS6311> [2022-04-30 00:27:13.797.053.470] <N> 6200 done, ret:0!
    [  111.537400]
    [  111.546877] <DRV_ADS6311> [2022-04-30 00:27:13.806.530.715] <N> 8942 ----- Start calib_flash_spi_driver Probe-------
    [  111.557486] SPI driver adaps,calib_flash has no spi_device_id for adaps,calib_flash
    [  111.565320] <DRV_ADS6311> [2022-04-30 00:27:13.824.974.830] <N> 8944 ----- Start calib_flash_spi_driver Probe--rc:0-----
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0x142a > /sys/kernel/debug/adaps/dbg_ctrl
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# [  111.604836] <DRV_ADS6311> [2022-04-30 00:27:13 864.489.530] v4l2_cb <sensor_init_cfg> L2580:client: v4l_id (1271:1271) is running on CPU 2
    [  111.617466] <DRV_ADS6311> [2022-04-30 00:27:13 877.122.070] v4l2_cb <sensor_open> L4000:---- S_OPEN  from v4l_id (1271:1271) on CPU 2
    [  111.629616] <DRV_ADS6311> [2022-04-30 00:27:13 889.272.305] v4l2_cb <sensor_close> L3972:---- S_CLOSE  from v4l_id (1271:1271) on CPU 2
    
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video0/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video1/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video2/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/video3/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 2/0 [1], 0/1 -> 3/0 [1], 0/2 -> 4/0 [1], 0/3 -> 5/0 [1]]"
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=10 --stream-poll &
    [1] 1274
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G# VIDIOC_QUERYCAP: ok
    VIDIOC_G_FMT: ok
    VIDIOC_S_FMT: ok
    Format Video Capture:
            Width/Height      : 2688/192
            Pixel Format      : 'BG12' (12-bit Bayer BGBG/GRGR)
            F[  171.475463] <DRV_ADS6311> [2022-04-30 00:28:13 735.117.055] v4l2_cb <sensor_get_frame_desc> L2496:client: v4l2-ctl (1274:1274) is running on CPU 3, pad: 0, name:m00_dToF_ads6311 spi1.0, fd: 000000001b86a83f
    ield             : None
            Bytes per Line    : 0
            Size Image    [  171.494739] <DRV_ADS6311> [2022-04-30 00:28:13 754.394.590] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 0
        : 1032192
            Colorspace        : sRGB
            Transfer Function : D[  171.510675] <DRV_ADS6311> [2022-04-30 00:28:13 770.332.695] <I> 2540 num_entries: 0, w*h: 480 * 128, code: 0x3008, bpp: 16
    efault (maps to sRGB)
            YCbCr/HSV Encoding: Default (maps to ITU[  171.527299] <DRV_ADS6311> [2022-04-30 00:28:13 786.955.830] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 1
    -R 601)
            Quantization      : Default (maps to Full Range)
            Fla[  171.543505] <DRV_ADS6311> [2022-04-30 00:28:13 803.162.165] <I> 2540 num_entries: 1, w*h: 480 * 128, code: 0x3008, bpp: 16
    gs             :
                    VIDIOC_REQBUFS returned 0 (Success)
                    VIDI[  171.560298] <DRV_ADS6311> [2022-04-30 00:28:13 819.955.165] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 2
    OC_QUERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 ([  171.576380] <DRV_ADS6311> [2022-04-30 00:28:13 836.036.880] <I> 2540 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QUERY[  171.592644] <DRV_ADS6311> [2022-04-30 00:28:13 852.302.030] <I> 2512 num_routes: 4, source_pad: 0, source_stream: 3
    BUF returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)[  171.608579] <DRV_ADS6311> [2022-04-30 00:28:13 868.236.810] <I> 2540 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QBUF returned[  171.625492] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000024
    [  171.639190] Mem abort info:
    [  171.642061]   ESR = 0x0000000096000006
    [  171.645817]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  171.651219]   SET = 0, FnV = 0
    =  171.6 504 3(6S0u]c c e sEsA)
            0       ,V ISD1IPOTCW_ Q=B U0F
     treturned 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDI[  171.660017]   FSC = 0x06: level 2 translation fault
    OC_QBUF returned 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)[  171.670421] Data abort info:
    
    v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=2688,h[  171.678834]   ISV = 0, ISS = 0x00000006
    eight=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --s[  171.688201]   CM = 0, WnR = 0
    12_VC1.raw12 --stream-count=1[  171.696701] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000886253000
    0 --stream-poll &
    [  171.708670] [0000000000000024] pgd=0800000883fbf003, p4d=0800000883fbf003, pud=080000088ece7003, pmd=0000000000000000
    [  171.720905] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
    [  171.727159] Modules linked in: ads6311 overlay cdns_csi2rx v4l2_fwnode j721e_csi2rx rpmsg_ctrl videobuf2_dma_contig rpmsg_char v4l2_mem2mem videobuf2_memops videobuf2_v4l2 videobuf2_common v4l2_async ti_k3_r5_remoteproc videodev ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns ti_k3_common cdns_dphy_rx mc spi_omap2_mcspi
    [  171.736716] videodev: v4l2_open: video2: open (0)
    [  171.755407] CPU: 3 PID: 1274 Comm: v4l2-ctl Not tainted 6.1.46-dirty #1
    [2] 1275
    [  171.755416] Hardware name: Texas Instruments AM62A7 SK (DT)
    [  171.755421] pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [  171.755429] pc : sensor_s_stream+0x284/0x51c [ads6311]
    [  171.760166] video2:
    [  171.766730] lr : sensor_s_stream+0x224/0x51c [ads6311]
    [  171.766748] sp : ffff80000a7c38d0
    [  171.766751] x29: ffff80000a7c3990 x28: ffff000805546400 x27: ffff000806e41cf8
    [  171.766764] x26: 0000000000000000 x25: ffff000806e40c98 x24: ffff0008010a4810
    [  171.766774] x23: 0000000000000000 x22: ffff800000d25000 x21: 0000000000000001
    [  171.766784] x20: ffff000806ecec00 x19: ffff000806ece800
    [  171.773196] VIDIOC_QUERYCAP
    [  171.780103]  x18: 000000000000ea60
    v4l2-ctl --verbose -d /dev/video4 --set-fmt-video=width=40,heigh[  171.780108] x17: 0000947000000008 x16: 0000000000017318 x15: 0003ff700000ea60
    [  171.780118] x14: 0000000000000398
    t=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-[  171.785247] :
    [  171.787411]  x13: ffff800000d22280 x12: 0000000000000e0f
    to=/tmp/40x1_SBGGR8_1X8_VC1.raw8 --stream-count=10 --stream-poll[  171.787419] x11: 0000000000000007 x10: 0000000000000000
     [> >  1v741l.27_9c2t6l4_5v]1 .dlroigv e2r>=>jv742l12e_-cctsli_2rorm:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    run/media/BOOT-mmcblk1p1/4G# v4l2-ctl --verbose -d /dev/video3 -[  171.795928]  x9 : 00000000000f4240
    [  171.795933] x8 : 0000000000000000 x7 : 00000000000d818d x6 : 000000000000ddcc
    -set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mma[  171.803247] video2:
    [  171.810338]
    8 [  171.810340] x5 : ffff800009241000 x4 : ffff800000d21d00 x3 : 00000000000003e8
    [  171.810350] x2 : ffff800000d1b528
    --stream-count=10 --stream-poll &
    [  171.817556] VIDIOC_QUERY_EXT_CTRL
    [  171.822754]  x1 : 000000000000ddcc x0 : 0000000034c21260
    [  171.822763] Call trace:
    [  171.822766]  sensor_s_stream+0x284/0x51c [ads6311]
    [  171.825545] : error -25
    [  171.828931]  v4l2_subdev_enable_streams+0x248/0x2bc [videodev]
    [  171.841600] :
    [  171.844890]  csi2rx_enable_streams+0x8c/0x1e0 [cdns_csi2rx]
    [3] 1276[  171.852103] id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    [  171.857380]  v4l2_subdev_enable_streams+0xf0/0x2bc [videodev]
    
    [  171.868161] video2:
    [  171.881745]  ti_csi2rx_sd_enable_streams+0xcc/0xf4 [j721e_csi2rx]
    VIDIOC_QUERYCAP: ok
    VIDIOC_G_FMT: ok
    VIDIOC_S_FMT: ok
    Format [  171.890688] VIDIOC_TRY_EXT_CTRLS
    [  171.897792]  v4l2_subdev_enable_streams+0xf0/0x2bc [videodev]
    Video Capture:
            Width/Height      : 40/1
            Pixel Format      : [  171.905519] : error -25
    [  171.906992]  ti_csi2rx_start_streaming+0x1b0/0x2cc [j721e_csi2rx]
    'BA81' (8-bit Bayer BGBG/GRGR)
            Field             : None
            Byte[  171.919659] :
    [  171.922950]  vb2_start_streaming+0x68/0x15c [videobuf2_common]
    s per Line    : 0
            Size Image        : 40
            Colorspace        :[  171.929291] which=0x0, count=0, error_idx=0, request_fd=0
    [  171.934575]  vb2_core_streamon+0x90/0x190 [videobuf2_common]
     sRGB
            Transfer Function : Default (maps to sRGB)
            YCbCr/HSV E[  171.937020]
    [  171.941793]  vb2_ioctl_streamon+0x5c/0xb0 [videobuf2_v4l2]
    ncoding: Default (maps to ITU-R 601)
            Quantization      : Defau[  171.944252] video2:
    [  171.950049]  v4l_streamon+0x24/0x30 [videodev]
    lt (maps to Full Range)
            Flags             :
                    VIDIOC_REQBUFS[  171.951722] VIDIOC_QUERYCTRL
    [  171.957269]  __video_do_ioctl+0x18c/0x3dc [videodev]
     returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
            [  171.961423] videodev: v4l2_open: video3: open (0)
            VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF returne[  171.961457] video3: VIDIOC_QUERYCAP: driver=j721e-csi2rx, card=j721e-csi2rx, bus=platform:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    d 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Success)
                    VIDIOC_[  171.961480] video3: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    QUERYBUF returned 0 (Success)
                    VIDIOC_QUERYBUF returned 0 (Suc[  171.961505] video3: VIDIOC_TRY_EXT_CTRLS: error -25: which=0x0, count=0, error_idx=0, request_fd=0
    cess)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF returne[  171.961521] video3: VIDIOC_QUERYCTRL: error -25: id=0x80000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    d 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VIDIOC_QBUF[  171.961538] video3: VIDIOC_G_SELECTION: error -25: type=vid-cap, target=0, flags=0x0, wxh=0x0, x,y=0,0
     returned 0 (Success)
                    VIDIOC_QBUF returned 0 (Success)
                    VID[  171.961555] video3: VIDIOC_QUERYCAP: driver=j721e-csi2rx, card=j721e-csi2rx, bus=platform:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    IOC_QBUF returned 0 (Success)
    [  171.970590] : error -25
    [  171.976309]  video_usercopy+0x21c/0x6d0 [videodev]
    [  171.978666] :
    [  171.978959] video3: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    [  171.978992] video3: VIDIOC_QUERYCTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979009] video3: VIDIOC_QUERYCTRL: error -25: id=0x980900, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979025] video3: VIDIOC_QUERYCTRL: error -25: id=0x980901, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979041] video3: VIDIOC_QUERYCTRL: error -25: id=0x980902, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979057] video3: VIDIOC_QUERYCTRL: error -25: id=0x980903, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979073] video3: VIDIOC_QUERYCTRL: error -25: id=0x980904, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979088] video3: VIDIOC_QUERYCTRL: error -25: id=0x980905, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979104] video3: VIDIOC_QUERYCTRL: error -25: id=0x980906, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979120] video3: VIDIOC_QUERYCTRL: error -25: id=0x980907, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979135] video3: VIDIOC_QUERYCTRL: error -25: id=0x980908, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979151] video3: VIDIOC_QUERYCTRL: error -25: id=0x980909, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979167] video3: VIDIOC_QUERYCTRL: error -25: id=0x98090a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979182] video3: VIDIOC_QUERYCTRL: error -25: id=0x98090b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979198] video3: VIDIOC_QUERYCTRL: error -25: id=0x98090c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979213] video3: VIDIOC_QUERYCTRL: error -25: id=0x98090d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979229] video3: VIDIOC_QUERYCTRL: error -25: id=0x98090e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979245] video3: VIDIOC_QUERYCTRL: error -25: id=0x98090f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979260] video3: VIDIOC_QUERYCTRL: error -25: id=0x980910, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979276] video3: VIDIOC_QUERYCTRL: error -25: id=0x980911, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979292] video3: VIDIOC_QUERYCTRL: error -25: id=0x980912, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979307] video3: VIDIOC_QUERYCTRL: error -25: id=0x980913, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979323] video3: VIDIOC_QUERYCTRL: error -25: id=0x980914, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979338] video3: VIDIOC_QUERYCTRL: error -25: id=0x980915, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979354] video3: VIDIOC_QUERYCTRL: error -25: id=0x980916, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979369] video3: VIDIOC_QUERYCTRL: error -25: id=0x980917, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979385] video3: VIDIOC_QUERYCTRL: error -25: id=0x980918, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979400] video3: VIDIOC_QUERYCTRL: error -25: id=0x980919, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979416] video3: VIDIOC_QUERYCTRL: error -25: id=0x98091a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979431] video3: VIDIOC_QUERYCTRL: error -25: id=0x98091b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979447] video3: VIDIOC_QUERYCTRL: error -25: id=0x98091c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979462] video3: VIDIOC_QUERYCTRL: error -25: id=0x98091d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979478] video3: VIDIOC_QUERYCTRL: error -25: id=0x98091e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979493] video3: VIDIOC_QUERYCTRL: error -25: id=0x98091f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979509] video3: VIDIOC_QUERYCTRL: error -25: id=0x980920, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979525] video3: VIDIOC_QUERYCTRL: error -25: id=0x980921, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979540] video3: VIDIOC_QUERYCTRL: error -25: id=0x980922, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979556] video3: VIDIOC_QUERYCTRL: error -25: id=0x980923, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979571] video3: VIDIOC_QUERYCTRL: error -25: id=0x980924, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979587] video3: VIDIOC_QUERYCTRL: error -25: id=0x980925, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979602] video3: VIDIOC_QUERYCTRL: error -25: id=0x980926, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979618] video3: VIDIOC_QUERYCTRL: error -25: id=0x980927, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979634] video3: VIDIOC_QUERYCTRL: error -25: id=0x980928, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979649] video3: VIDIOC_QUERYCTRL: error -25: id=0x980929, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979665] video3: VIDIOC_QUERYCTRL: error -25: id=0x98092a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979680] video3: VIDIOC_QUERYCTRL: error -25: id=0x98092b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979696] video3: VIDIOC_QUERYCTRL: error -25: id=0x8000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.979719] video3: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=UYVY little-endian (0x59565955), field=any, bytesperline=0, sizeimage=614400, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  171.979772] video3: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  171.979793] video3: VIDIOC_S_FMT: type=vid-cap, width=40, height=1, pixelformat=BA81 little-endian (0x31384142), field=none, bytesperline=0, sizeimage=40, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  171.979840] video3: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  171.979957] video3: VIDIOC_CROPCAP: error -25: type=vid-cap, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [  171.979977] video3: VIDIOC_CROPCAP: error -25: type=vid-out, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [  171.980042] video3: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x2, id=0x0, flags=0x0
    [  171.980057] video3: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x5, id=0x0, flags=0x0
    [  171.980072] video3: VIDIOC_G_INPUT: value=0
    [  171.980083] video3: VIDIOC_ENUMINPUT: index=0, name=30102000.ticsi2rx context 3, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x0
    [  171.980230] video3: VIDIOC_REQBUFS: count=6, type=vid-cap, memory=mmap
    [  171.980292] video3: VIDIOC_QUERYBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=40
    [  171.980313] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980342] video3: VIDIOC_QUERYBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1000, length=40
    [  171.980361] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980382] video3: VIDIOC_QUERYBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x2000, length=40
    [  171.980401] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980421] video3: VIDIOC_QUERYBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x3000, length=40
    [  171.980440] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980460] video3: VIDIOC_QUERYBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x4000, length=40
    [  171.980478] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980498] video3: VIDIOC_QUERYBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x5000, length=40
    [  171.980517] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980569] videodev: v4l2_mmap: video3: mmap (0)
    [  171.980607] videodev: v4l2_mmap: video3: mmap (0)
    [  171.980622] videodev: v4l2_mmap: video3: mmap (0)
    [  171.980640] videodev: v4l2_mmap: video3: mmap (0)
    [  171.980654] videodev: v4l2_mmap: video3: mmap (0)
    [  171.980668] videodev: v4l2_mmap: video3: mmap (0)
    [  171.980698] video3: VIDIOC_QBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=40, offset/userptr=0x0, length=40
    [  171.980718] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980743] video3: VIDIOC_QBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=40, offset/userptr=0x1000, length=40
    [  171.980762] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980783] video3: VIDIOC_QBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=40, offset/userptr=0x2000, length=40
    [  171.980802] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980823] video3: VIDIOC_QBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=40, offset/userptr=0x3000, length=40
    [  171.980842] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980862] video3: VIDIOC_QBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=40, offset/userptr=0x4000, length=40
    [  171.980881] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980901] video3: VIDIOC_QBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=40, offset/userptr=0x5000, length=40
    [  171.980920] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  171.980942] video3: VIDIOC_G_FMT: type=vid-cap, width=40, height=1, pixelformat=BA81 little-endian (0x31384142), field=none, bytesperline=0, sizeimage=40, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  171.984733]  video_ioctl2+0x18/0x30 [videodev]
    [  171.993514] id=0x80000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  171.999222]  v4l2_ioctl+0x40/0x60 [videodev]
    [  172.007221] video2:
    [  172.013275]  __arm64_sys_ioctl+0xa8/0xf0
    [  172.020479] VIDIOC_G_SELECTION
    [  172.026285]  invoke_syscall+0x48/0x114
    [  172.026295]  el0_svc_common.constprop.0+0xd4/0xfc
    [  172.037215] : error -25
    [  172.042847]  do_el0_svc+0x20/0x30
    [  172.042855]  el0_svc+0x28/0xa0
    [  172.049878] :
    [  172.055337]  el0t_64_sync_handler+0xbc/0x140
    [  172.055343]  el0t_64_sync+0x18c/0x190
    [  172.063061] type=vid-cap, target=0, flags=0x0, wxh=0x0, x,y=0,0
    [  172.067486] Code: f9003fe2 9b0380ee b94320ab 5281c1ec (b9402505)
    [  172.067492] ---[ end trace 0000000000000000 ]---
    [  172.075908] video2: VIDIOC_QUERYCAP: driver=j721e-csi2rx, card=j721e-csi2rx, bus=platform:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    [  173.319818] video2: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    [  173.337445] video2: VIDIOC_QUERYCTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.348931] video2: VIDIOC_QUERYCTRL: error -25: id=0x980900, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.360237] video2: VIDIOC_QUERYCTRL: error -25: id=0x980901, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.371548] video2: VIDIOC_QUERYCTRL: error -25: id=0x980902, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.382853] video2: VIDIOC_QUERYCTRL: error -25: id=0x980903, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.394156] video2: VIDIOC_QUERYCTRL: error -25: id=0x980904, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.405460] video2: VIDIOC_QUERYCTRL: error -25: id=0x980905, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.416763] video2: VIDIOC_QUERYCTRL: error -25: id=0x980906, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.428066] video2: VIDIOC_QUERYCTRL: error -25: id=0x980907, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.439377] video2: VIDIOC_QUERYCTRL: error -25: id=0x980908, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.450691] video2: VIDIOC_QUERYCTRL: error -25: id=0x980909, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.462000] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.473305] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.484609] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.495917] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.507221] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.518525] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.529829] video2: VIDIOC_QUERYCTRL: error -25: id=0x980910, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.541131] video2: VIDIOC_QUERYCTRL: error -25: id=0x980911, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.552434] video2: VIDIOC_QUERYCTRL: error -25: id=0x980912, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.563738] video2: VIDIOC_QUERYCTRL: error -25: id=0x980913, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.575052] video2: VIDIOC_QUERYCTRL: error -25: id=0x980914, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.586364] video2: VIDIOC_QUERYCTRL: error -25: id=0x980915, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.597678] video2: VIDIOC_QUERYCTRL: error -25: id=0x980916, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.608987] video2: VIDIOC_QUERYCTRL: error -25: id=0x980917, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.620300] video2: VIDIOC_QUERYCTRL: error -25: id=0x980918, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.631605] video2: VIDIOC_QUERYCTRL: error -25: id=0x980919, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.642908] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.654213] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.665517] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.676829] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.688140] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.699447] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.710760] video2: VIDIOC_QUERYCTRL: error -25: id=0x980920, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.722065] video2: VIDIOC_QUERYCTRL: error -25: id=0x980921, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.733370] video2: VIDIOC_QUERYCTRL: error -25: id=0x980922, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.744679] video2: VIDIOC_QUERYCTRL: error -25: id=0x980923, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.755984] video2: VIDIOC_QUERYCTRL: error -25: id=0x980924, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.767286] video2: VIDIOC_QUERYCTRL: error -25: id=0x980925, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.778605] video2: VIDIOC_QUERYCTRL: error -25: id=0x980926, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.789917] video2: VIDIOC_QUERYCTRL: error -25: id=0x980927, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.801222] video2: VIDIOC_QUERYCTRL: error -25: id=0x980928, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.812527] video2: VIDIOC_QUERYCTRL: error -25: id=0x980929, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.823832] video2: VIDIOC_QUERYCTRL: error -25: id=0x98092a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.835144] video2: VIDIOC_QUERYCTRL: error -25: id=0x98092b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.846452] video2: VIDIOC_QUERYCTRL: error -25: id=0x8000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  173.857855] video2: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=UYVY little-endian (0x59565955), field=any, bytesperline=0, sizeimage=614400, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  173.877966] video2: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  173.893089] video2: VIDIOC_ENUM_FMT: index=1, type=vid-cap, flags=0x0, pixelformat=YUYV little-endian (0x56595559), mbus_code=0x0000, description='YUYV 4:2:2'
    [  173.907253] video2: VIDIOC_ENUM_FMT: index=2, type=vid-cap, flags=0x0, pixelformat=UYVY little-endian (0x59565955), mbus_code=0x0000, description='UYVY 4:2:2'
    [  173.921417] video2: VIDIOC_ENUM_FMT: index=3, type=vid-cap, flags=0x0, pixelformat=YVYU little-endian (0x55595659), mbus_code=0x0000, description='YVYU 4:2:2'
    [  173.935580] video2: VIDIOC_ENUM_FMT: index=4, type=vid-cap, flags=0x0, pixelformat=VYUY little-endian (0x59555956), mbus_code=0x0000, description='VYUY 4:2:2'
    [  173.949744] video2: VIDIOC_ENUM_FMT: index=5, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  173.964867] video2: VIDIOC_ENUM_FMT: index=6, type=vid-cap, flags=0x0, pixelformat=GBRG little-endian (0x47524247), mbus_code=0x0000, description='8-bit Bayer GBGB/RGRG'
    [  173.979984] video2: VIDIOC_ENUM_FMT: index=7, type=vid-cap, flags=0x0, pixelformat=GRBG little-endian (0x47425247), mbus_code=0x0000, description='8-bit Bayer GRGR/BGBG'
    [  173.995101] video2: VIDIOC_ENUM_FMT: index=8, type=vid-cap, flags=0x0, pixelformat=RGGB little-endian (0x42474752), mbus_code=0x0000, description='8-bit Bayer RGRG/GBGB'
    [  174.010225] video2: VIDIOC_ENUM_FMT: index=9, type=vid-cap, flags=0x0, pixelformat=BG10 little-endian (0x30314742), mbus_code=0x0000, description='10-bit Bayer BGBG/GRGR'
    [  174.025432] video2: VIDIOC_ENUM_FMT: index=10, type=vid-cap, flags=0x0, pixelformat=GB10 little-endian (0x30314247), mbus_code=0x0000, description='10-bit Bayer GBGB/RGRG'
    [  174.040725] video2: VIDIOC_ENUM_FMT: index=11, type=vid-cap, flags=0x0, pixelformat=BA10 little-endian (0x30314142), mbus_code=0x0000, description='10-bit Bayer GRGR/BGBG'
    [  174.056017] video2: VIDIOC_ENUM_FMT: index=12, type=vid-cap, flags=0x0, pixelformat=RG10 little-endian (0x30314752), mbus_code=0x0000, description='10-bit Bayer RGRG/GBGB'
    [  174.071309] video2: VIDIOC_ENUM_FMT: index=13, type=vid-cap, flags=0x0, pixelformat=BG12 little-endian (0x32314742), mbus_code=0x0000, description='12-bit Bayer BGBG/GRGR'
    [  174.086613] video2: VIDIOC_S_FMT: type=vid-cap, width=2688, height=192, pixelformat=BG12 little-endian (0x32314742), field=none, bytesperline=0, sizeimage=1032192, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  174.106989] video2: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  174.122112] video2: VIDIOC_ENUM_FMT: index=1, type=vid-cap, flags=0x0, pixelformat=YUYV little-endian (0x56595559), mbus_code=0x0000, description='YUYV 4:2:2'
    [  174.136281] video2: VIDIOC_ENUM_FMT: index=2, type=vid-cap, flags=0x0, pixelformat=UYVY little-endian (0x59565955), mbus_code=0x0000, description='UYVY 4:2:2'
    [  174.150445] video2: VIDIOC_ENUM_FMT: index=3, type=vid-cap, flags=0x0, pixelformat=YVYU little-endian (0x55595659), mbus_code=0x0000, description='YVYU 4:2:2'
    [  174.164609] video2: VIDIOC_ENUM_FMT: index=4, type=vid-cap, flags=0x0, pixelformat=VYUY little-endian (0x59555956), mbus_code=0x0000, description='VYUY 4:2:2'
    [  174.178773] video2: VIDIOC_ENUM_FMT: index=5, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  174.193892] video2: VIDIOC_ENUM_FMT: index=6, type=vid-cap, flags=0x0, pixelformat=GBRG little-endian (0x47524247), mbus_code=0x0000, description='8-bit Bayer GBGB/RGRG'
    [  174.209012] video2: VIDIOC_ENUM_FMT: index=7, type=vid-cap, flags=0x0, pixelformat=GRBG little-endian (0x47425247), mbus_code=0x0000, description='8-bit Bayer GRGR/BGBG'
    [  174.224129] video2: VIDIOC_ENUM_FMT: index=8, type=vid-cap, flags=0x0, pixelformat=RGGB little-endian (0x42474752), mbus_code=0x0000, description='8-bit Bayer RGRG/GBGB'
    [  174.239245] video2: VIDIOC_ENUM_FMT: index=9, type=vid-cap, flags=0x0, pixelformat=BG10 little-endian (0x30314742), mbus_code=0x0000, description='10-bit Bayer BGBG/GRGR'
    [  174.254447] video2: VIDIOC_ENUM_FMT: index=10, type=vid-cap, flags=0x0, pixelformat=GB10 little-endian (0x30314247), mbus_code=0x0000, description='10-bit Bayer GBGB/RGRG'
    [  174.269749] video2: VIDIOC_ENUM_FMT: index=11, type=vid-cap, flags=0x0, pixelformat=BA10 little-endian (0x30314142), mbus_code=0x0000, description='10-bit Bayer GRGR/BGBG'
    [  174.285045] video2: VIDIOC_ENUM_FMT: index=12, type=vid-cap, flags=0x0, pixelformat=RG10 little-endian (0x30314752), mbus_code=0x0000, description='10-bit Bayer RGRG/GBGB'
    [  174.300335] video2: VIDIOC_ENUM_FMT: index=13, type=vid-cap, flags=0x0, pixelformat=BG12 little-endian (0x32314742), mbus_code=0x0000, description='12-bit Bayer BGBG/GRGR'
    [  174.315761] video2: VIDIOC_CROPCAP: error -25: type=vid-cap, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [  174.327256] video2: VIDIOC_CROPCAP: error -25: type=vid-out, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [  174.338808] video2: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x2, id=0x0, flags=0x0
    [  174.346390] video2: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x5, id=0x0, flags=0x0
    [  174.353966] video2: VIDIOC_G_INPUT: value=0
    [  174.358159] video2: VIDIOC_ENUMINPUT: index=0, name=30102000.ticsi2rx context 2, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x0
    [  174.374490] video2: VIDIOC_REQBUFS: count=6, type=vid-cap, memory=mmap
    [  174.381166] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=1032192
    [  174.398213] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.406087] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xfc000, length=1032192
    [  174.423464] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.431312] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1f8000, length=1032192
    [  174.448773] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.456617] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x2f4000, length=1032192
    [  174.474078] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.481926] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x3f0000, length=1032192
    [  174.499397] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.507245] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x4ec000, length=1032192
    [  174.524712] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.532617] videodev: v4l2_mmap: video2: mmap (0)
    [  174.537361] videodev: v4l2_mmap: video2: mmap (0)
    [  174.542086] videodev: v4l2_mmap: video2: mmap (0)
    [  174.546807] videodev: v4l2_mmap: video2: mmap (0)
    [  174.551526] videodev: v4l2_mmap: video2: mmap (0)
    [  174.556254] videodev: v4l2_mmap: video2: mmap (0)
    [  174.560985] video2: VIDIOC_QBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1032192, offset/userptr=0x0, length=1032192
    [  174.578191] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.586057] video2: VIDIOC_QBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1032192, offset/userptr=0xfc000, length=1032192
    [  174.603608] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.611470] video2: VIDIOC_QBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1032192, offset/userptr=0x1f8000, length=1032192
    [  174.629117] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.636969] video2: VIDIOC_QBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1032192, offset/userptr=0x2f4000, length=1032192
    [  174.654612] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.662458] video2: VIDIOC_QBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1032192, offset/userptr=0x3f0000, length=1032192
    [  174.680094] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.687941] video2: VIDIOC_QBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=1032192, offset/userptr=0x4ec000, length=1032192
    [  174.705576] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  174.713422] video2: VIDIOC_G_FMT: type=vid-cap, width=2688, height=192, pixelformat=BG12 little-endian (0x32314742), field=none, bytesperline=0, sizeimage=1032192, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    

  • Hi David,

    Thanks for the quick test.

    From the error logs, looks like the issue is in the sensor driver's `sensor_s_stream()` function. This is happening now as we try to stream on all video nodes simultaneously.

    For multi-stream sensors, v4l2 APIs require to implement the enable_streams()/disable_streams() APIs.
    You will need to implement this in the sensor driver to stream on all VCs/DTs simultaneously.

    The API documentation can be checked here:
    https://docs.kernel.org/driver-api/media/mc-core.html
    https://docs.kernel.org/driver-api/media/v4l2-subdev.html

    For an example you can refer to UB960 driver in TI linux, which implements this API for FPDLink deserializer, this device multiplexes multiple cameras as different virtual channels on same CSI port:
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/ds90ub960.c?h=ti-linux-6.1.y#n2549

    Meanwhile, you can still test video nodes one-by-one as done previously, with the changes suggested in the call (starting from /dev/video1 onwards) to see if it makes the MD5 errors go away.

    Thanks

  • Hi Jai,

       Thank you very much for your suggestions. I read the source code for ds90ub960.c, ds90ub953.c, and ds90ub913.c. They implemented enable_streams()/disable_streams()  callback APIs, but not implemented s_stream() callback API. The enable_streams()/disable_streams()  callback looks like for multiple cameras (maybe select one of them for use any time), I noticed in enable_streams()/disable_streams() function of these 3 drivers, both 'sounce pad' and 'sink pad' are mentioned, where our dToF sensor seems to have source pad only, no sink pad. So I think our dToF sensor is different from ds90XXX.

       I referred to ov2312.c, whose implemented .s_stream, .init_cfg, .get_frame_desc and .set_routing callback, we did same implementation too. It looks okay for me.

      On the other hand, a important point is, the wrong raw data output looks be not related with multiple streams, because even if I didn't enable the route for multiple stream, and my application only try to capture the first stream, I can reproduce this bug too. My test steps as below:

    -------------------------------------------

    1. Insmod our dToF sensor driver, 

         CMD: insmod ads6311.ko;

    2. Open some run-time switches of ads6311.c driver to enable TEST PATTERN to output the fixed raw data, and enable more debug log;

        CMD: echo 0x142a > /sys/kernel/debug/adaps/dbg_ctrl

    3. open some run-time switches of v4l2 devices and subdevices

        CMD:

         echo 0xff > /sys/class/video4linux/video0/dev_debug
         echo 0xff > /sys/class/video4linux/video1/dev_debug
         echo 0xff > /sys/class/video4linux/video2/dev_debug
         echo 0xff > /sys/class/video4linux/video3/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
         echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug

    4. DO NOT set v4l2 routing for cdns_csi2rx.30101000.csi-bridge and 30102000.ticsi2rx:

    5. set environment variable 'video_stream_count' to 1, to capture the first stream (ie, video0)

        CMD:

        export video_stream_count=1

    6. execute my application 'hawk_concurrency_test' to capture 100 frames with sensor work mode 2

       CMD:

        ./hawk_concurrency_test --setworkmode 2  --dumpframe 10 > hawk_concurrency_test1.log

    7. view and human-eye check the md5 value for raw files

       CMD:

       md5sum /tmp/video*

    8. REPEAT the step 6-7, after 6-7 times, I saw bug happened.

    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame000_2688x192_1032192.depth_raw
    5e946032e9053ffd742c618718fb2808 /tmp/video0_frame001_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame002_2688x192_1032192.depth_raw
    5e946032e9053ffd742c618718fb2808 /tmp/video0_frame003_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame004_2688x192_1032192.depth_raw
    5e946032e9053ffd742c618718fb2808 /tmp/video0_frame005_2688x192_1032192.depth_raw
    6471076892740e3a2aab7206a01869c4 /tmp/video0_frame006_2688x192_1032192.depth_raw

     Please refer to the attached log file for my detailed steps and log.MobaXterm_TI_SoC_Uart_20240313_185959.txt

  • It looks some ecc/crc error are happening from the status registers, we added some code at the begin of csi2rx_stop() of drivers\media\platform\cadence\cdns-csi2rx.c, is this a correct location for printing these status? I tested many times, some err_irqs is as below, according to my search result for keyword "err_irqs".

    Hi Jai,

       Would you please help to double confirm: at the begin of csi2rx_stop() of drivers\media\platform\cadence\cdns-csi2rx.c, is this a correct location for printing these status? (According to my work experience on qualcomm and rockchip platform, these status ususally are checked at the begin of some IRQ handle function.) On the current platform, It seems I always (90%) see there are some error for bit4-7 of CSI2RX_DPHY_ERROR_IRQS, but most time, the raw data is correct, only < 30% chance the raw data has error.

    Thanks and Best Regards,

    David

  • David,

    Regarding the link frequency question as mentioned by Biao,

    4. Link frequency can check in TRM, need Jianzhong and Jai help point out the specific register.

    The related register is the DPHY_BAND_CFG register: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/phy/cadence/cdns-dphy-rx.c?h=ti-linux-6.1.y#n195.

    You can add some print-outs in function cdns_dphy_rx_configure() to print hs_clk_rate, band_ctrl, etc to see if the link frequency is configured correctly.

    You can also print out the calculated link frequency from here: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/platform/cadence/cdns-csi2rx.c?h=ti-linux-6.1.y#n276.

    In the dts file k3-am62a7-sk-csi2-ads6311.dtso which you shared earlier, the link-frequency is not set. In that case, the driver will use the pixel rate to calculate the link frequency: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/v4l2-core/v4l2-common.c?h=ti-linux-6.1.y#n450.

    Regards,

    Jianzhong

  • Hi Jai, Jianzhong and Biao,

         This morning, I tried to find a older ads6311.c driver version (Feb, 27), which doesn't have multiple-stream support but can capture video0 raw data. I tested it, after I repeated 6 times, I saw the raw data md5sum mismatch issue again. It looks this issue is not very related with multiple streams, let us to try to fix it based on the simpler code version firstly. The operation steps is almost same as the previous comment. Please refer to the attached log file for the detailed steps and log.  I also attached my ads6311.c driver code and hawk_concurrency_test App code. I will try to duplicate this issue with v4l2-ctl command this morning too.

    Best Regards,

    DavidAds6311Driver_and_Hawk_concurrency_test.rarMobaXterm_TI_SoC_Uart_20240314_090026_NoMultipleStream_md5_mismatched.txt

  • I converted the wrong raw file to C array .h file, we can see the error happen since 512(may be a different position) bytes, all are 0x00

  • I will try to duplicate this issue with v4l2-ctl command this morning too.

    I just tried to use v4l2-ctl utils, reproduced the issue too.

    I used a simple script as below, the command line is: ./looptest3.sh 50, The script try to capture 1 frame every time, and repeat 50 times.

    ---------------------------looptest3.sh file--------------------

    insmod ads6311.ko
    echo 0x142a > /sys/kernel/debug/adaps/dbg_ctrl
    
    echo 0xff > /sys/class/video4linux/video0/dev_debug
    echo 0xff > /sys/class/video4linux/video1/dev_debug
    echo 0xff > /sys/class/video4linux/video2/dev_debug
    echo 0xff > /sys/class/video4linux/video3/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    
    media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/0 [fmt:SBGGR12_1X12/2688x192]'
    
    if [ -n "$1" ]; then
          times=$1
       else
          times=1
    fi
    
    for (( i=1; i <= $times; i++ ))
    do
        echo
        echo "-----TEST TIMES: $i/$times------"
        v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=1 --stream-poll > v4l2_ctl_video0.log 2>v4l2_ctl_video0_error.log
        md5sum /tmp/2688x192_SBGGR12_1X12_VC0.raw12
        rm /tmp/2688x192_SBGGR12_1X12_VC0.raw12
    done
    
    echo "-----------$times times test done, please check the log file for result-----------"
    

    please see the output log as attached file: MobaXterm_TI_SoC_Uart_20240314_111049_NoMultipleStream_md5_mismatched_by_v4l2-ctl.txt

  • > I referred to ov2312.c, whose implemented .s_stream, .init_cfg, .get_frame_desc and .set_routing callback, we did same implementation too. It looks okay for me.

    Hi David, you are right enable_streams is not required for multi-stream sensors. But in case of OV2312, we don't see this kernel logs happening like they are happening for your sensor. Is it possible for you to share you sensor code?

    When enable_streams() hooks are missing in the sensor, the v4l2 uses a fallback function, which only calls sensor's s_stream() hook once even for multiple streams.  Please look at this function:
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/v4l2-core/v4l2-subdev.c?h=ti-linux-6.1.y#n1800

    For some reason your sensor's s_stream() is being called twice. Please let me know if you have any questions on this.

    > On the other hand, a important point is, the wrong raw data output looks be not related with multiple streams, because even if I didn't enable the route for multiple stream, and my application only try to capture the first stream, I can reproduce this bug too. My test steps as below:

    When you disabled the routes, have you also disabled or changed the sensor registers not send the data on the other VC and DTs?

    If not, then the bug is still expected as you are using /dev/video0. Can you try same experiment (only one stream capture) but using /dev/video1 instead?

    I can explain the HW bug in more detail to bring some clarity:

    Sensor/CSI-TX-> Cadence CSI-RX -> TI CSI-RX -----multiple DMA channels (rx0 to rx5) -----> /dev/videoX

    If there is any CSI data coming to the SoC it has to be filtered by TI CSI-RX and sent to some channel out of rx0-rx5. Any unfiltered data can end up on rx0 and thus corrupt that stream.

    In your case data is coming on VC=0,1 and DT=raw12,raw8 so other streams will end up at rx0 (/dev/video0) even if you are not filtering for it by only enabling a single route.

    We are working on a better fix for this bug in future releases, for now recommendation is to not use /dev/video0 for any multi-channel source like FPDLink or your sensor.

  • My bad, I just saw your recent response with single stream driver test and source code. Please give me some time to go through the details.

  • Is it possible for you to share you sensor code?

    Yes, I can. In fact, I had posted my driver code in today earlier post(comment). You can find that .rar file.

    For some reason your sensor's s_stream() is being called twice. Please let me know if you have any questions on this.

    The first time is for stream_on, the second time is for stream_off. It should be normal.

    When you disabled the routes, have you also disabled or changed the sensor registers not send the data on the other VC and DTs?

    If not, then the bug is still expected as you are using /dev/video0. Can you try same experiment (only one stream capture) but using /dev/video1 instead?

    I can explain the HW bug in more detail to bring some clarity:

    Sensor/CSI-TX-> Cadence CSI-RX -> TI CSI-RX -----multiple DMA channels (rx0 to rx5) -----> /dev/videoX

    If there is any CSI data coming to the SoC it has to be filtered by TI CSI-RX and sent to some channel out of rx0-rx5. Any unfiltered data can end up on rx0 and thus corrupt that stream.

    In your case data is coming on VC=0,1 and DT=raw12,raw8 so other streams will end up at rx0 (/dev/video0) even if you are not filtering for it by only enabling a single route.

    We are working on a better fix for this bug in future releases, for now recommendation is to not use /dev/video0 for any multi-channel source like FPDLink or your sensor.

    Thanks for you explain. I will try it.

  • root@am62axx-evm:~# ./looptest3.sh 50
    
    -----TEST TIMES: 1/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 2/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 3/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 4/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 5/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 6/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 7/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 8/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 9/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 10/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 11/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 12/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 13/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 14/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 15/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 16/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 17/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 18/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 19/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 20/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 21/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 22/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 23/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 24/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 25/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 26/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 27/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 28/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 29/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 30/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 31/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 32/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 33/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 34/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 35/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 36/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 37/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 38/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 39/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 40/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 41/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 42/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 43/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 44/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 45/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 46/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 47/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 48/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 49/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    
    -----TEST TIMES: 50/50------
    89de3b9b3a90e31f237d3a90d8ab326a  /tmp/raw
    -----------50 times test done, please check the log file for result-----------
    
    
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/looptest3.sh

    Hi David,

    I have modified your script and tested with IMX219 sensor, using internal test pattern generator in the sensor.
    So far I have not seen any MD5sum mismatch. I have tested both RAW8 and RAW10 formats, and different resolutions.

    In your sensor the DMA transfer is ending abruptly. From HW side, this can happen if EOF (End Of Frame) signal is received on the CSI -> PSI-L interface, as explained in section "6.1 PSI_L DMA framing" in AM62A TRM under Camera Subsystem.

    Can you please confirm your sensor driver is configured so that only VC=0 and DT=RAW12 is being sent by sensor (and no other VC/DT is sent).
    As explained above, with video0 other stream's EOF signal might get routed to the rx0/video0, thus causing abrupt DMA stop and incomplete data.

    Thanks

  • Can you please confirm your sensor driver is configured so that only VC=0 and DT=RAW12 is being sent by sensor (and no other VC/DT is sent).
    As explained above, with video0 other stream's EOF signal might get routed to the rx0/video0, thus causing abrupt DMA stop and incomplete data.

    Hi Jai,

        Yes, I didn't change the configure of our dToF sensor yet. I will query our chip-design department whether I can only enable one stream. If yes, I will try it tomorrow. Thanks for your reply.

    David

  • Can you try same experiment (only one stream capture) but using /dev/video1 instead?

    Hi Jai,

        This morning, I tested it with video1, it seems same bug happen too. The following is my test script and log file, please CORRECT me in case I have any mistakes. Thanks.

    #!/bin/bash
    
    export TZ=Asia/Shanghai
    
    insmod ads6311.ko
    echo 0x1028 > /sys/kernel/debug/adaps/dbg_ctrl
    
    echo 0xff > /sys/class/video4linux/video0/dev_debug
    echo 0xff > /sys/class/video4linux/video1/dev_debug
    echo 0xff > /sys/class/video4linux/video2/dev_debug
    echo 0xff > /sys/class/video4linux/video3/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    
    media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1]]"
    
    # map the first stream to video1(rx1)
    media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 2/0 [1]]"
    
    media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/0 [fmt:SBGGR12_1X12/2688x192]'
    
    if [ -n "$1" ]; then
          times=$1
       else
          times=1
    fi
    
    for (( i=1; i <= $times; i++ ))
    do
        echo
        echo "-----TEST TIMES: $i/$times------"
        v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=2688,height=192,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/2688x192_SBGGR12_1X12_VC0.raw12 --stream-count=1 --stream-poll > v4l2_ctl_video1.log 2>v4l2_ctl_video1_error.log
        md5sum /tmp/2688x192_SBGGR12_1X12_VC0.raw12
        rm /tmp/2688x192_SBGGR12_1X12_VC0.raw12
    done
    
    echo "-----------$times times test done, please check the log file for result-----------"
    

    The test log file: MobaXterm_TI_SoC_Uart_20240315_102412_NoMultipleStream_by_v4l2-ctl_video1.txt

  • Can you please confirm your sensor driver is configured so that only VC=0 and DT=RAW12 is being sent by sensor (and no other VC/DT is sent).
    As explained above, with video0 other stream's EOF signal might get routed to the rx0/video0, thus causing abrupt DMA stop and incomplete data.

    Hi Jai,

        According our chip-design MIPI engineer's suggestion, I modified our sensor configure, enable ONE data type (the original user data will be added the last line of the main stream frame), and disable VC1, only keep vc0.  Then I tested with the following script, capture 100 frames every time, repeat 50 times, so totally captured 5000 frames, there are 3 frames raw data mismatch. Note, since the user data (last line/packet) is changable since there are frame number index, so the whole raw file's checksum is NOT fixed, so I only calculate the CRC32 for the main stream data part, if the CRC32 is mismatched with the expected correct value, the App 'hawk_concurrency_test' will save the raw file to /tmp/.  

       I converted these raw file to C array .h file, they looks there is same error, only the first 512 byte is correct, the remaining part are 0x00, same as I mentioned before.

    --------------test script file: loop_capture_with_video0_for_one_stream_only.sh-------------------

    #!/bin/bash
    
    export TZ=Asia/Shanghai
    
    insmod ads6311.ko
    # enable TEST pattern output,etc
    echo 0x1028 > /sys/kernel/debug/adaps/dbg_ctrl
    
    echo 0xff > /sys/class/video4linux/video0/dev_debug
    echo 0xff > /sys/class/video4linux/video1/dev_debug
    echo 0xff > /sys/class/video4linux/video2/dev_debug
    echo 0xff > /sys/class/video4linux/video3/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    
    # enable more log output for hawk_concurrency_test app
    export debug_info_enable=true
    # only capture 1 stream for hawk_concurrency_test app
    export video_stream_count=1
    # calculate CRC32 for frame buffer to verify the data correct or not for hawk_concurrency_test app
    export calc_frame_crc32_enable=true
    
    if [ -n "$1" ]; then
          times=$1
       else
          times=1
    fi
    
    for (( i=1; i <= $times; i++ ))
    do
        echo
        echo "-----TEST TIMES: $i/$times------"
        ./hawk_concurrency_test --setworkmode 2  --dumpframe 100 > hawk_concurrency_test1.log
        # cat the log file to check CRC32 values from the saved log file.
        cat hawk_concurrency_test1.log
    done
    
    echo "-----------$times times test done, please check the log file for result-----------"
    

    --------------the log file for the detailed test steps and output log------------------

    MobaXterm_TI_SoC_Uart_20240315_135837_MIPI_TX_1Stream.txt

  • Hi Jai,

       According to the suggestion from our chip-design engieer (mipi TX ip), I added some code at board-support\ti-linux-kernel-6.1.46+gitAUTOINC+247b2535b2-g247b2535b2\drivers\phy\cadence\cdns-dphy-rx.c as below, to print the mipi parameters. 

       Then I got the current parameter as below:

    lanes: 4,
    lp_clk_rate: 0Hz,
    lpx: 50000 ps,
    hs_clk_rate: 500000000Hz,
    hs_prepare: 48000 ps,
    hs_zero: 117000 ps,
    hs_settle: 97000 ps,
    hs_trail: 92000 ps,
    hs_exit: 100000 ps

         We have 3 questions:

    Q1: why lp_clk_rate is 0 Hz?  

    Q2: If I'd like to change hs_settle, how can I do? would you please tell me where is the correct location to do this?

    Q3: Would you please help to double confirm: at the begin of csi2rx_stop() of drivers\media\platform\cadence\cdns-csi2rx.c, is this a correct location for printing these status? (According to my work experience on qualcomm and rockchip platform, these status ususally are checked at the begin of some IRQ handle function.) On the current platform, It seems I always (90%) see there are some error for bit4-7 of CSI2RX_DPHY_ERROR_IRQS, but most time, the raw data is correct, only < 30% chance the raw data has error. Currently, the irq_status seems mismatch the correct/wrong of raw data, so the irq status seems not believeable, so I have the question, hope to have a better location to print the status.

  • Q4:  Is this issue is related with cache coherence?  If I want to disable cache JUST for try for DMA buffer for frame, would you please me how to do?

  • Hi David,

    Thanks for modifying with single vc/dt and performing the tests.

    > so totally captured 5000 frames, there are 3 frames raw data mismatch. 

    Is my understanding correct that with the modification the errors are still present, but they reduced a lot - so you now only see 3/5000 frames with checksum mismatch?

    > Q1: why lp_clk_rate is 0 Hz?
    > Q2: If I'd like to change hs_settle, how can I do? would you please tell me where is the correct location to do this?

    These parameters are only populated by the phy framework in linux when we call get_default_config_for_hsclk() in cdns-csi2rx.c:
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/platform/cadence/cdns-csi2rx.c?h=ti-linux-6.1.y#n281

    Out of all the parameters calculated by the framework, the cdns-dphy-rx.c driver only programs the HW using these two parameters:
    1. hs_clk_rate
    2. lanes

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/phy/cadence/cdns-dphy-rx.c?h=ti-linux-6.1.y#n168

    So my understanding is you can ignore lp_clk_rate and hs_settle as those are not used to program anything in the DPHY-RX registers.

    > Q3: Would you please help to double confirm: at the begin of csi2rx_stop() of drivers\media\platform\cadence\cdns-csi2rx.c, is this a correct location for printing these status? (According to my work experience on qualcomm and rockchip platform, these status ususally are checked at the begin of some IRQ handle function.) On the current platform, It seems I always (90%) see there are some error for bit4-7 of CSI2RX_DPHY_ERROR_IRQS, but most time, the raw data is correct, only < 30% chance the raw data has error. Currently, the irq_status seems mismatch the correct/wrong of raw data, so the irq status seems not believeable, so I have the question, hope to have a better location to print the status.

    The best location for this would be in irq handlers for the various irqs described for the CSI RX INTD module. But currently driver support is not there for those. This is described in TRM under "CSI_RX_IF Interrupt Events" section.

    It would be simpler in my opinion to check the registers directly from userspace, while stream is running. This can be done using devmem2 or similar tools that map the physical memory through /dev/mem device.

    Q4:  Is this issue is related with cache coherence?  If I want to disable cache JUST for try for DMA buffer for frame, would you please me how to do?

    I am not sure if disabling cache is really required here - in any case I am not aware of a straightforward way to disable A53 cache https://stackoverflow.com/questions/41227527/disable-cpu-caches-l1-l2-on-armv8-a-linux

    This issue is most likely in one of these places:
    1. Sensor HW sending incomplete data or early EOF on some frames
    2. Sensor driver bug
    3. Timing issue with empty buffer not queued in time from userspace, leading to short frame DMA errors.

    Given it is always happening at 512 bytes, I am not sure if a random short frame (3) will cause that.

    Have you tested same sensor and driver on some other (non AM62A) platform? Does this 512-byte issue happen on any other platform?


    Thanks,
    Jai

  • Today I changed my register configure of dToF sensor to output just 1 stream (Disable vc1, only keep vc0. And enable one data type to combine the 40x1 user data into the end of the main stream), and I use 'media-ctl' utils to map the first stream(vc0) to video3(rx3), then try to capture the raw data, with the following script, capture 100 frames every time, repeat 50 times, so totally captured 5000 frames, there are 8 frames raw data mismatch.  The incorrect raw file is same as before: only the first 512 byte has correct data, the remaining is 0x00.

    ------------------the script---------------------

    #!/bin/bash
    
    export TZ=Asia/Shanghai
    
    EXPECTED_MD5="6471076892740e3a2aab7206a01869c4"
    FILESIZE=1032192
    
    insmod ads6311.ko
    echo 0x1028 > /sys/kernel/debug/adaps/dbg_ctrl
    
    echo 0xff > /sys/class/video4linux/video0/dev_debug
    echo 0xff > /sys/class/video4linux/video1/dev_debug
    echo 0xff > /sys/class/video4linux/video2/dev_debug
    echo 0xff > /sys/class/video4linux/video3/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    
    media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1]]"
    
    # map the first stream to video3(rx3)
    media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 4/0 [1]]"
    
    media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/0 [fmt:SBGGR12_1X12/2688x193]'
    
    if [ -n "$1" ]; then
          times=$1
       else
          times=1
    fi
    
    for (( i=1; i <= $times; i++ ))
    do
        echo
        echo "-----TEST TIMES: $i/$times------"
        FILENAME="Video3_SBGGR12_1X12_VC0_$(date +%s)_Test$i.raw12"
        TMP_FILE="/tmp/$FILENAME"
    
        v4l2-ctl --verbose -d /dev/video3 --set-fmt-video=width=2688,height=193,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=$TMP_FILE --stream-count=1 --stream-poll > v4l2_ctl_video3.log 2>v4l2_ctl_video3_error.log
        OUTPUT=$(MD5Calculator $TMP_FILE $FILESIZE)
        echo $OUTPUT
        ACTUAL_MD5=$(echo $OUTPUT | awk '{print $NF}')
        if [ "$ACTUAL_MD5" == "$EXPECTED_MD5" ]; then
            echo "MD5 matched. Deleting $TMP_FILE..."
            rm -f "$TMP_FILE"
        else
            echo "MD5 did not match. File will be kept."
        fi
    done
    
    echo "-----------$times times test done, please check the log file for result-----------"
    
    

    ---------------the log --------------------

    MobaXterm_TI_SoC_Uart_20240315_205156__MIPI_TX_1Stream.txt

  • Is my understanding correct that with the modification the errors are still present, but they reduced a lot - so you now only see 3/5000 frames with checksum mismatch?

    I think I can't say it is reduced a lot now.

    Given it is always happening at 512 bytes, I am not sure if a random short frame (3) will cause that.

    Have you tested same sensor and driver on some other (non AM62A) platform? Does this 512-byte issue happen on any other platform?

    The 512 bytes should NOT be a short frame, since they are matched with our test pattern data when test pattern is enabled.

    We applied the sensor on rk3568 for almost a year. Recently I tested my driver code and test application ('hawk_concurency_test') on rk3568 platform to double confirm it is okay or not many times, it works well, without raw data (md5) mismatch issue.

  • Hi David,

    Can you take CSI register dumps for every frame in your application, reading them from /dev/mem? An example tool that already does this is devmem2: https://github.com/radii/devmem2/blob/master/devmem2.c


    This will help us compare if the Cadence CSI-RX controller gives any different errors when the 512-byte frame issue happens.

    > 3. Timing issue with empty buffer not queued in time from userspace, leading to short frame DMA errors.


    To rule out this point 3, please apply these two patches on your driver, so that any DMA error is printed on the console as well.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_dmaengine_2D00_ti_2D00_k3_2D00_udma_2D00_Report_2D00_short_2D00_packet_2D00_errors.patchhttps://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_HACK_2D00_media_2D00_ti_2D00_csi2rx_2D00_Report_2D00_error_2D00_for_2D00_short_2D00_frames.patch

  • Hi Jai,

       According to your suggestion, I used gst-launch-1.0 -v v4l2src num-buffers=500 device=/dev/video3 io-mode=dmabuf ! video/x-bayer, width=2688, height=193, framerate=30/1, format=bggr12 ! multifilesink location="ads6311-image-%d.raw12" to capture 500 frames on my ONE-STREAM-only sensor driver, the test result looks good. It looks there are two difference than before:

    1. The application util, I used v4l2-ctl and my custom-developed hawk_concurrency_test before,  while I used gst-launch-1.0 tool yesterday.  I didn't read the source code of gst-launch-1.0, do you know what is real difference between v4l2-ctl and gst-launch-1.0?

    2. I noticed the command line parameter 'io-mode=dmabuf', while we used 'mmap' type in my custom-developed hawk_concurrency_test.  This may be a key factor for this issue.  But If I changed 'io-mode=dmabuf' to 'io-mode=mmap' for gst-launch-1.0 command line, it will not work with error 'Unable to setup formats: Invalid argument (22)'.  Do you know what is different between 'dmabuff' and 'mmap'?

    enum v4l2_memory {
    V4L2_MEMORY_MMAP = 1,
    V4L2_MEMORY_USERPTR = 2,
    V4L2_MEMORY_OVERLAY = 3,
    V4L2_MEMORY_DMABUF = 4,
    };

    Best Regards,

    David

  • Hi Jai,

       Some status update:

        With the SAME sensor driver (One-stream-Only currently), I used gst-launch-1.0 and v4l2-ctl to capure some frames, It looks gst-launch-1.0 (I tried to remove 'io-mode=dmabuff' keyword from the command line, but it still work well) always get the correct raw data by checking the md5 value, while v4l2-ctl has some chance to capture the wrong raw data, I think it is same as my hawk_concurrency_test.

       Would you please help to figure out the real difference, and find a solution? 

    --------the test script: capture_with_gst_laugh_0319d.sh-----             // if select gst-launch-1.0, it works well, but NG if select v4l2-ctl.

    #!/bin/bash
    
    export TZ=Asia/Shanghai
    
    EXPECTED_MD5="6471076892740e3a2aab7206a01869c4"
    # when one_datatype_enable, the user data (original datatype=0x30, whose resolution is 40x1) will be
    # added at the end of main stream frame, and since the user data has some variable field such as frame
    # number, so the user data is changed by frame, so I'll check the main stream data for md5 value calculation,
    # for the current test mode(FHR), it is 1032192 bytes long.
    FILESIZE=1032192
    
    if [ -n "$1" ]; then
          times=$1
       else
          times=1
    fi
    
    if [ -n "$2" ]; then
          ctool=$2
       else
          ctool=v4l2ctl
    fi
    
    if [ -n "$3" ]; then
          drvFlag=$3
       else
          drvFlag=0x1028
    fi
    
    insmod ads6311.ko
    echo $drvFlag > /sys/kernel/debug/adaps/dbg_ctrl
    
    echo 0xff > /sys/class/video4linux/video0/dev_debug
    echo 0xff > /sys/class/video4linux/video1/dev_debug
    echo 0xff > /sys/class/video4linux/video2/dev_debug
    echo 0xff > /sys/class/video4linux/video3/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    
    media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1]]"
    
    # map the first stream to video0(rx0)
    media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 1/0 [1]]"
    
    media-ctl -d /dev/media0 --set-v4l2 '"m00_dToF_ads6311 spi1.0":0/0 [fmt:SBGGR12_1X12/2688x193]'
    
    
    for (( i=1; i <= $times; i++ ))
    do
        echo
        echo "-----TEST TIMES: $i/$times------"
        FILENAME="${ctool}_SBGGR12_1X12_one_stream_$(date +%s)_Test$i.raw12"
        TMP_FILE="/tmp/$FILENAME"
    
        if [ "v4l2ctl" == $ctool ]; then
            v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=2688,height=193,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=$TMP_FILE --stream-count=1 --stream-poll > v4l2_ctl_video3.log 2>v4l2_ctl_video3_error.log
        else
            gst-launch-1.0 -v v4l2src num-buffers=1 device=/dev/video0  ! video/x-bayer, width=2688, height=193, format=bggr12 ! multifilesink location=$TMP_FILE
        fi
    
        OUTPUT=$(MD5Calculator $TMP_FILE $FILESIZE)
        echo $OUTPUT
        ACTUAL_MD5=$(echo $OUTPUT | awk '{print $NF}')
        if [ "$ACTUAL_MD5" == "$EXPECTED_MD5" ]; then
            echo "MD5 matched. Deleting $TMP_FILE..."
            rm -f "$TMP_FILE"
        else
            echo "MD5 did not match. File will be kept, test exiting..."
            break;
        fi
    done
    
    echo "-----------$i/$times times test done, please check the log file for result-----------"
    

    -----------------log file---------------------

    MobaXterm_TI_SoC_Uart_20240319_105506_gst-launch-Okay_v4l2-ctl_NG.txt

  • Hi Jai,

        The 2nd status update on Mar, 19:

        1. I modified the code of drivers\media\common\videobuf2\videobuf2-v4l2.c as below to view the the parameters for VIDIOC_REQBUFS. 

        Then I tested it with with the same .ko drivers with gst-launch-1.0 and v4l2-ctl utils, I saw the following output as below. The first 5 lines is for with gst-launch-1.0, which has no MD5 mismatch issue, while last 2 lines is for with v4l2-ctl, which has some MD5 mismatch issue.

       I don't know why there are 3 requests with count = 0 and memory = 1/2/4 at the begin for gst-launch-1.0?  Is it to try to clear some buffers?  For with v4l2-ctl, there is no such request, I don't know is this is a questionable point?

       2. After I applied your two patches for any DMA error is printed on the console, I tested with the same .ko drivers, when I tested with v4l2-ctl, there is some DMA transfer errors are reported, while no such error with gst-launch-1.0. 

    Please see the the attached log file for details.  

    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G_VC0_1DT#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G_VC0_1DT# ./capture_with_gst_laugh_0319d.sh 1 gst
    [   57.187605] <DRV_ADS6311> [2022-05-01 10:30:14.197.042.410] <N> 8634 ----- Probe Start -------
    [   57.196404] ads6311 virtio1.ti.ipc4.ping-pong.-1.13: mcuctrl_rpmsg_probe() Line:7459
    [   57.204173] <DRV_ADS6311> [2022-05-01 10:30:14.213.614.420] <N> 7466 new channel: 0x401 -> 0xd, rpmsg_device_id: ti.ipc4.ping-pong, endpoint address: 0x401!
    [   57.204173]
    [   57.535858] <DRV_ADS6311> [2022-05-01 10:30:14.545.291.625] <N> 7479 done, ret:0!
    [   57.535858]
    [   57.545441] ads6311 virtio2.ti.ipc4.ping-pong.-1.14: mcuctrl_rpmsg_probe() Line:7459
    [   57.553284] <DRV_ADS6311> [2022-05-01 10:30:14.562.722.200] <E> 7462 This is NOT MCU core, rpdev->dst: 14
    [   57.562911] ads6311 virtio2.ti.ipc4.ping-pong.-1.14: rpmsg_dev_probe: failed: -22
    [   57.570415] ads6311: probe of virtio2.ti.ipc4.ping-pong.-1.14 failed with error -22
    [   57.578177] ads6311 virtio0.ti.ipc4.ping-pong.-1.14: mcuctrl_rpmsg_probe() Line:7459
    [   57.585977] <DRV_ADS6311> [2022-05-01 10:30:14.595.392.890] <E> 7462 This is NOT MCU core, rpdev->dst: 14
    [   57.595565] ads6311 virtio0.ti.ipc4.ping-pong.-1.14: rpmsg_dev_probe: failed: -22
    [   57.603060] ads6311: probe of virtio0.ti.ipc4.ping-pong.-1.14 failed with error -22
    [   57.610826] SPI driver adaps,ads6311spi has no spi_device_id for adaps,ads6311spi
    [   57.618542] adaps,ads6311spi spi1.0: cam_sensor_spi_driver_probe() Line:5918
    [   57.625773] adaps,ads6311spi spi1.0: Consider updating driver adaps,ads6311spi to match on endpoints
    [   57.645682] <DRV_ADS6311> [2022-05-01 10:30:14.655.120.995] <N> 5940 done, ret:0!
    [   57.645682]
    [   57.655216] <DRV_ADS6311> [2022-05-01 10:30:14.664.653.275] <N> 8682 ----- Start calib_flash_spi_driver Probe-------
    [   57.670076] SPI driver adaps,calib_flash has no spi_device_id for adaps,calib_flash
    [   57.678016] <DRV_ADS6311> [2022-05-01 10:30:14.687.453.785] <N> 8684 ----- Start calib_flash_spi_driver Probe--rc:0-----
    [   57.697698] <DRV_ADS6311> [2022-05-01 10:30:14 707.135.130] v4l2_cb <sensor_open> L3744:---- S_OPEN  from v4l_id (1277:1277) on CPU 0
    [   57.714952] <DRV_ADS6311> [2022-05-01 10:30:14 724.392.910] v4l2_cb <sensor_close> L3716:---- S_CLOSE  from v4l_id (1277:1277) on CPU 0
    [   57.735453] <DRV_ADS6311> [2022-05-01 10:30:14 744.890.830] v4l2_cb <sensor_open> L3744:---- S_OPEN  from media-ctl (1288:1288) on CPU 3
    [   57.748309] <DRV_ADS6311> [2022-05-01 10:30:14 757.750.075] v4l2_cb <sensor_set_fmt> L2471:client: media-ctl (1288:1288) is running on CPU 3, load_script: 0, fmt->which:0x1,V4L2_SUBDEV_FORMAT_TRY:0x0, fmt->width:2688, fmt->height:193
    [   57.769051] <DRV_ADS6311> [2022-05-01 10:30:14 778.492.185] <I> 2446 ---wkmode[0] 480 X 129, frameFmt 2688 X 193 ---
    [   57.779579] <DRV_ADS6311> [2022-05-01 10:30:14 789.020.875] <I> 2446 ---wkmode[1] 480 X 4128, frameFmt 2688 X 193 ---
    [   57.790185] <DRV_ADS6311> [2022-05-01 10:30:14 799.627.085] <I> 2446 ---wkmode[2] 2688 X 193, frameFmt 2688 X 193 ---
    [   57.800790] <DRV_ADS6311> [2022-05-01 10:30:14 810.231.900] <I> 2485 update workmode[2] resolution to 2688 X 193
    [   57.810960] <DRV_ADS6311> [2022-05-01 10:30:14 820.401.610] <I> 2432 ---wkmode[0] 480 X 129 ---
    [   57.819654] <DRV_ADS6311> [2022-05-01 10:30:14 829.096.745] <I> 2432 ---wkmode[1] 480 X 4128 ---
    [   57.828435] <DRV_ADS6311> [2022-05-01 10:30:14 837.876.955] <I> 2432 ---wkmode[2] 2688 X 193 ---
    [   57.837216] <DRV_ADS6311> [2022-05-01 10:30:14 846.658.195] <I> 2432 ---wkmode[3] 2688 X 6176 ---
    [   57.846084] <DRV_ADS6311> [2022-05-01 10:30:14 855.525.880] <I> 2432 ---wkmode[4] 228 X 129 ---
    [   57.854778] <DRV_ADS6311> [2022-05-01 10:30:14 864.220.130] <I> 2432 ---wkmode[5] 228 X 4128 ---
    [   57.863560] <DRV_ADS6311> [2022-05-01 10:30:14 873.001.775] <I> 2432 ---wkmode[6] 32 X 193 ---
    [   57.872176] <DRV_ADS6311> [2022-05-01 10:30:14 881.618.360] v4l2_cb <sensor_set_ctrl> L4012:client: media-ctl (1288:1288) is running on CPU 3, ctrl->id: 0x980911, ctrl->val: 120, V4L2_CID_EXPOSURE: 0x980911
    [   57.890516] <DRV_ADS6311> [2022-05-01 10:30:14 899.957.280] v4l2_cb <sensor_set_fmt> L2506:fmt->which:0x1,V4L2_SUBDEV_FORMAT_TRY:0x0, wkmode:2 mode->width:2688, mode->height:193
    [   57.906434] <DRV_ADS6311> [2022-05-01 10:30:14 915.875.510] v4l2_cb <sensor_close> L3716:---- S_CLOSE  from media-ctl (1288:1288) on CPU 3
    
    -----TEST TIMES: 1/1------
    [   59.293123] <DRV_ADS6311> [2022-05-01 10:30:16 302.560.675] v4l2_cb <sensor_open> L3744:---- S_OPEN  from gst-plugin-scan (1291:1291) on CPU 3
    [   59.306277] <DRV_ADS6311> [2022-05-01 10:30:16 315.718.070] v4l2_cb <sensor_close> L3716:---- S_CLOSE  from gst-plugin-scan (1291:1291) on CPU 3
    [   60.135678] <DRV_ADS6311> [2022-05-01 10:30:17 145.113.615] v4l2_cb <sensor_open> L3744:---- S_OPEN  from gst-launch-1.0 (1290:1290) on CPU 2
    [   60.149280] <DRV_ADS6311> [2022-05-01 10:30:17 158.719.980] v4l2_cb <sensor_close> L3716:---- S_CLOSE  from gst-launch-1.0 (1290:1290) on CPU 2
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystem[   60.200391] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x0, type: 0x1, memory: 0x1, flags: 0x0
    Clock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: ca[   60.213768] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x0, type: 0x1, memory: 0x2, flags: 0x0
    ps = video/x-bayer, width=(int)2688, height=(int)193, format=(st[   60.231638] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x0, type: 0x1, memory: 0x4, flags: 0x0
    ring)bggr12, framerate=(fraction)120/1, interlace-mode=(string)p[   60.250244] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x4, type: 0x1, memory: 0x1, flags: 0x0
    rogressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, widt[   60.273546] cdns-csi2rx 30101000.csi-bridge: MIPI parameters: link_freq: 500000000
    h=(int)2688, height=(int)193, format=(string)bggr12, framerate=([   60.286168] cdns-mipi-dphy-rx 30110000.phy: DPHY parameters: lanes: 4, lp_clk_rate: 0Hz, lpx: 50000 ps, hs_clk_rate: 500000000Hz, hs_prepare: 48000 ps, hs_zero: 117000 ps, hs_settle: 97000 ps, hs_trail: 92000 ps, hs_exit: 100000 ps
    fraction)120/1, interlace-mode=(string)progressive, colorimetry=[   60.312281] <DRV_ADS6311> [2022-05-01 10:30:17 321.721.145] v4l2_cb <sensor_s_stream> L3343:--on:1, console_loglevel:7, dbg_ctrl:0x1028, wkmode:2(FHR), linkFreq:500000000, exposureTime:1200 us, power_on:0, mcu_chipid:ddcc, mcu_fw_type: 0xddcc, drv_version: 2.0.0_LM20240319a_OneStreamOnly---
    (string)2:4:7:1
    /GstPipeline:pipeline0/GstMultiFileSink:multifilesink0.GstPad:sink: caps = video/x-bayer, width=(int)2688, height=(int)193, format=(string)bggr12, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, width=(int)2688, height=(int)193, format=(string)bggr12, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    [   60.504815] <DRV_ADS6311> [2022-05-01 10:30:17 514.251.205] <I> 3428 sensor reset cost 9847 us, sensor chip id: 0x3400
    [   60.504815]
    [   60.517902] <DRV_ADS6311> [2022-05-01 10:30:17 527.342.940] v4l2_cb <sensor_set_ctrl> L4012:client: v4l2src0:src (1290:1293) is running on CPU 3, ctrl->id: 0x9f0901, ctrl->val: 1, V4L2_CID_EXPOSURE: 0x980911
    [   60.536349] <DRV_ADS6311> [2022-05-01 10:30:17.545.790.480] <N> 4034 sensor_set_ctrl Unhandled id:0x9f0901, val:0x1
    [   60.536349]
    [   60.548287] <DRV_ADS6311> [2022-05-01 10:30:17 557.728.200] v4l2_cb <sensor_set_ctrl> L4012:client: v4l2src0:src (1290:1293) is running on CPU 3, ctrl->id: 0x980911, ctrl->val: 120, V4L2_CID_EXPOSURE: 0x980911
    [   60.572863] <DRV_ADS6311> [2022-05-01 10:30:17 582.303.460] <I> 2901 set_vcsel_state: 1, call from Line:3249.
    [   60.572863]
    [   60.716809] --HAWK--<v4l2_subdev_enable_streams_fallback> Line: 1830--s_stream(1)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    Redistribute latency...
    Got EOS from element "pipeline0".
    [   60.756510] <DRV_ADS6311> [2022-05-01 10:30:17 765.949.265] v4l2_cb <sensor_s_stream> L3343:--on:0, console_loglevel:7, dbg_ctrl:0x1028, wkmode:2(FHR), linkFreq:500000000, exposureTime:1200 us, power_on:1, mcu_chipid:ddcc, mcu_fw_type: 0xddcc, drv_version: 2.0.0_LM20240319a_OneStreamOnly---
    Execution ended after 0:00:00.565895000
    Setting pipeline to NUL[   60.784102] <DRV_ADS6311> [2022-05-01 10:30:17 793.542.690] <I> 2901 set_vcsel_state: 0, call from Line:3310.
    [   60.784102]
    L ...
    [   60.933717] --HAWK--<v4l2_subdev_disable_streams_fallback> Line: 1943--s_stream(0)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [   60.946491] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: err_irqs: 0x20100, info_irqs: 0x22, err_bypass_cfg: 0x0, monitor_irqs: 0x0, monitor_irqs_mask_cfg: 0x0, info_irqs_mask_cfg: 0x0, err_irqs_mask_cfg: 0x0,
    [   60.946491] dphy_status: 0x222206, dphy_errirq: 0x0, dphy_errirq_mask_cfg: 0x0, err_dbg: 0x0.
    [   61.030512] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [   61.039381] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x0, type: 0x1, memory: 0x1, flags: 0x0
    Freeing pipeline ...
    File /tmp/gst_SBGGR12_1X12_one_stream_1651401014_Test1.raw12 MD5: 6471076892740e3a2aab7206a01869c4
    MD5 matched. Deleting /tmp/gst_SBGGR12_1X12_one_stream_1651401014_Test1.raw12...
    -----------2/1 times test done, please check the log file for result-----------
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G_VC0_1DT#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G_VC0_1DT#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G_VC0_1DT#
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G_VC0_1DT# ./capture_with_gst_laugh_0319d.sh 10
    insmod: ERROR: could not insert module ads6311.ko: File exists
    [  134.438488] <DRV_ADS6311> [2022-05-01 10:31:31 447.925.715] v4l2_cb <sensor_open> L3744:---- S_OPEN  from media-ctl (1305:1305) on CPU 0
    [  134.450813] <DRV_ADS6311> [2022-05-01 10:31:31 460.253.235] v4l2_cb <sensor_set_fmt> L2471:client: media-ctl (1305:1305) is running on CPU 0, load_script: 0, fmt->which:0x1,V4L2_SUBDEV_FORMAT_TRY:0x0, fmt->width:2688, fmt->height:193
    [  134.471510] <DRV_ADS6311> [2022-05-01 10:31:31 480.952.090] <I> 2446 ---wkmode[0] 480 X 129, frameFmt 2688 X 193 ---
    [  134.482045] <DRV_ADS6311> [2022-05-01 10:31:31 491.486.120] <I> 2446 ---wkmode[1] 480 X 4128, frameFmt 2688 X 193 ---
    [  134.492658] <DRV_ADS6311> [2022-05-01 10:31:31 502.100.095] <I> 2446 ---wkmode[2] 2688 X 193, frameFmt 2688 X 193 ---
    [  134.503261] <DRV_ADS6311> [2022-05-01 10:31:31 512.703.320] <I> 2485 update workmode[2] resolution to 2688 X 193
    [  134.513436] <DRV_ADS6311> [2022-05-01 10:31:31 522.877.690] <I> 2432 ---wkmode[0] 480 X 129 ---
    [  134.522131] <DRV_ADS6311> [2022-05-01 10:31:31 531.573.160] <I> 2432 ---wkmode[1] 480 X 4128 ---
    [  134.530913] <DRV_ADS6311> [2022-05-01 10:31:31 540.355.055] <I> 2432 ---wkmode[2] 2688 X 193 ---
    [  134.539696] <DRV_ADS6311> [2022-05-01 10:31:31 549.138.560] <I> 2432 ---wkmode[3] 2688 X 6176 ---
    [  134.548574] <DRV_ADS6311> [2022-05-01 10:31:31 558.015.605] <I> 2432 ---wkmode[4] 228 X 129 ---
    [  134.557344] <DRV_ADS6311> [2022-05-01 10:31:31 566.784.835] <I> 2432 ---wkmode[5] 228 X 4128 ---
    [  134.566139] <DRV_ADS6311> [2022-05-01 10:31:31 575.581.115] <I> 2432 ---wkmode[6] 32 X 193 ---
    [  134.574961] <DRV_ADS6311> [2022-05-01 10:31:31 584.402.165] v4l2_cb <sensor_set_fmt> L2506:fmt->which:0x1,V4L2_SUBDEV_FORMAT_TRY:0x0, wkmode:2 mode->width:2688, mode->height:193
    [  134.590892] <DRV_ADS6311> [2022-05-01 10:31:31 600.334.040] v4l2_cb <sensor_close> L3716:---- S_CLOSE  from media-ctl (1305:1305) on CPU 0
    
    -----TEST TIMES: 1/10------
    [  134.668990] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x6, type: 0x1, memory: 0x1, flags: 0x0
    [  134.695954] cdns-csi2rx 30101000.csi-bridge: MIPI parameters: link_freq: 500000000
    [  134.703595] cdns-mipi-dphy-rx 30110000.phy: DPHY parameters: lanes: 4, lp_clk_rate: 0Hz, lpx: 50000 ps, hs_clk_rate: 500000000Hz, hs_prepare: 48000 ps, hs_zero: 117000 ps, hs_settle: 97000 ps, hs_trail: 92000 ps, hs_exit: 100000 ps
    [  134.724599] <DRV_ADS6311> [2022-05-01 10:31:31 734.038.100] v4l2_cb <sensor_s_stream> L3343:--on:1, console_loglevel:7, dbg_ctrl:0x1028, wkmode:2(FHR), linkFreq:500000000, exposureTime:1200 us, power_on:0, mcu_chipid:ddcc, mcu_fw_type: 0xddcc, drv_version: 2.0.0_LM20240319a_OneStreamOnly---
    [  134.904643] <DRV_ADS6311> [2022-05-01 10:31:31 914.081.495] <I> 3428 sensor reset cost 2648 us, sensor chip id: 0x3400
    [  134.904643]
    [  134.917855] <DRV_ADS6311> [2022-05-01 10:31:31 927.295.120] v4l2_cb <sensor_set_ctrl> L4012:client: v4l2-ctl (1307:1307) is running on CPU 3, ctrl->id: 0x9f0901, ctrl->val: 1, V4L2_CID_EXPOSURE: 0x980911
    [  134.935988] <DRV_ADS6311> [2022-05-01 10:31:31.945.428.885] <N> 4034 sensor_set_ctrl Unhandled id:0x9f0901, val:0x1
    [  134.935988]
    [  134.947966] <DRV_ADS6311> [2022-05-01 10:31:31 957.406.060] v4l2_cb <sensor_set_ctrl> L4012:client: v4l2-ctl (1307:1307) is running on CPU 3, ctrl->id: 0x980911, ctrl->val: 120, V4L2_CID_EXPOSURE: 0x980911
    [  134.972238] <DRV_ADS6311> [2022-05-01 10:31:31 981.678.520] <I> 2901 set_vcsel_state: 1, call from Line:3249.
    [  134.972238]
    [  135.116212] --HAWK--<v4l2_subdev_enable_streams_fallback> Line: 1830--s_stream(1)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [  135.154590] Failed DMA transfer retval=3, residue=0
    [  135.154608] <DRV_ADS6311> [2022-05-01 10:31:32 164.047.890] v4l2_cb <sensor_s_stream> L3343:--on:0, console_loglevel:7, dbg_ctrl:0x1028, wkmode:2(FHR), linkFreq:500000000, exposureTime:1200 us, power_on:1, mcu_chipid:ddcc, mcu_fw_type: 0xddcc, drv_version: 2.0.0_LM20240319a_OneStreamOnly---
    [  135.185220] <DRV_ADS6311> [2022-05-01 10:31:32 194.658.870] <I> 2901 set_vcsel_state: 0, call from Line:3310.
    [  135.185220]
    [  135.329088] --HAWK--<v4l2_subdev_disable_streams_fallback> Line: 1943--s_stream(0)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [  135.341822] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: err_irqs: 0x20100, info_irqs: 0x22, err_bypass_cfg: 0x0, monitor_irqs: 0x0, monitor_irqs_mask_cfg: 0x0, info_irqs_mask_cfg: 0x0, err_irqs_mask_cfg: 0x0,
    [  135.341822] dphy_status: 0x222206, dphy_errirq: 0x0, dphy_errirq_mask_cfg: 0x0, err_dbg: 0x0.
    [  135.422311] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [  135.431068] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x0, type: 0x1, memory: 0x1, flags: 0x0
    File /tmp/v4l2ctl_SBGGR12_1X12_one_stream_1651401091_Test1.raw12 MD5: 6471076892740e3a2aab7206a01869c4
    MD5 matched. Deleting /tmp/v4l2ctl_SBGGR12_1X12_one_stream_1651401091_Test1.raw12...
    
    -----TEST TIMES: 2/10------
    [  135.508494] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x6, type: 0x1, memory: 0x1, flags: 0x0
    [  135.528358] cdns-csi2rx 30101000.csi-bridge: MIPI parameters: link_freq: 500000000
    [  135.535969] cdns-mipi-dphy-rx 30110000.phy: DPHY parameters: lanes: 4, lp_clk_rate: 0Hz, lpx: 50000 ps, hs_clk_rate: 500000000Hz, hs_prepare: 48000 ps, hs_zero: 117000 ps, hs_settle: 97000 ps, hs_trail: 92000 ps, hs_exit: 100000 ps
    [  135.556893] <DRV_ADS6311> [2022-05-01 10:31:32 566.332.585] v4l2_cb <sensor_s_stream> L3343:--on:1, console_loglevel:7, dbg_ctrl:0x1028, wkmode:0(FHR), linkFreq:500000000, exposureTime:1200 us, power_on:1, mcu_chipid:ddcc, mcu_fw_type: 0xddcc, drv_version: 2.0.0_LM20240319a_OneStreamOnly---
    [  136.308590] <DRV_ADS6311> [2022-05-01 10:31:33 318.028.695] <I> 3428 sensor reset cost 2583 us, sensor chip id: 0x3400
    [  136.308590]
    [  136.321879] <DRV_ADS6311> [2022-05-01 10:31:33 331.319.625] v4l2_cb <sensor_set_ctrl> L4012:client: v4l2-ctl (1314:1314) is running on CPU 0, ctrl->id: 0x9f0901, ctrl->val: 1, V4L2_CID_EXPOSURE: 0x980911
    [  136.340016] <DRV_ADS6311> [2022-05-01 10:31:33.349.457.025] <N> 4034 sensor_set_ctrl Unhandled id:0x9f0901, val:0x1
    [  136.340016]
    [  136.351996] <DRV_ADS6311> [2022-05-01 10:31:33 361.436.230] v4l2_cb <sensor_set_ctrl> L4012:client: v4l2-ctl (1314:1314) is running on CPU 0, ctrl->id: 0x980911, ctrl->val: 120, V4L2_CID_EXPOSURE: 0x980911
    [  136.376385] <DRV_ADS6311> [2022-05-01 10:31:33 385.825.290] <I> 2901 set_vcsel_state: 1, call from Line:3249.
    [  136.376385]
    [  136.520285] --HAWK--<v4l2_subdev_enable_streams_fallback> Line: 1830--s_stream(1)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [  136.533117] Failed DMA transfer retval=3, residue=0
    [  136.538085] Failed DMA transfer retval=3, residue=0
    [  136.543045] Failed DMA transfer retval=3, residue=0
    [  136.543070] : type=vid-cap
    [  136.548156] Failed DMA transfer retval=3, residue=0
    [  136.555882] Failed DMA transfer retval=3, residue=0
    [  136.555855] , width=2688, height=193, pixelformat=BG12 little-endian (0x32314742), field=none, bytesperline=0, sizeimage=1037568, colorspace=8, flags=0x0, ycbcr_enc=1, quantization=2, xfer_func=2
    [  136.603771] <DRV_ADS6311> [2022-05-01 10:31:33 613.211.150] v4l2_cb <sensor_s_stream> L3343:--on:0, console_loglevel:7, dbg_ctrl:0x1028, wkmode:0(FHR), linkFreq:500000000, exposureTime:1200 us, power_on:1, mcu_chipid:ddcc, mcu_fw_type: 0xddcc, drv_version: 2.0.0_LM20240319a_OneStreamOnly---
    [  136.629607] <DRV_ADS6311> [2022-05-01 10:31:33 639.047.955] <I> 2901 set_vcsel_state: 0, call from Line:3310.
    [  136.629607]
    [  136.773534] --HAWK--<v4l2_subdev_disable_streams_fallback> Line: 1943--s_stream(0)-owner:, v4l2_subdev_name:m00_dToF_ads6311 spi1.0, ret:0---
    [  136.786296] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: err_irqs: 0x20100, info_irqs: 0x22, err_bypass_cfg: 0x0, monitor_irqs: 0x0, monitor_irqs_mask_cfg: 0x0, info_irqs_mask_cfg: 0x0, err_irqs_mask_cfg: 0x0,
    [  136.786296] dphy_status: 0x222206, dphy_errirq: 0x0, dphy_errirq_mask_cfg: 0x0, err_dbg: 0x0.
    [  136.866315] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [  136.875097] video4linux video0: --ADAPS--requestbuffers: vdev: 30102000.ticsi2rx context 0, count: 0x0, type: 0x1, memory: 0x1, flags: 0x0
    File /tmp/v4l2ctl_SBGGR12_1X12_one_stream_1651401092_Test2.raw12 MD5: 5e946032e9053ffd742c618718fb2808
    MD5 did not match. File will be kept, test exiting...
    -----------2/10 times test done, please check the log file for result-----------
    root@am62axx-evm:/run/media/BOOT-mmcblk1p1/4G_VC0_1DT#
    

  • The 3rd status update on Mar, 19:

    I used my latest dToF sensor driver with 4-stream (2 VC * 2 datatype) support with gst-launch-1.0 to capture 2 main streams with the following command line, I still saw some DMA transfer error, and some MD5 mismatch. It looks the md5 error is related with the DMA transfer errror.

    gst-launch-1.0 -v \
    v4l2src num-buffers=100 device=/dev/video0 io-mode=dmabuf ! video/x-bayer, width=2688, height=192, framerate=30/1, format=bggr12 ! queue leaky=2 ! \
    multifilesink location="ads6311-video0-%d.raw" \
    v4l2src num-buffers=100 device=/dev/video1 io-mode=dmabuf ! video/x-bayer, width=2688, height=192, framerate=30/1, format=bggr12 ! queue leaky=2 ! \
    multifilesink location="ads6311-video1-%d.raw"

    please see the attached log file for details, please help to find the root cause for DMA transfer error and fix it. This may be the key for this issue.

    Failed DMA transfer retval=3, residue=0

    MobaXterm_TI_SoC_Uart_20240319_174753.txt

  • Hi David,

    Thanks for the detailed response and tests done with gst-launch to narrow down the issue.

    > Do you know what is different between 'dmabuff' and 'mmap'

    Both allocate memory that can be accessed by DMA, but with MMAP it is only shared between driver and userspace. With DMABUF mode same buffer can be shared with another peripheral in the pipeline (like Display or Codec)

    In your case, I don't think this is the rootcause of the issue as gst-launch is working well even with mmap mode as you tested later.

    > After I applied your two patches for any DMA error is printed on the console, I tested with the same .ko drivers, when I tested with v4l2-ctl, there is some DMA transfer errors are reported, while no such error with gst-launch-1.0

    Thanks, this helps us narrow down the issue exactly.

    The DMA error means that short-frame/short-packet error was reported by the DMA engine while copying the frame data from CSI-RX port to DDR. I.e. if you request N bytes, only < N bytes were available so transfer ended abruptly. This explains why data is missing in buffer, but I still don't know why it is always exactly 512 bytes.

    These short-frame errors happen when userspace application is late in queueing empty buffers, so camera does not stop streaming but empty buffer is not available to take that data. This timing is critical to match, and v4l2-ctl/hawk application might be failing there, but gst-launch is able to do it better.

    We have made some optimizations already in the CSI driver in the CICD SDK releases (and upcoming 9.2 SDK release), which fix these DMA errors we saw with multi-camera pipeline using gstreamer. I am hoping same optimizations will also help your application.

    Please use these two commits in ti-linux-6.1.y, these are available as part of CICD SDK images or you can manually apply the patch in your current SDK:

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/media/platform/ti/j721e-csi2rx?h=ti-linux-6.1.y-cicd&id=b93eb4cf5ccbf51c275510678e79198ad7540bd5
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/drivers/media/platform/ti/j721e-csi2rx?h=ti-linux-6.1.y-cicd&id=d23b3d303a07057885900044db53102bd746703a

    If the DMA errors don't go away with these driver optimizations, the only other option would be to optimize the application code itself, and number of buffers used.

    Thanks,
    Jai

  • Hi Jai,

        I applied your two patches and tested, this bug still is there.  From my test, the data may be correct sometimes even if I saw "Failed DMA transfer retval=3, residue=0".  Please continue to find a better solution.  I will update more info later today.

    Best Regards,

    David

  • Hi All,

    Update on March 20th

    1. Modification of Test Application:

    Modified the test application "hawk_concurrency_test".
    Instead of saving frames to files after receiving them, a quick check method is performed,if the last 16 bytes of the buffer are all 0 to be treated as invalid.
    This aims to reduce the application's used time.
    Saving a 1M frame buffer takes about 18-30ms, while the aforementioned quick check method only takes 1-2us.

    2. Log Optimization:

    The logs of application layer and driver layer are disabled as much as possible.
    Only error and essential prompt information are retained to reduce resource consumption.

    3. Patch Application:

    Applied 2 patches provided by TI R&D engineer Jai to improve the DMA submission process.

    4. Test Results:

    After the above efforts, the error rate has been reduced to a certain extent.
    There may be no errors in testing 1000 frames, but there may be a few errors in testing 10000 frames.

    Summary:

    From the current point of view, the TI driver (MIPI driver?) is too dependent on the App's state scheduling and is too sensitive to the App's used time.
    There may be room for improvement in the software architecture or implementation. Please help to improve it. Thanks

    In actual use, it is impossible to be as fast as the aforementioned quick check, which only takes 1-2us per MIPI frame.
    Our dToF data decoding algorithm processing still takes a considerable amount of time.

    BTW, When I met raw data mismatch issue, I often saw "Failed DMA transfer retval=3, residue=0". But sometimes, I saw "Failed DMA transfer retval=3, residue=0" 1-2 times, but the raw data files may be correct (the capture frame count is 10).  It looks the error log doesn't always match the raw data integrality, would you please help to check the reason too?

    Best Regards,

    David