Issue with v4l kernel modules during driver-installation


i am trying to install the video for linux driver for the following m2-sdi video converter from avermedia: link.

When loading the kernel module i get the following errors:

modprobe: FATAL: Module videobuf2-common not found in directory /lib/modules/4.9.140-tegra
modprobe: FATAL: Module videobuf2-dma-sg not found in directory /lib/modules/4.9.140-tegra
insmod: ERROR: could not insert module cn312s.ko: Unknown symbol in module

dmesg gives the following output:

Unknown symbol vb2_dma_sg_memops (err 0)

I tested before on a computer with x64_86 architecture without any problems. What could be the problem here? The specific kernel version seems to be supported by the driver. I was trying to investigate the installed kernel modules with lsmod but was suprised to find only very few. Are these kernel modules missing? Is it possible to install them?

I am using tegra version 4.4.1.

Thanks in advance!

Today i tried my luck with linux4tegra version 4.5.1 without success. It uses a slightly different kernal version 4.9.201. When checking cat /proc/kallsyms | grep vb2_dma i found that indeed there is no such symbol as vb2_dma_sg_memops. There is only a vb2_dma_contig_memops. Afterwards i checked the kernel source on gitlab. There is a file located at drivers/media/v4l2-core/videobuf2-dma-sg.c in line 646 the concerning function vb2_dma_sg_memops is defined there.
So why is not being compiled? I am not very experienced with linux kernels or c compilers but i am guessing that somehow during compilation these parts of video4linux are not included in the kernel. Then it should be possible to compile the kernel including this symbol isn’t it? In the Kconfig file it says for both vb2_dma_contig_memops and vb2_dma_sg_memops depends on HAS_DMA so if the contig one comes why does the sg one not come?

Suppose Tegra VI camera driver not support vb2_dma_sg_memops.
Have a reference to below document for CSI video input driver implementation.

Is there a way to know for sure if its supported or not? The Company that sells the adapter, AverMedia claims that this driver is working on the Xavier/tegra.

Yes, VI engine only support contiguous memory.

I contacted AverMedia and they provided the following fix:

  1. Go to the “Generic_Ubuntu_and_Tegra_CX311_Drv_x86_x64_2.0.8_20210119\driver\utils\v4l2” folder. And modify the “SOURCE” file add “videobuf2-dma-sg.c” into the path.

  2. Re-build driver .ko file.

  3. Run “sudo ./” to install driver, when done usage “lsmod” command, you can find cn312s module driver on system.

I tested it on Jetpack 4.5.1 and it works

1 Like