Image tearing with v4l2 capture from tamron MP3010M-EV

Hi All,

I’ve narrowed down actually what this tearing issue is, but not what is causing it.

It seems the V4L2 driver is being told the frame is ready to read out before the DMA from the mipi core is finished.

IE our MIPI input device hasn’t finished filling the buffer up before V4L2 reads it out.
This results in my frames (i have 4 V4L2 buffers set up) looking like the following:

since the frame isn’t filled yet . Though V4L2 finishes copying the data, our MIPI input is still filling the frame out. This results in the circular buffer then wrapping back around to the first buffer (which now has full data). It then repeats with only the partial top being filled in followed by the remenants of the last filled frame.

I see the MIPI protocol has Frame Packet Start & Frame Packet End codes which i assume signal to the V4L2 driver when a frame is ready.

Hi,

For the camera basic functionality first needs to check the device and driver configuration.
You can reference to below program guide for the detailed information of device tree and driver implementation.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#sensor-software-driver-programming

Please refer to Applications Using V4L2 IOCTL Directly by using V4L2 IOCTL to verify basic camera functionality.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#to-run-a-v4l2-ctl-test

Once confirm the configure and still failed below link help to get log and some information and some tips for debug.
https://elinux.org/Jetson/l4t/Camera_BringUp#Steps_to_enable_more_debug_messages

Thanks!

Hi carolyuu,

I have already checked and verified all settings and configurations. tearing is visible even when we capture with v4l2-ctl command.
v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=YUYV --stream-mmap --set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video0

What’s the BSP version?
Any error in the trace log?

its l4t 35.4.1. no error in trace log.

Maybe try others output size.

camera supports 1280x720 and 1920x1080. tried both. same issue. putting usleep of 30ms after camera capture fixes tearing.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.