Kernel hang with TC358840 HDMI to CSI-2 bridge on TK1 when data stops

I am working on a V4L2 TC358840 HDMI to CSI-2 bridge driver for the Jetson TK1 board which is currently able to play video with gstreamer and the v4l2src plugin.

My setup is:

  • Jetson TK1 board
  • Buildroot filesystem
  • Kernel and drivers from L4T 21.5
  • Toshiba TC358840 UH2C/D development board
  • TC358840 driver ported from newer kernel (4.x)
  • DVD player connected to HDMI input

The problem I am having is that the kernel hangs if I unplug the HDMI cable. I only get a few frames of syncpt timeouts before the hang.

# gst-launch-1.0 v4l2src ! 'video/x-raw, format=UYVY, framerate=24/1' ! videoconvert ! nveglglessink
...
[   69.939418] vi vi.0: CSI_A syncpt timeout, syncpt = 408, err = -11
[   69.947297] TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
[   69.952795] TEGRA_CSI_CSI_CILA_STATUS 0x00000000
[   69.958271] TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
[   69.963910] TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
[   69.969199] TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
[   69.973979] TEGRA_CSI_CSI_CIL_E_STATUS 0x00000000
[   69.978845] TEGRA_CSI_CSI_PIXEL_PARSER_A_STATUS 0x00000000
[   69.984600] TEGRA_CSI_CSI_PIXEL_PARSER_B_STATUS 0x00000000
[   69.990200] TEGRA_VI_CSI_0_ERROR_STATUS 0x00000000
[   69.995057] TEGRA_VI_CSI_1_ERROR_STATUS 0x00000000
[   70.199594] vi vi.0: CSI_A syncpt timeout, syncpt = 409, err = -11
[   70.206549] TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
[   70.211704] TEGRA_CSI_CSI_CILA_STATUS 0x00000000
[   70.216483] TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
[   70.221267] TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
[   70.226335] TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
[   70.231116] TEGRA_CSI_CSI_CIL_E_STATUS 0x00000000
[   70.235999] TEGRA_CSI_CSI_PIXEL_PARSER_A_STATUS 0x00000000
[   70.241550] TEGRA_CSI_CSI_PIXEL_PARSER_B_STATUS 0x00000000
[   70.247100] TEGRA_VI_CSI_0_ERROR_STATUS 0x00000000
[   70.251954] TEGRA_VI_CSI_1_ERROR_STATUS 0x00000000
[   70.456709] vi vi.0: CSI_A syncpt timeout, syncpt = 410, err = -11
[   70.464950] TEGRA_CSI_CSI_CIL_A_STATUS 0x00000000
[   70.470480] TEGRA_CSI_CSI_CILA_STATUS 0x00000000
[   70.475452] TEGRA_CSI_CSI_CIL_B_STATUS 0x00000000
[   70.480655] TEGRA_CSI_CSI_CIL_C_STATUS 0x00000000
[   70.485402] TEGRA_CSI_CSI_CIL_D_STATUS 0x00000000
[   70.490204] TEGRA_CSI_CSI_CIL_E_STATUS 0x00000000
[   70.494943] TEGRA_CSI_CSI_PIXEL_PARSER_A_STATUS 0x00000000
[   70.500505] TEGRA_CSI_CSI_PIXEL_PARSER_B_STATUS 0x00000000
[   70.506098] TEGRA_VI_CSI_0_ERROR_STATUS 0x00000000
[   70.511204] TEGRA_VI_CSI_1_ERROR_STATUS 0x00000000
[   70.715611] vi vi.0: CSI_A syncpt timeout, syncpt = 411, err = -11
[   72.074631] BUG: soft lockup - CPU#0 stuck for 23s! [kworker/0:1:30]
...

What I would expect to happen is for the driver to keep reporting syncpt timeouts until the data starts again or gstreamer is killed, not for the kernel to hang.

Before my latest changes I have seen random MSELECT errors (from hier_ictlr.c) and “Host read timeout” errors (from host1x_intr.c). I still have not determined exactly where the hang is happening.

The hang also occurs if the HDMI data changes resolution or if I disconnect the CSI cable while playing.

merwin,
syncpt timeouts could result from many reasons - hardware or clock issue, incorrect bridge chip set up or missing required programming at Tegra side etc. While we won’t implement this bridge chip support in our TK1 BSP moving forward, we do observe similar issue and fixed in our TX1 configuration that we might be able to share for your reference. Let me check the details …

This issue seems to persist in r21.7. Is there a workaround for this?

Hi gmask,

Please file a new topic with detailed description of your issue and relevant information.

Thanks