Debugging new image sensors

I’m trying to get a new camera working on the Jetson Nano. When I run the Tegra multimedia sample 10_camera_recording

I’ve commented out the EGL display connection code because I don’t have a display connected due to other issues (https://devtalk.nvidia.com/default/topic/1057082/jetson-nano/jetson-nano-continuously-prints-tegradc-tegradc-0-blank-powerdown/post/5390476/#5390476)

I get the following error message:

maza@maza:~/tegra_multimedia_api/samples/10_camera_recording$ ./camera_recording -v
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Set governor to performance before enabling profiler
Error generated. main.cpp, execute:492 No cameras available
(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error EndOfFile: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 340)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
(Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error EndOfFile:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)

I’ve enabled debug messages (and added a few) to the kernel, specifically to imx274.c and camera_common.c. When I run the program I get the following in the dmesg log:

[  125.343003] imx274 6-001a: camera_common_mclk_enable: enable MCLK with 24000000 Hz
[  125.343065] imx274 6-001a: camera_common_dpd_disable: csi 2
[  125.343098] imx274 6-001a: camera_common_dpd_disable: csi 3
[  125.343103] imx274 6-001a: imx274_power_on: power on
[  125.353191] imx274 6-001a: set_mode
[  125.365408] imx274 6-001a: imx274_write_table result: 0
[  125.365418] imx274 6-001a: steaming
[  125.399199] imx274 6-001a: imx274_power_off: power off
[  125.399283] imx274 6-001a: camera_common_dpd_enable: csi 2
[  125.399313] imx274 6-001a: camera_common_dpd_enable: csi 3
[  125.399317] imx274 6-001a: camera_common_mclk_disable: disable MCLK
[  125.399353] imx274 6-001a: camera_common_mclk_enable: enable MCLK with 24000000 Hz
[  125.399395] imx274 6-001a: camera_common_dpd_disable: csi 2
[  125.399434] imx274 6-001a: camera_common_dpd_disable: csi 3
[  125.399438] imx274 6-001a: imx274_power_on: power on
[  125.409658] imx274 6-001a: imx274_power_off: power off
[  125.409734] imx274 6-001a: camera_common_dpd_enable: csi 2
[  125.409760] imx274 6-001a: camera_common_dpd_enable: csi 3
[  125.409764] imx274 6-001a: camera_common_mclk_disable: disable MCLK

It appears the table write works. I’ve also tried to read and write I2C registers via v4l2-dbg, but this gives me an error:

maza@maza:~/tegra_multimedia_api/samples/10_camera_recording$ v4l2-dbg -d /dev/video0 -g=0x1000
ioctl: VIDIOC_DBG_G_REGISTER
ioctl: VIDIOC_DBG_G_REGISTER failed for 0x0

I’m at a loss as to how to debug this problem. Any suggestions?

camera_common_mclk_disable: disable MCLK

there must be something wrong happened here and MCLK is disabled.