V4L2_MEMORY_USERPTR not working with soc camera

we have developed soc camera based driver for ov sensor. we are using standard v4l2 application to capture image from sensor. we are able to test using mmap method but not using user pointer method (V4L2_MEMORY_USERPTR) method.

we are using L4t 21.4 release.

has anyone been able to use V4L2_MEMORY_USERPTR on tegra k1 ?

error occurs in ioctl VIDIOC_QBUF. error code is -22.

Hi PratikPatel,
Currently we don’t support V4L2_MEMORY_USERPTR as this is to allocate buffer in user space.
Although we have plan to support that, it’s still not started yet.

Cheers

thanks kayccc for confirmation.

Hi Kaycc,

when are you planning to add V4L2_MEMORY_USERPTR ioctl support ?

actually we are facing latency issue(it takes 17ms time to copy around 4MB of data) with mmap buffer at application side.

so in order to fix latency issue we want to try user pointer buffer instead of mmap buffer.

Hi PratikPatel

Although we have plan to support that, unfortunately, it’s no clear schedule yet.

Thanks

I made userptr method here: [url]https://devtalk.nvidia.com/default/topic/947488/jetson-tk1/slow-copy-memcpy-26mb-190ms-it-is-normal-bandwidth-/?offset=7#4921965[/url]

thanks viktor,

after using memalign function, now user pointer feature works. but there is another issue. after DQBUF ioctl when i copy data from user pointer buffer to local pointer then some times memcmp fails between user pointer and local pointer. code snippet i have updated in our link.