Camera failed with log:VIFALC_TDSTATE on Jetpack5.0.2

Hi,

HW:

4 cameras ====> max96712 ====>Xavier

camera: 2x 2880x1860@30fps yuv422-8bit, 2x 1280x720@30fps yuv422-8bit
max96712 output: 2000Mbps 4-lane with continuous clock

For the same GMSL register settings, camera data goes into both modules at the same time, one is Jetpack 4.4, another is Jetpack5.0.2. it works fine on Jetpack 4.4, but always bad on Jetpack5.0.2.
When I use v4l2-ctl utils to get frames, if this timeit is works fine, then it will always work fine until I terminate it with the “Ctrl+C”. When I run this command second,it will most likely go wrong. Of course, maybe a third time to run it will be fine.

mode setting with device tree:

phy_mode = “DPHY”;
serdes_pix_clk_hz = “500000000”;
discontinuous_clk = “no”

trace log:

       v4l2-ctl-3197    [000] ....  2657.023476: tegra_channel_open: vi-output, imx490 1-0031
        v4l2-ctl-3197    [000] ....  2657.036089: tegra_channel_set_power: imx490 1-0031 : 0x1
        v4l2-ctl-3197    [000] ....  2657.036107: camera_common_s_power: status : 0x1
        v4l2-ctl-3197    [000] ....  2657.036521: tegra_channel_set_power: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-3197    [000] ....  2657.036524: csi_s_power: enable : 0x1
        v4l2-ctl-3197    [000] ....  2657.036643: tegra_channel_capture_setup: vnc_id 0 W 2880 H 1860 fmt 13
     kworker/1:2-3036    [001] ....  2657.040211: rtcpu_string: tstamp:83762135057 id:0x04010000 str:"VM0 activating."
        v4l2-ctl-3197    [001] ....  2657.045091: tegra_channel_set_stream: enable : 0x1
        v4l2-ctl-3197    [001] ....  2657.046134: tegra_channel_set_stream: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-3197    [001] ....  2657.046138: csi_s_stream: enable : 0x1
        v4l2-ctl-3197    [001] ....  2657.046538: tegra_channel_set_stream: imx490 1-0031 : 0x1
     kworker/1:2-3036    [001] ....  2657.096204: rtcpu_vinotify_event: tstamp:83762607963 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2680394004160 data:0xcd9ce50010000000
     kworker/1:2-3036    [001] ....  2657.096206: rtcpu_vinotify_event: tstamp:83762608151 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2680394009952 data:0x0000000031000001
     kworker/1:2-3036    [001] ....  2657.096207: rtcpu_vinotify_event: tstamp:83762608343 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2680394072576 data:0xcd9ce20010000000
     kworker/1:2-3036    [001] ....  2657.096207: rtcpu_vinotify_event: tstamp:83762608506 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2680394078144 data:0x0000000031000002
 vi-output, imx4-3199    [001] ....  2659.554073: tegra_channel_capture_setup: vnc_id 0 W 2880 H 1860 fmt 13
     kworker/1:2-3036    [001] ....  2659.564222: rtcpu_vinotify_event: tstamp:83840858838 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2682903243648 data:0xcd9ce50010000000
     kworker/1:2-3036    [001] ....  2659.564226: rtcpu_vinotify_event: tstamp:83840859009 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2682903249472 data:0x0000000031000001
     kworker/1:2-3036    [001] ....  2659.564227: rtcpu_vinotify_event: tstamp:83840859200 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2682903307936 data:0xcd9ce20010000000
     kworker/1:2-3036    [001] ....  2659.564227: rtcpu_vinotify_event: tstamp:83840859367 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:2682903313504 data:0x0000000031000002

thanks.

Please configure the sensor output as discontinuous clock mode.
And modify the discontinuous_clk = “yes”

Is there any other way to fix it? Cause I can’t configure the sensor output as discontinuous clock mode at the moment.

Check the pix_clk_hz/serdes_pix_clk_hz if >1.5Gbps

Skew calibration is required if sensor or deserializer is using DPHY, and the output data rate is > 1.5Gbps.
An initiation deskew signal should be sent by sensor or deserializer to perform the skew calibration. If the deskew signals is not sent, the receiver will stall, and the capture will time out.
You can calculate the output data rate with the following equation:

Output data rate = (sensor or deserializer pixel clock in hertz) * (bits per pixel) / (number of CSI lanes)


Yes, the current output data rate is > 1.5Gps, is 2Gps.
So I added DPHY periodic deskew calibration, but nothing works for jp5.0.2, trace log as follows:

:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x06000000
    kworker/0:14-208     [000] ....   694.649558: rtcpu_nvcsi_intr: tstamp:22412653934 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0e000000
    kworker/0:14-208     [000] ....   694.649560: rtcpu_nvcsi_intr: tstamp:22412653934 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x06000000
    kworker/0:14-208     [000] ....   694.649561: rtcpu_nvcsi_intr: tstamp:22412654440 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0e000000
    kworker/0:14-208     [000] ....   694.649562: rtcpu_nvcsi_intr: tstamp:22412654440 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x06000000
    kworker/0:14-208     [000] ....   694.649563: rtcpu_nvcsi_intr: tstamp:22412928059 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0e000000
    kworker/0:14-208     [000] ....   694.649564: rtcpu_nvcsi_intr: tstamp:22412928059 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x06000000
    kworker/0:14-208     [000] ....   694.705591: rtcpu_nvcsi_intr: tstamp:22414216446 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0e000000
    kworker/0:14-208     [000] ....   694.705593: rtcpu_nvcsi_intr: tstamp:22414216446 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x06000000
    kworker/0:14-208     [000] ....   694.705594: rtcpu_nvcsi_intr: tstamp:22414216953 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0e000000
    kworker/0:14-208     [000] ....   694.705594: rtcpu_nvcsi_intr: tstamp:22414490406 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x0e000000
    kworker/0:14-208     [000] ....   694.705595: rtcpu_nvcsi_intr: tstamp:22414490406 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x06000000

Status:0x0e000000 means deskew calibaration error.

It alwanys works fine in both cases with or without deskew calibration for jetpack4.4 for the same MIPI output.

Please use J5.1.1 instead of J5.0.2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.