V4L2 fails with MIPI camera on 5.15 kernel

Which Khadas SBC do you use?

VIM3 Pro

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 22, linux 5.15

Which version of system do you use? Khadas official images, self built images, or others?

Fenix build

Please describe your issue below:

I am trying to capture frames from os08a10 camera via V4L2.
I tried to capture with cmd:
v4l2-ctl --device /dev/video50 --set-fmt-video=width=3840,height=2160,pixelformat=NV21 --stream-mmap --stream-to=frame.raw --stream-count=40

but it always prints VIDIOC_REQBUFS returned -1 (Invalid argument)

This command works fine on 4.9 kernel (ubuntu 20).

I have tried opencv v4l2 capture example from VIM4 MIPI Camera Usage [Khadas Docs] . It also does not work, opencv capture always returns empty frame.
Only gstreamer capture works.

Is it possible to capture frames via V4L2 ? I need to capture RAW16 fromat (without ISP image enhancements) and it is possible only in the way of V4L2 capture with BYR2 format, gstreamer cant do it.

Hello @alexanib

Please check the usage for 5.15 kernel here:

https://docs.khadas.com/products/sbc/vim3/add-ons/vim3-mipi-camera