Hi, LiQiang
At present, we encounter the problem of using MIPI camera with imx6. Sometimes when the external signal is unstable, the phenomenon of video scrolling occurs, as follows.
We use the following registers to determine whether the current MIPI signals have errors, but the accuracy is not very high.
we modify the csi interrupt function csi_enc_callback(int irq, void *dev_id) at drivers/media/video/mxc/capture/ipu_csi_enc.c, try to skip error frame here.
It's not work perfect.
We judge by the interval between frames.
Still not work well.
Is there any other way to lose the error frames?
For such issue, you can stop the capture and restart the capture from application layer. Then the camera can recover.
You can reference to the unit test code "mxc_v4l2_tvin.c", there is sample code for such restart, it polls the driver for signal NTSC/PAL signal switching, this is a kind of external signal unstable, after detected the signal change, do the restart.
Hi,
Qiang Li.
We meet it with mipi camera ic ds90ub940. We just detect the signal stable by CST2_PHY_STATE, CSI2_ERROR1,CSI2_ERROR2. Any one of these error will be returned directly from the interruption csi_enc_callback function.In this case, video scrolling still occurs.
But when we restart capture with CST2_PHY_STATE, CSI2_ERROR1 and CSI2_ERROR2 errors, there will be no video scrolling screen. But it will take some time to re-preview. In the case of continuous error occurs, the customer can see the obvious video frozen .
I can't unserstand why the video scrolling still occurs even if we return in interruption function csi_enc_callback.Is there any buffer shoud be clean?
Or it any other way to reduce the time we do restart captue?
thanks.