-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ports/stm32: Dual CSI support (for N6). #2691
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
base: master
Are you sure you want to change the base?
Conversation
1372d6f
to
7f57ea5
Compare
Yes, that's perfect! Also, with the new information we received from ST about the AI hyperRAM not needed to be pegged we can just make the heap even bigger. Note, to support 5MP camera sensors we want the framebuffer+fb_alloc to hold 20MB+.
Prefer functions. The new pythonic methods are perfect.
Nice. |
9d6aec1
to
d622087
Compare
Signed-off-by: iabdalkader <[email protected]>
Signed-off-by: iabdalkader <[email protected]>
Signed-off-by: iabdalkader <[email protected]>
Signed-off-by: iabdalkader <[email protected]>
Signed-off-by: iabdalkader <[email protected]>
Signed-off-by: iabdalkader <[email protected]>
Signed-off-by: iabdalkader <[email protected]>
- Fix I2C bus. - Override default abort/config. - Set aux flag for dual-csi config. Signed-off-by: iabdalkader <[email protected]>
A modern API that supports multiple CSI instances. The API is a work in progress and is not backwards compatible, but it can be enabled and used at the same time as the old "sensor" module. Signed-off-by: iabdalkader <[email protected]>
- Temporary PR, drop later. Signed-off-by: iabdalkader <[email protected]>
d622087
to
dde6122
Compare
A first draft of dual-CSI support (see #2676). This is based on N6 support, see commits starting at
imlib/framebuffer: Add support for a second frame buffer.
The main changes are:
sensor
module is still supported and both the new and old APIs are enabled.I've enabled Lepton, both PixArt sensors and Soft-CSI. Lepton + PAG should work, but it's untested. If a single sensor is connected, soft-csi gets added automatically, so you could run the following example as is:
Technically, you could also enable 3 CSIs, but you'll need a third, statically-defined FB. So I'm considering making FBs dynamically allocated, possibly only for secondary CSIs. This will also fix the FB size issue. Thoughts?
Also, I'm considering replacing most of the functions with attributes. For example:
They're smaller, faster, easier to maintain. Thoughts?
A note about the ops: More functions have been made ops (such as, abort, config and snapshot).
1- In port's main CSI driver (for example:
ports/omv_csi.c
), the main driver's ops are initially set as defaults:This allows something like Lepton and Soft-CSI to set abort/config to NULL, which will not configure DCMI/DMA and will do the general
abort()
part but Not disable DMA/DCMI. These driver were never supposed to call stm32's config/abort anyway, because they don't use DCMI/DMA, but now with dual-csi config, these structs will not even be initialized for the secondary/aux sensors.While we're at it, made main driver's snapshot an op too. Drivers like boson that need to both override the main snapshot, and still call it later, can get the main snapshot by stashing the pointer in their init functions: