Hi,
We are having a problem of grabbing a MIPI stream in the NVIDIA Jetson Xavier NX.
In the following diagram, the basic architecture of the system is shown. We have 2 camera sources which are going to a Xilinx FPGA, and there they are converted to MIPI-CSI 2. The configuration for both interfaces is as follows:
• 1080p60 stream
• YUV 422 8 bit
• 1200 line rate
• 2 lane configuration
+--------------------+ +-------------------------------+ +--------------------------------+
| | | Xilinx FPGA | | NVIDIA Jetson Xavier NX |
| | | | | |
| |----SDI---->| |-----MIPI CSI 2----->|CSI 0 |
| Camera source(s) | | SDI --> AXI --> MIPI-CSI2 | | |
| |----SDI---->| |-----MIPI CSI 2----->|CSI 4 |
| | | | | |
+--------------------+ +-------------------------------+ +--------------------------------+
Steps performed
- Developed a MIPI driver for the use case. I attach the source code of the device tree settings (tegra194-camera-fpga.dtsi (15.1 KB)), as I think is the critical part. Also, one thing to remark is that i2c communication part of the driver is not implemented. Stream is triggered externally on the FPGA, which then starts streaming data. After this, the capture starts on Jetson side.
- Probed the MIPI signal out of the FPGA. From electrical point of view, this matched the MIPI spec. Also, we checked for the correct line length, correct number of lines, frame start, frame end and so on, and everything matched.
- Compared the probing of the signal with an actual MIPI camera that we have in house (Flash). This camera has a YUV 422 8 bit format, 1080p60, 2 lane configuration. Probing of this camera seemed to be the same than what we saw out of the FPGA.
- Crosschecked the driver made for the fpga with the Flash camera. Driver is working, and we are able to grab the stream without a problem.
This is the pipeline that we are using:
gst-launch-1.0 nvv4l2camerasrc device=/dev/videoX ! 'video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)60/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! nvoverlaysink -e
Where /dev/videoX is the corresponding device node for the CSI 0. We are only testing with CSI0 to have a proof of concept, even though the driver has been developed for both interfaces already, as you can see in the DT settings.
Also, following some NVIDIA tips (Jetson/l4t/Camera BringUp - eLinux.org), I have enabled some debug trace logs when the capture failure occurs. I attach also this trace log (tracelog (74.9 MB)). It is clearly that data is coming in that interface, but I am not able to investigate that CORRECTABLE_ERROR. I did check the vinotify error messages, and I saw one that could give me hint (SHORT_FRAME). I therefore tried to reduce the active_h in the DT settings, but nothing changed. I even reduced it to an absurdly low number (1) to force a different failure but it did not even change. What I can see on the terminal as output error when I call the pipeline is shown in the following image:
As stated in that webpage, I have also tried to boost the clocks, but the trace log is still the same.
Thanks