We have an i.MX6S based system using an ISL79987 video decoder.
The ISL79987 supports up to four simultaneous analog inputs over a MIPI bus, of which we are using two.
We're running the imx_4.14.78_1.0.0_ga kernel and are using a driver we received from Intersil for a previous version of the kernel that we have migrated.
There were also numerous changes made to the IPU drivers by Intersil that allow for associating MIPI virtual channels with CSIs. I have included the changed files, the current (very messy) version of our driver and the device tree file we're using.
We are using gstreamer for playback with the following command:
gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! imxipuvideosink force-aspect-ratio=false use-vsync-true
We are seeing two problems:
- There are very noticeable combing artifacts when there's motion in front of the camera.
- The video sometimes loses VSYNC and offsets vertically.
The first problem is very straightforward to see. I just have to wave my hand in front of the camera. See the attached Combing.jpg for an example.
The easiest way to trigger the offset is to remove and reapply power to the camera during playback. Repeating this will change where the offset is but it will not go away until gstreamer is restarted. See attached file "Offset Video.jpg".
We have an application that manages multiple video feeds using gstreamer API calls and simply shutting down the offending pipeline when we detect that the signal has been lost is not sufficient to reestablish VSYNC. I suspect that there's some left over data in a buffer somewhere that isn't getting reset.
I have also seen this occur spontaneously when letting playback continue overnight and also by re-plugging the analog signal cable.
I will be out of the office starting May 17 and returning May 23.
Any help would be greatly appreciated!
Here are some additional comments/questions:
- The driver we received from Intersil (isl79987_mipi.c) is calling a number of mipi_csi2_*() functions to initialize and reset the interface. It doesn't seem like this kind of initialization belongs here. Is there another method?
- So far the only way I've been able to get a stable video feed is to use the decoder's 4 channel, 1 lane configuration which results in a 432MHz MIPI clock. Any other setting results in very unstable video that constantly loses VSYNC and/or has a green bar on the side of the feed. It seems like I should be able to use a 2 channel, 2 lane configuration that only requires a 108MHz MIPI clock.
- When video playback is active I see this error continually printed on the terminal:
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_5 = 0x00000001
If the second analog channel is also active I see this one as well:
imx-ipuv3 2400000.ipu: IPU Warning - IPU_INT_STAT_5 = 0x00000002
These are both new-frame-before-end-of-frame errors for the CSI channels. These show up even when the video output is stable.
- Is there some other way I don't know about to associate MIPI virtual channels to CSIs? I would prefer not to have to use modified versions of the IPU/MIPI/V4L2 drivers.