Kernel crashed When NO CSI input

Hello
I capture a HDMI input via a HDMI to CSI board, it is work fine. BUT, when I disconnect the HDMI cable, the kernel print out the CSI error status then crash. I am use the soc_camera dirver and gst-launch.Had test on 21.4, 21.5 and 21.6 l4t version.
I had tested the OV5640 camera, these is also the same problem. To let the camera I2C is ok and CSI disconnect, it can create the /dev/video0, then run gst-launch, the kernel print out the CSI error status then crash.

Do you meet the problem? How to fix it? Thanks!

@zjj2k
TK1 didn’t support this. But a solution what I think is have the HDMI-in chip to gen a interrupt to know the hot plug to terminal the csi/vi capture app.

Thanks for your tips, I will try it.