Hi
I have been developing the Linux kernel drivers for a LVDS signal, from a block camera, to MIPI/DPHY adapter. The MIPI/DPHY uses the 15 pin ribbon cable (with 2 DPHY bus lanes) in order to connect it to either a Raspberry Pi or a Jetson Orin AGX (via Auvidea J20 carrier board). Using Ridgerun’s example of the J20 to get the imx477 RPi camera, as starting point
I’ve developed our own sensor driver following the docs
In order to get our solution working I HAVE to define three separate camera instances. Namely
port-index = 0 : vi(0) → nvcsi ch0 → ap23_a@18 (on i2c@31e0000)
port-index = 2 : vi(1) → nvcsi ch1 → ap23_c@18 (on i2c@3180000)
port-index = 4 : vi(2) → nvcsi ch2 → ap23_e@18 (on i2c@c240000)
i.e. There are 3 instances of my ap23 device driver for (ap23_a, ap23_c and ap23_e). When setup like this I am able to correctly aquire the camera video and the tegra-capture-vi is not throwing an error on nearly every frame. Namely it works for each of the defined cameras.
However when I define only one camera instance via my device tree overlay the video capture no longer works with tegra-capture-vi driver throwing error nearly every frame.
[ 37.495178] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 5, flags: 0, err_data 512
[ 37.529743] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 6, flags: 0, err_data 512
[ 37.565070] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 7, flags: 0, err_data 512
[ 37.598482] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 8, flags: 0, err_data 512
[ 37.695119] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3, flags: 0, err_data 512
[ 37.728830] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 4, flags: 0, err_data 512
Then again when I define two camera instances in my device tree overlay the video capture is slightly better but the tegra-capture-vi driver is throwing an error nearly every frame. It is ONLY when I have THREE camera instances defined that my video capture is working and I can’t for life figure out why?
Now I was originally using JetPack 5.1.1 but have upgraded to JetPack 6. Also I have applied the fix such that I can capture the output as PNG without the image problem. To help diagnose this problem I have created the following output with vi kernel tracing turned on.
Now with 1 camera defined in my device tree
tegra234-p3737-camera-ap23-02-overlay.dts.txt (4.4 KB)
The following shows the image captured from J1_1 port which is attached to CSI-A/0 (port-index = 0).
Here the vi is capturing 2 horizontal lines per actual horizontal line. Note that the test pattern repeats itself on the left and right. It never seems to capture more than a quarter of the final image.
Thanks for any help that can be provided in helping me try and figure this out.
Stuart MacLean
P.S. I would like to have added the logs of the kernel and trace. Plus the images from the 3 camera instance capture which works and the 2 camera instance which doesn’t work. But due to forum rules it doesn’t allow me add this metadata.