I checked the camera module with a raspberry and with that it works properly, so the HW is OK I think. I also checked the trace log of the ov5647 and the imx219’s log to to have an example of a working one. I also added more debug prints to the sensor driver and also have the nvgstcapture log.
Based on the dmesg logs I can say the driver enters the start_streaming function and also write the required register values without error. The register value pairs are based on the linux repository
If I check the trace files (ov5647 and imx219) I can see almost the same messages
gst-plugin-scan-6128 [000] … 137.629763: tegra_channel_open: vi-output, ov5647 7-0036
gst-plugin-scan-6128 [000] … 137.629785: tegra_channel_close: vi-output, ov5647 7-0036
nvargus-daemon-6152 [001] … 179.039631: tegra_channel_open: vi-output, ov5647 7-0036
nvargus-daemon-6152 [001] … 179.039748: tegra_channel_close: vi-output, ov5647 7-0036
nvargus-daemon-6152 [001] … 179.042057: tegra_channel_open: vi-output, ov5647 7-0036
nvargus-daemon-6152 [001] … 179.042145: tegra_channel_close: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.085065: tegra_channel_open: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.085086: tegra_channel_close: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.085102: tegra_channel_open: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.085178: tegra_channel_close: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.085236: tegra_channel_open: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.085338: tegra_channel_close: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.122424: tegra_channel_open: vi-output, ov5647 7-0036
nvargus-daemon-6152 [002] … 179.122445: tegra_channel_close: vi-output, ov5647 7-0036
nvargus-daemon-6152 [003] … 179.250876: camera_common_s_power: status : 0x1
nvargus-daemon-6152 [001] … 179.392078: camera_common_s_power: status : 0x0
CaptureSchedule-6171 [000] … 179.552658: tegra_channel_open: vi-output, ov5647 7-0036
CaptureSchedule-6171 [000] … 179.553351: tegra_channel_set_power: ov5647 7-0036 : 0x1
CaptureSchedule-6171 [000] … 179.553358: camera_common_s_power: status : 0x1
CaptureSchedule-6171 [002] … 179.554743: tegra_channel_set_power: nvcsi–2 : 0x1
CaptureSchedule-6171 [002] … 179.554747: csi_s_power: enable : 0x1
CaptureSchedule-6171 [002] … 179.554750: tegra_channel_set_stream: enable : 0x1
CaptureSchedule-6171 [002] … 179.555121: tegra_channel_set_stream: nvcsi–2 : 0x1
CaptureSchedule-6171 [002] … 179.555124: csi_s_stream: enable : 0x1
CaptureSchedule-6171 [002] … 179.555124: tegra_channel_set_stream: ov5647 7-0036 : 0x1
kworker/1:2-1049 [001] … 189.949376: camera_common_s_power: status : 0x1
kworker/1:2-1049 [001] … 190.056526: camera_common_s_power: status : 0x0
until this line
CaptureSchedule-6171 [002] … 179.555124: tegra_channel_set_stream: ov5647 7-0036 : 0x1
In the case of imx219 it continues more CaptureSchedule related lines, but the ov5647 version continues with these:
kworker/1:2-1049 [001] … 189.949376: camera_common_s_power: status : 0x1
kworker/1:2-1049 [001] … 190.056526: camera_common_s_power: status : 0x0
The nvgstcapture log also almost the same as the imx219 log but ends with the following errors:
SCF: Error InvalidState: 1 buffers still pending during EGLStreamProducer destruction (propagating from src/services/gl/EGLStreamProducer.cpp, function freeBuffers(), line 309)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function ~EGLStreamProducer(), line 50)
waitForIdleLocked remaining request 103
SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 928)
(Argus) Error Timeout: (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 169)
=== nvgstcapture-1.0[6447]: Connection established (7F3F7FE1D0)=== nvgstcapture-1.0[6447]: CameraProvider initialized (0x7f40000c20)(Argus) Error AlreadyAllocated: Device 0 (of 1) is in use (in src/api/CameraProviderImpl.cpp, function createCaptureSessionInternal(), line 274)
I repeated the test with the v4l2-ctl commands and saved the trace log from this period of time and I got different output. After the initialization there is a lot of repetition of the following line with incremental numbers
tegra_channel_capture_frame: sof:471.318570237
If it means the successful frame capture based on the timestamps between 2 capture there is 0.21 sec which is more like 5fps not 30fps. I repeated the command with the imx219 and it gave back the actual fps values, so I can say something hinders the frame acquiring in the case of ov5647. Sorry for the many copy paste messages I do not know how can I share the most effectively the logs without attaching too much unnecessary information. Can be the problem pixel clock related or other device tree parameter?