Xavier: v4l2 userptr mode

Hi, all:

I can get image use mmap mode, but when I copy the kernel memory to user memory use memcpy is very slowly. So I want use userptr mode.
Can you tell me how use userptr mode?
I use the example code from 11.1. file: media/v4l/capture.c — The Linux Kernel documentation . the mmap mode is ok, but the userptr mode is error.

VIDIOC_QBUF error 22, Invalid argument

Thanks.

Have a reference to the multimedia API sample code for the userptr .

12_camera_v4l2_cuda