i.MX6 V4L2 enqueue and dequeue timing.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6 V4L2 enqueue and dequeue timing.

Jump to solution
1,437 Views
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

Labels (3)
Tags (1)
0 Kudos
Reply
1 Solution
988 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
989 Views
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 Kudos
Reply