Description
Describe the bug
When using a CSI-2 camera with Raspberry Pi 5 (RP1 CFE), after stopping streaming and starting anew (e.g. using rpicam-vid
), the first frame seems intermittently to be lost.
It's most likely because the CFE driver puts the SNPS CSI-2 Host into reset during cfe_stop_streaming()
-> csi2_close_rx()
-> dphy_stop()
. Simulations suggest that this can result in a truncated data packet over the IDI bus, which confuses CSI2AXI and causes one or more later packets to be discarded before it gets back into sync.
Possibly the fix (if there is one) is either to reset CSI-2 Host less aggressively or reset CSI2AXI more aggressively, so that they remain in sync; or failing that, to defer stopping CFE until the camera has finished streaming.
Steps to reproduce the behaviour
Not easily - need e.g. IM477 with synchronized cameras or external trigger to show the lost frame.
Device (s)
Other
System
rpi-6.1.y
Logs
No response
Additional context
No response