Candidate fixes for camera sync issues#6863
Merged
pelwell merged 2 commits intoraspberrypi:rpi-6.12.yfrom Jun 3, 2025
Merged
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
6by9
reviewed
May 20, 2025
Contributor
6by9
left a comment
There was a problem hiding this comment.
Largely looks fine. Two very minor comments.
Contributor
|
My comments are largely in regard to the imx477 change. I know very little of the CFE DPHY side. |
96379b5 to
f1b9630
Compare
Contributor
Author
|
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
Contributor
Author
|
Swapped two register writes in the second (IMX477) commit to make it closer to manufacturer's recommendation. |
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Jun 3, 2025
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
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Jun 3, 2025
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.