does jetson tx1 support dmabuf?

my v4l2 pci yuv422 driver work fine when i use mmap,but if i use dmabuf,it is failed!
i try to use the example on tegra_multimedia_api/samples/12_camera_v4l2_cuda, ./camera_v4l2_cuda -d /dev/video1 -s 1920x1080 -c, dmesg: contiguous chunk is too small 69632/4147200 b.

Hi gszqy,
It looks to be an issue in your source. For yuv422, each frame is 1920x1080x2 bytes but it is 69632 from your dmesg.

yes, system should alloc 1920x1080x2 Byte contiguous memory for me, but actually it is less then 4147200 every time, so it is failed! from code videobuf2-dma-contig.c i found this:
contig_size = vb2_dc_get_contiguous_size(sgt);
if (contig_size < size) {
pr_err(“contiguous mapping is too small %lu/%lu\n”,
contig_size, size);
ret = -EFAULT;
goto fail_map_sg;
so it means system can’t alloc enough contiguous memory.
ps: in my driver, i used q->mem_ops = &vb2_dma_contig_memops for videodevice.

Hi gszqy,
We have verified the sample with USB cameras. suggest you try USB cameras and compare the difference.

thanks for your reply!
usb camera use vb2_vmalloc_memops to alloc memory,but my driver with pcie should alloc contiguous phy memory, so i use vb2_dma_contig_memops,but it is failed :contiguous chunk is too small 69632/4147200 b, i have modified CONFIG_CMA_SIZE_MBYTES=32 or 64 or 128,it is the same err!

It is more like an issue in driver since we’ve verified the functionality with USB cam. We don’t have experience in v4l2 pci driver. Other users can share experiences.


I meet the same problem as you. Have you did fix this problem?
I referenced driver file “/driver/media/pci/dt3155.c”.
dt3155.c (18.5 KB)