i.MX6 V4L2 enqueue and dequeue timing.

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

i.MX6 V4L2 enqueue and dequeue timing.

跳至解决方案
1,436 次查看
satoshishimoda
Senior Contributor I

Hi community,

Our partner have a question about i.MX6S V4L2 driver of L3.0.35_4.1.0 BSP.

They understand the timing that V4L2 driver receive data as following.

=====

A buffer which is enqueued to driver by VIDIOC_QBUF have two status.

These are V4L2_BUF_FLAG_QUEUED and V4L2_BUF_FLAG_DONE.

And it will be able to be dequeued (be able to write a next data to input buffer which was enqueued in previous step) when V4L2_BUF_FLAG_DONE sutatus.

=====

However, according to the source code (comment around line 743 in drivers/media/video/mxc/output/mxc_vout.c), the first buffer can be dequeued after 3 buffers is enqueued if input buffer size = output buffer size.

In this case, can our partner check whether the next data can be written to the first buffer before the 3rd buffer is enqueued?

Best Regards,

Satoshi Shimoda

标签 (3)
标记 (1)
0 项奖励
回复
1 解答
987 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Satoshi-san

Never try it but If you check the V4L2_BUF_FLAG_PREPARED in user space, The buffer has been prepared for I/O and can be queued by the application. Drivers set or clear this flag when the VIDIOC_QUERYBUF, VIDIOC_PREPARE_BUF, VIDIOC_QBUF or VIDIOC_DQBUF ioctl is called. I do not see any other way to do what your costumer is trying to do.

Hope this helps

在原帖中查看解决方案

0 项奖励
回复
1 回复
988 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Satoshi-san

Never try it but If you check the V4L2_BUF_FLAG_PREPARED in user space, The buffer has been prepared for I/O and can be queued by the application. Drivers set or clear this flag when the VIDIOC_QUERYBUF, VIDIOC_PREPARE_BUF, VIDIOC_QBUF or VIDIOC_DQBUF ioctl is called. I do not see any other way to do what your costumer is trying to do.

Hope this helps

0 项奖励
回复