linux icon indicating copy to clipboard operation
linux copied to clipboard

WIP: "Dummy" CSI2 sensor driver

Open 6by9 opened this issue 3 years ago • 4 comments

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.

6by9 avatar Mar 19 '21 15:03 6by9

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.

6by9 avatar Mar 19 '21 16:03 6by9

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.

pelwell avatar Mar 19 '21 16:03 pelwell

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 :-)

6by9 avatar Mar 19 '21 17:03 6by9

I think you're the only person to attempt it, therefore nobody gets it right.

pelwell avatar Mar 19 '21 17:03 pelwell

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).

6by9 avatar Mar 13 '23 15:03 6by9