V4L2 timestamp and DQBUF issues (L4T 28.2)

We are experiencing VIDIOC_DQBUF ioctl’s returning before the frame is ready.
Perhaps related, the v4l2_buffer’s timestamp is not set.
According to ShaneCCC
“the kernel-4.4 have new define /kernel/include/media/videobuf2-v4l2.h I think the user space need to change too. Could you use the vb2_v4l2_buffer instead of v4l2_buffer.”
I’m confused: vb2_v4l2_buffer is not part of the userspace API.
Does anyone have an example of its use in a userspace program?

For your case you can debug from the CSI/VI kernel driver to check. Otherwise if you can’t include vb2_v4l2_buffer you can just copy this struct to your user space APP to define it to try.

Are you saying that vb2_v4l2_buffer can be passed to VIDIOC_QBUF and VIDIOC_DQBUF ioctls?
Otherwise what should they be passed to?

OK, Please forgot my early comment.
Could you trace and make some log in __fill_v4l2_buffer() the …/drivers/media/v4l2-core/videobuf2-v4l2.c to check the timestamp is validate in there.