Orin camera

不是,这个问题重启一开始就存在,现在现象是这样:nvcsi2/3对应video4-7,nvcsi4/5对应videoo8-11,上电运行v4l2-ctl获取video4数据帧正常,如果再运行video8,也能正常获取数据,但是这个时候一旦停止video4或者video8,另外一个也报超时没有数据,必须两个nvcsi对应相机都运行才能正常获取数据;
不太可能是SER/DESER复位问题,因为这个是加载驱动的时候只初始化一次,而运行v4l2-ctl只会调用open/close和start_stream/stop_stream.不会影响到SER/DESER

Did you probe the signal to confirm the MIPI output?
How about open video4 → open 9 → close video4, does video9 still working?

是的,示波器是打到mipi output 信号的,video 9 打开 4和9都正常,关闭4,video9就timeout没有数据

Please check below.
Open 4 → open 5 → close 5 does 4 still OK?
Open 4 → Open 8 → open 9 → close 8 check 4 and 9 still working?

我们测试结果如下:
1、Open 4 → open 5 → close 5 does 4 still OK
2、Open 4 → Open 8 → open 9 → close 8 ,test 4 and 9 still working

Could you check the SER/DESER driver for the stop streaming.

stop streaming 的回调函数是空函数,只有接口,函数里面没有执行任何东西:
static int ar0231_stop_streaming(struct tegracam_device *tc_dev)

{

int err;

dev_info(tc_dev->dev,“set stop stream \n”);

return 0;
}

This is sensor stop streaming function. I mean the SER/DESER driver.

nvidia 提供的 SER/DESER,比如max96712,只是一个i2c的读写接口,具体操作都是在sensor中进行,当orin vi stop时,也是调用的sensor的stop,所以我的意思是当stop stream时,没有操作SER/DESER

Does this means while stop the camera the sensor still output data to the bus?
Could you fix it to try?

我们尝试过断开video9对应的gmsl连接,这个时候bus是没有数据的,但是还是必须保持video9 open才能让video4有数据

Please get the trace log to check if further information for failed case.

              | |         |   ||||      |         |
     kworker/3:4-186     [003] ....   645.017029: rtcpu_string: tstamp:20849674725 id:0x04010000 str:"VM0 deactivating."
        v4l2-ctl-3204    [003] ....   648.102428: tegra_channel_open: vi-output, ar0231 1-0051
        v4l2-ctl-3204    [003] ....   648.116955: tegra_channel_set_power: ar0231 1-0051 : 0x1
        v4l2-ctl-3204    [003] ....   648.116976: camera_common_s_power: status : 0x1
        v4l2-ctl-3204    [003] ....   648.118448: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-3204    [003] ....   648.118451: csi_s_power: enable : 0x1
        v4l2-ctl-3204    [003] ....   648.118535: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
        v4l2-ctl-3204    [003] ....   648.125427: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-3204    [003] ....   648.138163: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-3204    [003] ....   648.138166: csi_s_stream: enable : 0x1
        v4l2-ctl-3204    [003] ....   648.138506: tegra_channel_set_stream: ar0231 1-0051 : 0x1
     kworker/3:4-186     [003] ....   648.153009: rtcpu_string: tstamp:20947155725 id:0x04010000 str:"VM0 activating."
     kworker/3:4-186     [003] ....   648.153013: rtcpu_vinotify_event: tstamp:20947800977 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:670313136256 data:0x379d580010000000
     kworker/3:4-186     [003] ....   648.153014: rtcpu_vinotify_event: tstamp:20947801115 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:670313142784 data:0x0000000031000001
     kworker/3:4-186     [003] ....   648.153015: rtcpu_vinotify_event: tstamp:20947801270 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:670313188992 data:0x379d550010000000
     kworker/3:4-186     [003] ....   648.153015: rtcpu_vinotify_event: tstamp:20947801410 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:670313195584 data:0x0000000031000002
 vi-output, ar02-3206    [001] ....   650.801585: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
     kworker/3:4-186     [003] ....   650.840961: rtcpu_vinotify_event: tstamp:21031352185 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:672989647776 data:0x379d580010000000
     kworker/3:4-186     [003] ....   650.840963: rtcpu_vinotify_event: tstamp:21031352325 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:672989690496 data:0x0000000031000001
     kworker/3:4-186     [003] ....   650.840964: rtcpu_vinotify_event: tstamp:21031352479 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:672989708096 data:0x379d550010000000
     kworker/3:4-186     [003] ....   650.840965: rtcpu_vinotify_event: tstamp:21031352612 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:672989768448 data:0x0000000031000002
 vi-output, ar02-3206    [001] ....   653.617486: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
     kworker/3:4-186     [003] ....   653.644958: rtcpu_vinotify_event: tstamp:21119243675 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:675805570080 data:0x379d580010000000
     kworker/3:4-186     [003] ....   653.644959: rtcpu_vinotify_event: tstamp:21119243811 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:675805612768 data:0x0000000031000001
     kworker/3:4-186     [003] ....   653.644960: rtcpu_vinotify_event: tstamp:21119243964 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:675805630368 data:0x379d550010000000
     kworker/3:4-186     [003] ....   653.644960: rtcpu_vinotify_event: tstamp:21119244104 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:675805690752 data:0x0000000031000002
 vi-output, ar02-3206    [001] ....   656.433490: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
     kworker/3:4-186     [003] ....   656.456932: rtcpu_vinotify_event: tstamp:21206930218 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:678621559616 data:0x379d580010000000
     kworker/3:4-186     [003] ....   656.456933: rtcpu_vinotify_event: tstamp:21206930353 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:678621602272 data:0x0000000031000001
     kworker/3:4-186     [003] ....   656.456934: rtcpu_vinotify_event: tstamp:21206930503 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:678621619904 data:0x379d550010000000
     kworker/3:4-186     [003] ....   656.456934: rtcpu_vinotify_event: tstamp:21206930633 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:678621680256 data:0x0000000031000002
 vi-output, ar02-3206    [001] ....   659.249472: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
     kworker/3:4-186     [003] ....   659.260899: rtcpu_vinotify_event: tstamp:21294972142 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:681437562304 data:0x379d580010000000
     kworker/3:4-186     [003] ....   659.260900: rtcpu_vinotify_event: tstamp:21294972277 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:681437604992 data:0x0000000031000001
     kworker/3:4-186     [003] ....   659.260900: rtcpu_vinotify_event: tstamp:21294972430 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:681437622624 data:0x379d550010000000
     kworker/3:4-186     [003] ....   659.260901: rtcpu_vinotify_event: tstamp:21294972561 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:681437682976 data:0x0000000031000002

Looks like doesn’t get the right log.

  1. enable the trace log.
  2. open 4 open 8 close 8
  3. cat the trace log.

session11.log (333.2 KB)
完整的log稍微有一点大,传成附件了,这是完整的open4-open8-close8的过程的tracelog

  1. Below error tell the deskew calibration problem.
  • this is due to DPHY deskew calibration not complete, it happened when the calibration sequence length is not long enough.
  • try to configure cil_settletime, and please also review the serdes_pix_clk_hz settings.

serdes_pix_clk_hz

    kworker/1:2-123     [001] ....    83.353217: rtcpu_nvcsi_intr: tstamp:3297724785 class:GLOBAL type:PHY_INTR0 phy:2 cil:0 st:0 vc:0 status:0x0e000000
     kworker/1:2-123     [001] ....    83.353218: rtcpu_nvcsi_intr: tstamp:3297724785 class:GLOBAL type:PHY_INTR0 phy:2 cil:1 st:0 vc:0 status:0x06000000
     kworker/1:2-123     [001] ....    83.353219: rtcpu_nvcsi_intr: tstamp:3297725305 class:GLOBAL type:PHY_INTR0 phy:2 cil:0 st:0 vc:0 status:0x0e000000
     kworker/1:2-123     [001] ....    83.353220: rtcpu_nvcsi_intr: tstamp:3297725305 class:GLOBAL type:PHY_INTR0 phy:2 cil:1 st:0 vc:0 status:0x06000000
  1. CHANSEL_NOMATCH
    Looks like the incorrect virtual channel id in the payload.
    It could be the embedded_metadata_height incorrect. Or DESER output incorrect data.
kworker/1:2-123     [001] ....    79.857195: rtcpu_vinotify_error: tstamp:3188085353 cch:-1 vi:0 tag:CHANSEL_NOMATCH channel:0xd0 frame:0 vi_tstamp:102018514944 data:0x00000000000003c9
  1. Does there have more message after video8 closed. Didn’t see any error after video8 closed.
004] ....    83.472713: tegra_channel_set_stream: enable : 0x0
        v4l2-ctl-3134    [004] ....    83.472715: tegra_channel_set_stream: ox3cc 2-0051 : 0x0
        v4l2-ctl-3134    [004] ....    83.472738: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-3134    [004] ....    83.472740: csi_s_stream: enable : 0x0
        v4l2-ctl-3134    [001] ....    83.474688: tegra_channel_set_power: ox3cc 2-0051 : 0x0
        v4l2-ctl-3134    [001] ....    83.474697: camera_common_s_power: status : 0x0
        v4l2-ctl-3134    [001] ....    83.478346: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
        v4l2-ctl-3134    [001] ....    83.478348: csi_s_power: enable : 0x0
     kworker/1:2-123     [001] ....    83.521153: rtcpu_vinotify_event: tstamp:3301760011 cch:1 vi:1 tag:CHANSEL_PXL_EOF channel:0x23 frame:0 vi_tstamp:105654750080 data:0x0000000004370002
     kworker/1:2-123     [001] ....    83.521153: rtcpu_vinotify_event: tstamp:3301760164 cch:1 vi:1 tag:FE channel:0x01 frame:0 vi_tstamp:105654750624 data:0x0000000000000022
     kworker/1:2-123     [001] ....    83.521153: rtcpu_vinotify_event: tstamp:3301760304 cch:1 vi:1 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:105654750720 data:0x0000000800000000
     kworker/1:2-123     [001] ....    83.521153: rtcpu_vinotify_event: tstamp:3301760458 cch:1 vi:1 tag:ATOMP_FRAME_DONE channel:0x23 frame:0 vi_tstamp:105654751072 data:0x0000000000000000
     kworker/1:2-123     [001] ....    83.521154: rtcpu_vinotify_event: tstamp:3301760594 cch:1 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:105654803360 data:0x000000000202002a
     kworker/1:2-123     [001] ....    83.521154: rtcpu_vinotify_event: tstamp:3301760747 cch:1 vi:1 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:105654819776 data:0x000000000002002a
     kworker/1:2-123     [001] ....    83.521154: rtcpu_vinotify_event: tstamp:3301760881 cch:-1 vi:1 tag:FE channel:0x02 frame:0 vi_tstamp:105654893120 data:0x0000000000000022
root@nvidia-desktop:/home/nvidia# 

第三点的回复:
kworker/1:2-123 [001] … 83.521154: rtcpu_vinotify_event: tstamp:3301760881 cch:-1 vi:1 tag:FE channel:0x02 frame:0 vi_tstamp:105654893120 data:0x0000000000000022
kworker/1:2-123 [001] … 86.055134: rtcpu_vinotify_event: tstamp:3381918317 cch:-1 vi:0 tag:FE channel:0x01 frame:0 vi_tstamp:108218487008 data:0x0000000000000024
kworker/1:2-123 [001] … 86.055137: rtcpu_vinotify_event: tstamp:3381918457 cch:-1 vi:0 tag:CHANSEL_SHORT_FRAME channel:0x50 frame:0 vi_tstamp:108218487008 data:0x03e0200001000000
kworker/1:2-123 [001] … 86.055137: rtcpu_vinotify_event: tstamp:3381918614 cch:-1 vi:0 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:108218487104 data:0x0000000800000000
vi-output, ar02-2961 [004] … 86.073859: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
kworker/1:2-123 [001] … 86.109144: rtcpu_vinotify_event: tstamp:3383545924 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:108256596000 data:0x379d580010000000
kworker/1:2-123 [001] … 86.109146: rtcpu_vinotify_event: tstamp:3383546084 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:108256638688 data:0x0000000031000001
kworker/1:2-123 [001] … 86.109146: rtcpu_vinotify_event: tstamp:3383546219 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:108256656352 data:0x379d550010000000
kworker/1:2-123 [001] … 86.109147: rtcpu_vinotify_event: tstamp:3383546372 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:108256716704 data:0x0000000031000002
vi-output, ar02-2961 [004] … 88.889630: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
kworker/1:2-123 [001] … 88.913142: rtcpu_vinotify_event: tstamp:3471015196 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:111072339328 data:0x379d580010000000
kworker/1:2-123 [001] … 88.913144: rtcpu_vinotify_event: tstamp:3471015353 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:111072382016 data:0x0000000031000001
kworker/1:2-123 [001] … 88.913145: rtcpu_vinotify_event: tstamp:3471015488 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:111072399616 data:0x379d550010000000
kworker/1:2-123 [001] … 88.913145: rtcpu_vinotify_event: tstamp:3471545807 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:111072570016 data:0x0000000031000002
vi-output, ar02-2961 [004] … 91.705379: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
kworker/1:2-123 [001] … 91.769120: rtcpu_vinotify_event: tstamp:3559437338 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:113888123776 data:0x379d580010000000
kworker/1:2-123 [001] … 91.769122: rtcpu_vinotify_event: tstamp:3559437499 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:113888166432 data:0x0000000031000001
kworker/1:2-123 [001] … 91.769123: rtcpu_vinotify_event: tstamp:3559437631 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:113888184096 data:0x379d550010000000
kworker/1:2-123 [001] … 91.769124: rtcpu_vinotify_event: tstamp:3559437787 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:113888244480 data:0x0000000031000002
v4l2-ctl-2959 [003] … 92.049822: tegra_channel_close: vi-output, ar0231 1-0051
vi-output, ar02-2961 [004] … 94.521668: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 13
v4l2-ctl-2959 [003] … 94.531432: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-2959 [003] … 94.531435: tegra_channel_set_stream: ar0231 1-0051 : 0x0
v4l2-ctl-2959 [003] … 94.531460: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-2959 [003] … 94.531463: csi_s_stream: enable : 0x0
v4l2-ctl-2959 [003] … 94.545720: tegra_channel_set_power: ar0231 1-0051 : 0x0
v4l2-ctl-2959 [003] … 94.545731: camera_common_s_power: status : 0x0
v4l2-ctl-2959 [003] … 94.558189: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-2959 [003] … 94.558193: csi_s_power: enable : 0x0
kworker/1:2-123 [001] … 100.677048: rtcpu_string: tstamp:3838990843 id:0x04010000 str:“VM0 deactivating.”
所有的log都在这了

我的疑问是如果是这些serdes_pix_clk_hz等参数值的问题,那和video4和video8同时运行没关系,即使同时运行,这些参数不对还是不应该出来数据;我这边也继续看看这些参数

另外我们的nvcsi0/1对应的video0-3不受这两路的影响,单独open/close 都可以正常运行,这三路设备树的参数值都是一样的

Able to share the source code here?