Capture errors loading a V4l2 driver as Kernel Module

Hi,

I have a V4l2 driver working on TX2 (L4T-32.2).
I’m having a strange capture issue when loading the V4l2 sensor driver as Kernel module.

If I compile the driver as built-in, I’m able to capture using different resolutions:

v4l2-ctl -d /dev/video4 --set-fmt-video=width=3840,height=2160,pixelformat=BA10 --set-ctrl bypass_mode=0 --stream-mmap
<<<<<<<<<<<<<<<
v4l2-ctl -d /dev/video4 --set-fmt-video=width=1280,height=720,pixelformat=BA10 --set-ctrl bypass_mode=0 --stream-mmap
<<<<<<<<<<<<<<<

If I compile the driver as Kernel Module, I’m able to capture using lower resolutions only. Capture errors appears for high resolutions.

v4l2-ctl -d /dev/video4 --set-fmt-video=width=1280,height=720,pixelformat=BA10 --set-ctrl bypass_mode=0 --stream-mmap
<<<<<<<<<<<<<<<

Not Working:

v4l2-ctl -d /dev/video4 --set-fmt-video=width=3840,height=2160,pixelformat=BA10 --set-ctrl bypass_mode=0 --stream-mmap

This is the trace that I get:

kworker/4:0-36    [004] ....   612.692605: rtcpu_vinotify_event: tstamp:19269659676 tag:CSIMUX_STREAM channel:0xff frame:48 vi_tstamp:19269659297 data:0x00000100
     kworker/4:0-36    [004] ....   612.748571: rtcpu_vinotify_event: tstamp:19271510326 tag:CHANSEL_PXL_SOF channel:0x00 frame:0 vi_tstamp:19271509784 data:0x00000001
     kworker/4:0-36    [004] ....   612.748580: rtcpu_vinotify_event: tstamp:19271510550 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:19271509788 data:0x00000000
     kworker/4:0-36    [004] ....   612.748583: rtcpu_vinotify_event: tstamp:19271515541 tag:CHANSEL_LOAD_FRAMED channel:0xc4 frame:0 vi_tstamp:19271515161 data:0x08000000
     kworker/4:0-36    [004] ....   612.748586: rtcpu_vinotify_event: tstamp:19271671186 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:19271670801 data:0x000d0200
     kworker/4:0-36    [004] ....   612.748588: rtcpu_vinotify_event: tstamp:19271671684 tag:CHANSEL_LOAD_FRAMED channel:0xc4 frame:0 vi_tstamp:19271671337 data:0x08000000
     kworker/4:0-36    [004] ....   612.748590: rtcpu_vinotify_event: tstamp:19271672956 tag:CHANSEL_FAULT_FE channel:0xc4 frame:0 vi_tstamp:19271672356 data:0x00000001
     kworker/4:0-36    [004] ....   612.748592: rtcpu_vinotify_event: tstamp:19271673146 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:19271672360 data:0x00000000

I verified that the camera is streaming correctly, however it seems that the problem is in the TX2 side.
I wonder if anyone has seen this issue before?

Thanks,
-Enrique

What’s if have sensor driver report only 3840x2160?

Hi ShaneCCC,

We were able to fix it. We are loading two V4l2 drivers and the problem was in the order which the modules were loaded.

We identified that it’s necessary to load at the end the driver that supports a higher resolutions and lane-speed, thinking that somehow VI/NVCSI bandwidth is configured based on the last driver loaded.

So if the driver with lower resolutions is loaded at the end, VI/NVCSI bandwidth will not allow high resolutions capture.

-Enrique