-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Unicam FS/FE timing GPIO #6088
Unicam FS/FE timing GPIO #6088
Conversation
|
||
cam1_sync = <&csi1>, "sync-gpios:0=", <&gpio>, | ||
<&csi1>, "sync-gpios:4", | ||
<&csi1>, "sync-gpios:8=0"; /* GPIO_ACTIVE_HIGH */ |
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.
This is OK, but you can use the named constant:
cam1_sync = <&csi1>, "sync-gpios:0=", <&gpio>,
<&csi1>, "sync-gpios:4",
<&csi1>, "sync-gpios:8=", <GPIO_ACTIVE_HIGH>;
The legacy stack had an option to have a GPIO track frame start and end events to give basic synchronisation to the incoming image stream. https://forums.raspberrypi.com/viewtopic.php?t=190314 Replicate this in the kernel Unicam driver. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Unicam now takes an optional GPIO to expose frame start/end timing, so add an override to configure that. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@naushir What's your view on this? It could be done from userspace, but with a large round trip delay. |
Looks reasonable to me. Probably want to replicate this in the cfe driver? |
Probably yes (caveat around multiple virtual channels), but I'll leave that up to you :-) The OP was really after the simple flash driver function from the legacy stack, but I don't believe flash has really been considered in libcamera as yet. As this can be merged without impacting the normal flow of things, I'll drop the draft status even though the OP hasn't come back on it. |
Any objections to merging this then? |
LGTM |
See: raspberrypi/linux#6113 kernel: DRM: rp1: rp1-dsi: Fix escape clock divider and timeouts See: raspberrypi/linux#6120 kernel: vc4/hdmi: Ignore hotplug interrupt with force_hotplug See: raspberrypi/linux#6123 kernel: drivers: media: cfe: Add remap entries for mono formats See: raspberrypi/linux#6122 kernel: dw-axi-dmac-platform: Avoid trampling with zero length buffer See: raspberrypi/linux#6118 kernel: Add a strict_gpiod option See: raspberrypi/linux#6117 kernel: Unicam FS/FE timing GPIO See: raspberrypi/linux#6088
See: raspberrypi/linux#6113 kernel: DRM: rp1: rp1-dsi: Fix escape clock divider and timeouts See: raspberrypi/linux#6120 kernel: vc4/hdmi: Ignore hotplug interrupt with force_hotplug See: raspberrypi/linux#6123 kernel: drivers: media: cfe: Add remap entries for mono formats See: raspberrypi/linux#6122 kernel: dw-axi-dmac-platform: Avoid trampling with zero length buffer See: raspberrypi/linux#6118 kernel: Add a strict_gpiod option See: raspberrypi/linux#6117 kernel: Unicam FS/FE timing GPIO See: raspberrypi/linux#6088
Replicates the firmware option to enable a GPIO to follow CSI frame start/end timings.
https://forums.raspberrypi.com/viewtopic.php?t=368437