Porting an Argus app to 28.2

I’m attempting to port an Argus app from r24.2 to r28.2. I updated the headers and the app runs, but I get a lot of errors and warnings.

This warning happened in r24.2 also. Doesn’t seem to affect anything, but would be nice to know how to fix it.

NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found

Apparently this can be ignored also.

LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/daxc02_master_mt9m021.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/daxc02_master_mt9m021.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/daxc02_master_mt9m021.isp] 8/16---- imager: No override file found. ----

What is the LSC surface?

LSC: LSC surface is not based on full res!

These errors get thrown every time the ISP tries to adjust the image. Is something configured incorrectly in my driver?

setControlValMultiple: Frame Length Control class inconsistent
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 775)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1618)

This one is probably related to the above.

updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 555)

I’m still using the now deprecated TEGRA_CAMERA_CID_FRAME_LENGTH, TEGRA_CAMERA_CID_COARSE_TIME, and 32 bit TEGRA_CAMERA_CID_GAIN. Is that the problem?

Edit: Auto exposure is not working

I’m able to get video out of it and the auto exposure seems to be working. I’d just want to make sure i’m doing things correctly.

The LSC is about lens shading config it’s about the tuning process to gen the config for specific lens. You can ignore it.
For the Control class inconsistent, could you run the v4l2-compliance and check the 28.2 sensor programing guide to look if any new thing need to follow.

Will do, I ran v4l2-compliance on 28.1 and 45/45 tests passed. I’ll run it again on 28.2 to make sure.

I did a diff of ov5693.c from r24.2 and r28.2 to upgrade my driver. I’ll go through the new guide tomorrow. Maybe I missed something else in the dtb.

I went back to r28.1 since that’s where the issues began. I ran through the Sensor Driver Programming Guide again and compared my DTSI to the imx214 example. No luck.

Going to try updating to the 64 bit control versions tomorrow and see if that fixes it.

Also autoexposure is definitely not working. I re-enabled debug messages on my driver and the ISP isn’t setting Course Time or Gain, just throwing those errors when it should.

I pulled out the old daemon debugging script, same errors show up. So it’s not just my app.

sudo service nvcamera-daemon stop
enableCamScfLogs=1
enableCamPclLogs=1
sudo /usr/sbin/nvcamera-daemon
Ready
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
PCLHW_DTParser
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/daxc02_slave_mt9m021.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/daxc02_slave_mt9m021.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/daxc02_slave_mt9m021.isp] 8/16---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/daxc02_master_mt9m021.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/daxc02_master_mt9m021.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/daxc02_master_mt9m021.isp] 8/16---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
LSC: LSC surface is not based on full res!
setControlValMultiple: Frame Length Control class inconsistent
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)
PowerServiceCore:handleRequests: timePassed = 1260
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values
(NvOdmDevice) Error InsufficientMemory: Cannot allocate control string (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlValMultiple(), line 541)
setControlValMultiple: Gain Control class inconsistent
(NvOdmDevice) Error BadParameter: Invalid control list (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlValMultiple(), line 761)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1558)
updateOutputSettings: Set Control failed. Use cached values

v4l2-compliance 42/42 succeeds.

Driver Info:
	Driver name   : tegra-video
	Card type     : vi-output, daxc02 6-0010
	Bus info      : platform:54080000.vi:0
	Driver version: 4.4.38
	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: 8 Private Controls: 15

	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

Think I figured it out, Gain and Course Time are now units of seconds given in 24.8 format. They used to be arbitrary unit-less numbers.

Updated the module to use all the new Integer64 bit controls, exact same errors. Nothing has changed.

What is NvOdmDevice?

Is the source at dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp available?

Switch to https://devtalk.nvidia.com/default/topic/1031364