I am trying to bring up ov7695 camera driver on imx8mm EVK. This is MIPI based camera. After initial development, camera driver is working when display driver is disabled. It stopped working when I am enabling the display driver.
Setup
- IMX8MM board
- OV7695 camera sensor driver
- MIPI to HDMI converter
- HDMI display
- Linux - 5.4
- gstreamer to stream the video to display and store video.
- v4l2grab to take image
- fb-test to test the display.
Use Cases
- Use Case-1:
Boot the device with camera and display both are connected. Display is working, camera is not working (streaming to display, image, and video storage - not working)
- Use Case-2:
Boot the device with camera is connected, display is not connected
No display, camera is working (save image and video, can’t test if the streaming to display is working)
- Use Case-3:
Boot the device with only camera connected, without display connected. Camara is working (save image and video, can’t test if the streaming to display is working). Connect the HDMI - Camera stop working, display is working
- Use Case-4:
Boot the device with camera connected, without display connected. Video and Image storage is working, start the video streaming using gstreamer. Connect the HDMI display. Video is streaming to HDMI display.
Software Analysis
When the display driver is loaded it is creating the /dev/fb0 node.
Camera driver is using /dev/video0 node.
When the camera image/video capture is not working it is failing at the v4l2 ioctl - VIDIOC_DQBUF. We are using v4l2grab utility to store image.
https://github.com/twam/v4l2grab/blob/master/v4l2grab.c#L284
It is returning EAGAIN in loop. The app is waiting forever (because of the application logic, not driver). And the device is going to this state when the display driver gets loaded (/dev/fb0 is created).
I would appreciate if someone can help me extending the debug effort.
Thanks,
Avijit