/dev/video0 issue

I am experiencing an issue with the /dev/video0 device on my Jetson Nano, where the TC358746 HDMI-to-MIPI bridge is connected to the cam1 CSI port. Although /dev/video0 is detected by v4l2-ctl, I cannot obtain a valid video stream—tools like gst-launch-1.0 and cheese show a black screen or hang, and I see video frame timeout errors in the logs. The device tree overlay for the TC358746 connected on cam1 is loaded correctly, and the HDMI source provides a valid signal. However, the video stream does not appear properly. I am seeking advice on troubleshooting this issue, especially regarding device tree configurations or driver settings for TC358746 on the cam1 interface of Jetson Nano.

esl@esl-desktop:~$ v4l2-ctl --list-devices
vi-output, tc358746 6-000e (platform:54080000.vi:0):
/dev/video0

esl@esl-desktop:~$ dmesg | grep -i tc358746
[ 2.694591] tc358746: loading out-of-tree module taints kernel.
[ 2.696151] tc358746 6-000e: Failed to create debugfs directory
[ 2.696216] tc358746 6-000e: tegracam sensor driver:tc358746_v2.0.6
[ 2.701475] vi 54080000.vi: subdev tc358746 6-000e bound

sudo dmesg -w
[ 905.793654] video4linux video0: frame start syncpt timeout!0
[ 906.001615] video4linux video0: frame start syncpt timeout!0
[ 906.209480] video4linux video0: frame start syncpt timeout!0
[ 906.417653] video4linux video0: frame start syncpt timeout!0
[ 906.625386] video4linux video0: frame start syncpt timeout!0
[ 906.833545] video4linux video0: frame start syncpt timeout!0
[ 907.041767] video4linux video0: frame start syncpt timeout!0

Hello @spacelabs.eon,

Hope everything is going great.

From the looks of it, it seems like the driver is loading and creating the video device.
Which means that the driver is probably probing the sensor successfully.

Now, the reason why GStreamer shows a black screen, is because it is most likely receiving no buffers. That is why GStreamer defaults to a black screen instead.

One test we would recommend you run is trying to capture with v4l2-ctl instead.
That way we can simplify the test environment and first try to make sure the driver and dtb are configured properly for video capture to work.

Would you opposed to trying capturing with v4l2-ctl ?

best regards,

Andrew
Embedded Software Engineer at ProventusNova

Hello Andrew,

Thank you for your suggestion.

I tried capturing video frames using v4l2-ctl as you recommended.

  • The device /dev/video0 is detected correctly.

  • I attempted to capture a JPEG frame with the MJPG format, but the output file frame.jpg was empty.

  • Streaming 100 frames using v4l2-ctl also resulted in “no frame” received.

  • The current pixel format for the device is 'UYVY' with resolution 640x480..

    esl@esl-desktop:~$ v4l2-ctl --list-devices
    vi-output, tc358746 6-000e (platform:54080000.vi:0):
    /dev/video0

    esl@esl-desktop:~$ v4l2-ctl --device=/dev/video0 --all
    Driver Info (not using libv4l2):
    Driver name : tegra-video
    Card type : vi-output, tc358746 6-000e
    Bus info : platform:54080000.vi:0
    Driver version: 4.9.255
    Capabilities : 0x84200001
    Video Capture
    Streaming
    Extended Pix Format
    Device Capabilities
    Device Caps : 0x04200001
    Video Capture
    Streaming
    Extended Pix Format
    Priority: 2
    Video input : 0 (Camera 0: no power)
    Format Video Capture:
    Width/Height : 640/480
    Pixel Format : ‘UYVY’
    Field : None
    Bytes per Line : 1280
    Size Image : 614400
    Colorspace : SMPTE 170M
    Transfer Function : Default (maps to Rec. 709)
    YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization : Default (maps to Limited Range)
    Flags :

    Camera Controls

                    bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
                override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
                   height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                     size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
               write_isp_format 0x009a2068 (bool)   : default=0 value=0
       sensor_signal_properties 0x009a2069 (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
        sensor_image_properties 0x009a206a (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
      sensor_control_properties 0x009a206b (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
              sensor_dv_timings 0x009a206c (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
               low_latency_mode 0x009a206d (bool)   : default=0 value=0
               preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
                   sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=1 flags=read-only
    

    esl@esl-desktop:~$

It seems the driver and device tree load the sensor, but the camera is not delivering frames, possibly due to a sensor power or configuration issue.

Could you advise on next steps to verify configuration changes

Enable the log in csi2_fops.c and vi2_fops.c to check.

echo file csi2_fops.c +p > /sys/kernel/debug/dynamic_debug/control

[ 289.055993] tc358746 6-000e: [TC358746-ERR] tc358746_write_reg: Error writing reg 0x0016: -121
[ 289.064662] tc358746 6-000e: [TC358746-ERR] tc358746_write_table: tc358746_write_table: Failed to write reg 0x0016: -121
[ 289.075557] tc358746 6-000e: [TC358746-ERR] tc358746_start_streaming: Initialization sequence failed: -121
[ 289.085296] tc358746 6-000e: [TC358746-ERR] tc358746_start_streaming: Failed to start streaming: -121
[ 289.094626] tc358746 6-000e: [TC358746-ERR] tc358746_s_stream: Failed to start streaming: -121

This error report by you driver could be unable to configure the REG.

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