VIDIOC_DQBUF never works with CSI-2 MIPI on imx8m-mini

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

VIDIOC_DQBUF never works with CSI-2 MIPI on imx8m-mini

2,073 次查看
ian5
Contributor I

I'm using a Variscite DART-MX8M-MINI SOM (imx8m-mini SOC), with Variscite VAR-DT8MCustomBoard and Variscite VCAM-5640S (Omnivision OV5640) camera board.   This all works fine with the supplied Yocto Warrio (Kernel 4.19)  / Yocto Zeus (Kernel 5.4) configuration, using gstreamer for live view or stream capture.

For my custom application I'm trying to capture frames from this OV5640 on the MIPI-CSI2 interface using V4L2 API, but VIDIOC_DQBUF blocks forever.   I want to achieve capture without gstreamer, as we have custom hardware/driver for a camera that only produces 12bit Bayer data, which gstreamer does not support).

I expect the basic V4L2 capture functionality to work -- others on this NXP Communit appear to confirm that it does work, but I have tried tools such as v4l2-ctl and yavta - these all block.  I have tried the basic capture sample from https://www.kernel.org/doc/html/v5.4/media/uapi/v4l/capture.c.html - this times out in the select() call.   No matter what I do I can never receive image data via the V4L2 DQBUF ioctl.

Variscite have stated that they only support use of their system with gstreamer, so I'm a bit stuck, but the state their distribution is based on an NXP BSP, hence why I'm looking here for advice.

Has anyone got any camera working with CSI-2 MIPI and V4L2 DQBUF API on the imx8m-mini ?

标签 (1)
0 项奖励
回复
3 回复数

1,904 次查看
zwc_sky
Contributor I

Hi Ian
I have some question for you.How do you change the kernel source code to get bayer12 video data.
Can you tell me .Thank you.

0 项奖励
回复

2,020 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Ian

one can look at mx8 v4l2 unit test examples

mxc_v4l2_test\test - imx-test - i.MX Driver Test Application Software 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,020 次查看
ian5
Contributor I

I had not seen this test code before.  This helped resolve the issue.  It appears to be critical on the imx8 to call VIDIOC_S_PARM (set the frame rate).   Adding this to my test code now lets me receive frames - amazing!

0 项奖励
回复