Restarting and opening the camera does not work properly

Hi,nvidia colleges:
We have some problems with the camera. The specific operations are as follows.
Interface:8m(yuv)camera → cphy->orin. we have connected 8 cameras of the same type.
A set of 4trio C-phy connected to two cameras

Power up, wait kernel up
Step1:Execute in sequence
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video0
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video1
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video2
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video4
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video5
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video6
Working fine
step2: 
close all v4l2-ctl
step3:
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video0
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video1
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video2
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video4
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video5
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video6

I found that video6 could not be opened. The specific phenomenon is as follows.

Rec log is:

This problem can be reproduced every time you repeat this operation

Why does this problem occur? I look forward to your reply.

How about below single camera?

Step1:Execute in sequence

v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video6

step2: 
close v4l2-ctl

step3:
v4l2-ctl --set-fmt-video=width=3840,height=2162,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap -d /dev/video6

Hi,shaneCCC:
single camera is ok.

my camera Architecture is:

We want to know why reopening camera doesn’t work

How about run 0-2 only? If working well check 0&1 then 1&2

it’s okay.

Well, then could you confirm 4-6

if start 4->5->6, close, 4->5->6 is okay.
if start 0->1->2->4->5->6,close,4->5->6. video is not work.

That’s interesting.
How about

start 0->1->2->4->5->6,close,0->1->2.

start 0->1->2->4->5->6.
After close0->1->2, need I reserve 4.5.6 ?

What do you mean not working here?
camera 0/1/2 stop working after closed 4/5/6?

not the means.
step 1
start 0->1->2->4->5->6,
step 2
close all camera
setp3
4->5->6.
the video6 is not work

camera 4,5,6 is okay, after close camera 012.

If always failed for this case?

Yes it is. Could you provide more information about it?

Do you have a way to reset the CSI controller?

I don’t think it could be caused by NVCSI/VI. NVCSI/VI will power on/off for each open/close cycle.
Maybe check if able to power off the 96712 the reopen to try.

At present, I have checked the cause of max96712. The specific method is as follows:

  1. Open all cameras in order (0->7). All cameras work normally.
  2. Through the i2c command, close the max96712-gmsl channel. All cameras report a 2500ms timeout log.
  3. Through the i2c command, open the (0->7) max96712-gmsl channel in sequence. It is found that the camera works normally.
    In summary, it should not be a problem with max96712.

Is there any way to reset rtcpu?

No, there’s no way to reset the RTCPU.
Is it possible have max96712 output test pattern to verify?

What should I test about mipi?
Currently, I can’t avoid this problem by modifying the mipi rate. At the same time, we also checked the eye diagram with a high-speed oscilloscope, and the quality of the eye diagram was very good.

If there is no way to reset the rtcpu, then if there is an abnormality in the rtcpu, then can we only reset the entire jetson orin module?

What I am more confused about now is why there is a problem with opening in order. If I change the order of opening, there is no such problem.