linux
linux copied to clipboard
WIP: "Dummy" CSI2 sensor driver
To replace raspiraw and the MMAL rawcam component, provide a dummy V4L2 sensor driver that will accept almost any resolution and format asked of it by userspace, which it will then use to configure bcm2835-unicam.
Number of lanes and clock setup needs to come from DT.
I'm now converting https://github.com/raspberrypi/raspiraw to use this instead of MMAL.
Thanks for the review comments. Hopefully those are all fixed up now.
I have missed adding it to the defconfig though, so I'll leave the WIP for now.
I've proven it using a hacked raspiraw which does no MMAL or V4L2 stuff (only sensor config over I2C) with v4l2-ctl --stream-mmap=3 --stream-to=/dev/null --stream-count=1000
running in a different terminal, and V4L2/unicam does start revceiving frames when raspiraw starts, and stops when complete. I'm fairly happy it's all good in that regard.
For the benefit of other readers, the overlay works because fragments that target other fragments get applied before other fragments are merged with the base. Had there been two levels of nesting (fragments that target fragments that target fragments) then it would have been necessary to sort the fragments into application order and put the main fragment at the end.
Had there been two levels of nesting (fragments that target fragments that target fragments) then it would have been necessary to sort the fragments into application order and put the main fragment at the end.
Which is the bit that I never get right :-)
I think you're the only person to attempt it, therefore nobody gets it right.
This is dead as it's against 5.10.
It'll get rebased against 6.1 at some point (https://github.com/6by9/linux/tree/rpi-5.15.y-dummy_sensor has the equivalent patches against 5.15, but I've noted things to fix there).