Thanks for clarification. I have only little experience with V4L2 (I have implemented drivers for FLIR infrared cameras for i.mx6 in grey scale formats MEDIA_BUS_FMT_Y12_1X12 for 3.x and 4.x kernels).
I have tried
v4l2-ctl -d /dev/video2 --get-fmt-video which seems to report all formats, not only expected
'GBRG' (8-bit Bayer GBGB/RGRG), but i.MX8m CSI interface can probably support all reported.
v4l2-ctl -d /dev/video2 --all lists
Pad 0x01000005 : 0: Sink. But my attempts to get list of resolutions even for supported format seems strange
v4l2-ctl -d /dev/video2 --list-framesizes 'GRBG' ->
Size: Continuous 1x1 - 65535x65535, may it be limit of i.MX8M CSI input. If I try
v4l2-ctl -d /dev/video0 --get-subdev-fmt 0, I receive error. I get reasonable output for command retrieving actual setting
v4l2-ctl -d /dev/video2 --get-fmt-video. Attempt with simple example how to grab single frame of V4L2 video seems to work and stores 820560 bytes which matches raw format. Same for the command
v4l2-ctl --set-fmt-video=width=1052,height=780,pixelformat=GRBG --stream-mmap --stream-count=1 -d /dev/video2 --stream-to=raw.img
But I miss a way how to enumerate real supported formats on global and or subdev/pad level…
I have not found how to list controls for gain, exposure and balance as well even that I see them in the driver s5k3l6xx.c. They should be listed probably on the pad level but attempt to list formats for given (0, CSI) pad seems to fail.
As for the conversion, I would expect that there is some option in CSI or VPU module to do GRBG to RGB or YUV conversion in kernel directly in DMA streams. But I have only old IMX8M manual which is not clear and actual seems to require agreement with restrictions. Formats conversion in kernel at DMA level would prevent loading CPU so heavily
Even in case that kernel cannot process conversion, then libv4lconvert should be able to adjust and report synthetics BGR24, RGB24, YUV420 and YVU420 formats in user-space. So applications using v4l2 library should work out of the box… But when limited format support is not enumerated and all seems to be available then applications has no chance to find that conversion is necessary.
But I probably miss something…
I am curious how is the support planned/progressing. Is there some better documentation or location where to look on ongoing development, discus it and or try to contribute?