-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Candidate fixes for camera sync issues #6863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To avoid lost frame start in a subsequent session, avoid setting the number of lanes back to 1 or putting CSI-2 Host into reset. It's not clear if this is a watertight fix -- what if the camera itself produced a truncated or garbled packet, or continued to send until the next start? -- but it does seem to fix the issue. Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
6b6df36
to
c8c70b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Largely looks fine. Two very minor comments.
My comments are largely in regard to the imx477 change. I know very little of the CFE DPHY side. |
96379b5
to
f1b9630
Compare
I think we need these changes (or something similar) for reliable cam->cam sync of IMX477 on Pi5. But I guess we should hold off merging, until we get a comment from Sony about the temperature sensor issue. Perhaps they will recommend some simpler fix -- a chicken bit perhaps? |
On IMX477 it appears that the on-chip temperature sensor causes XVS (external sync out) to pulse every ~2ms when not streaming. So now we do a little dance: Temperature sensor is enabled during common register setup, giving it time to warm up (almost literally; otherwise the first frame's reading might be 0C), disabled before enabling sync out, then enabled again once the camera is streaming. We already took care to disable XVS output in stop_streaming() (though previously it wasn't understood why this was needed). Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
5e4ded8
to
f7aeced
Compare
Swapped two register writes in the second (IMX477) commit to make it closer to manufacturer's recommendation. |
kernel: overlays: sc16is75x: Add generic SPI overlay See: raspberrypi/linux#6865 kernel: add mira220 image sensor See: raspberrypi/linux#6717 kernel: defconfigs: Enable WATCHDOG_SYSFS See: raspberrypi/linux#6875 kernel: drivers: pci: hailo: Better lock handling when calling find_vdma() See: raspberrypi/linux#6868 kernel: drivers: media: imx500: Enable sensor temperature monitoring See: raspberrypi/linux#6877 kernel: firmware: rp1: Rename to rp1-fw to avoid module name collision See: raspberrypi/linux#6879 kernel: Candidate fixes for camera sync issues See: raspberrypi/linux#6863
kernel: overlays: sc16is75x: Add generic SPI overlay See: raspberrypi/linux#6865 kernel: add mira220 image sensor See: raspberrypi/linux#6717 kernel: defconfigs: Enable WATCHDOG_SYSFS See: raspberrypi/linux#6875 kernel: drivers: pci: hailo: Better lock handling when calling find_vdma() See: raspberrypi/linux#6868 kernel: drivers: media: imx500: Enable sensor temperature monitoring See: raspberrypi/linux#6877 kernel: firmware: rp1: Rename to rp1-fw to avoid module name collision See: raspberrypi/linux#6879 kernel: Candidate fixes for camera sync issues See: raspberrypi/linux#6863
Two issues currently, one is #5821 and is specific to Raspberry Pi 5.
There is also an IMX477 issue, where there are very rarely extra XVS pulses, causing receiving cameras to record a blank frame.