I’ve been working on a camera driver using Jetpack 4.2 on the TX2. I’m having difficulty getting this working and so ran the v4l2-compliance tool as recommended in the L4t Sensor Programming guide.
I therefore executed the command “v4l2-compliance -d /dev/video0”, and have attached the results.
The test reports one failure “test VIDIOC_G/S_PARM: FAIL”.
I can’t find any information on how to interpret the results of this test and so was wondering if someone could help me to understand what the failure means and how to address it.
v4l2 compliance sending several IOCTLs to low-level drivers and have sanity tests.
your testing failure should related to frame interval settings, which control the frame-rate.
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
test VIDIOC_G/S_PARM: FAIL
suggest you review the frame rate settings in your sensor device tree,
and please also check below sources for frame interval controls.
thanks
Thanks for the suggestion. My frame rate settings were in fact wrong in my device tree, however after fixing those (see attached) there was no change in the compliance test.
It is possible that the pixel clock setting is incorrect as this calculation is not clear to me when I compare other dtsi files that I have seen for the IMX219 camera with my own calculated value.
Following the sensor driver programming guide I calculate the pixel clock setting for the IMX219 as
pixel_clk_hz = sensor data rate per lane (Mbps) * number of lanes / bits per pixel
= 755*4/10
= 302MHz
According to the IMX219 data sheet, there is a 10 bit A/D on chip converter, therefore I am assuming this means 10bits per pixel, however the other dtsi files I have seen use 12 bits.
The data rates are specified as Max.755Mbps/lane(@4lane), 912Mbps/Lane(@2lane), therefore, for 4 lanes the above value seems correct to me. tegra186-my-camera-config-a00_1.txt (9.43 KB)
it seems the sensor did not bring-up successfully,
you may debug further to check the root-causer, please access [Sensor Software Driver Programming Guide] and refer to Debugging Tips session for more details.
BTW, it’s also weird that your timestamp returning negative values.
Thanks for your help. It’s difficult because my development is based on third party drivers which use a much older version of Jetpack using different Auvidea carrier boards from the J120. There are too many variables and so difficult to debug. Auvidea are working on a driver but cannot specify a release date, therefore I’m hoping someone out there has got an IMX219 driver working using jetpack 4.2, who may be able to assist.
suspect there’s driver issue since we had some IMX219 kernel driver updates to adapt Raspberry Pi camera v2 IMX219 cameras.
could you please apply this device tree patch (0001-t18x-common-e3322-update-sensor-DT-properties.patch) to update properties for verification.
thanks
Thanks. I’ll try to apply the patch. I have my own custom DT file because I am running on an Auvidea carrier board, which has a single CSI port.
I think I need to update my kernel sources. I am currently working with kernel 4.9.140, however I have discovered that this is attempting to call an imxXXX_g_input_status function and this is not present as part of the new sensor driver format, when comparing driver imx185.c with imx185_v1.c.
I have tried to download v32.2.1 from the downloads page, but the link isn’t quite working for me.
Hi,
I’ve updated to the latest version of Jetpack and have applied the DT patch but am still getting the same PXL_SOF error. I am certain I can communicate with the device over CSI, having put in some debug to read back CSI transactions, and have also checked that the settings defined in imx219_mode_tbls.h are being written. I was hoping that once the driver was running and CSI comms were established this would be sufficient to get the camera working once the correct settings were applied.
Is it likely that there is another hardware configuration required to actually stream video or do you think the issue relates to the software implementation? I don’t see much information relating to the PXL_SOF error, other than failure to receive a sync point.
I also noticed that in the latest kernel, tegracam_set_ctrls() in tegracam_ctrls.c still attempts to call the function g_input_status, which doesn’t exist in the new format for sensor camera driver.
based-on l4t-r32.2 and also device tree change in comment #10, confirmed that imx219 works with Jetson-TX2 from my side,
suggest you may also contact with your sensor vendor to dig into this issue.
thanks
We have the devkit so I can try to replicate. I understand I need a CSI adapter to connect the IMX219 sensor. Can you tell me what you are using please.
I’m using the camera board that only for internal verification. however it using the same imx219 sensor driver.
BTW,
the v4l2-compliance error (VIDIOC_G/S_PARM: FAIL) will resolve for the next public release, i.e. l4t-r32.3
please also refer to my local testing as below.
thanks
ubuntu@tegra-ubuntu:~$ v4l2-compliance
Driver Info:
Driver name : tegra-video
Card type : vi-output, ov5693 2-0036
Bus info : platform:15700000.vi:2
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Compliance test for device /dev/video0 (not using libv4l2):
Required ioctls:
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Test input 0:
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 1 Private Controls: 16
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
Test input 0:
Total: 42, Succeeded: 42, Failed: 0, Warnings: 0