sensor driver and nvcamera-daemon integraion error

Hi, There

I’m creating a new sensor driver to support our CSI device. I created a driver based on the imx185 sample and updated device tree and now using the v4l2-ctl tool I can save raw data and validated data correctly. (the command line I used is v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100 --stream-to=test.rg10.raw.100)
However when I tried to integrate with ISP using GStreamer and nvcamerasrc, the nvcamera-daomon crashed, below is the log, I can see there are some errors but not sure what causes them. I can see direct cause is below

OFDPropertyGetString: could not read property [devnode-bus]
initialize: imx185 30-001a
(NvOdmDevice) Error ModuleNotPresent: V4L2Device not available (in dvs/git/dirty/git->master_linux/camera-partner/imager/src/V4L2Device.cpp, function findDevice(), line 245)

I put my device node at /proc/device-tree/host1x/i2c@546c0000/imx185_a@1a/ and I can see it in the system and also read mode0 properties under it. Could anyone give some suggestions on how to further debug the problem?

thanks a lot
xiaoyong

Full log:
Starting services…
Worker thread IspHw statsComplete start
Worker thread IspHw frameComplete start
Worker thread IspHw statsComplete start
Worker thread IspHw frameComplete start
Worker thread CaptureScheduler checkFramePending start
Worker thread CaptureScheduler frameStart start
Worker thread V4L2CaptureScheduler checkCaptureComplete start
Worker thread V4L2CaptureScheduler issueCaptures start
Worker thread PS handleRequests start
getInstance: s_instance(0x7f7517f070)
getInstance: s_instance(0x7f7517f070)
subscribe: create SensorType(gyroscope) sensor(0x7f751811f0)
subscribe: create SensorType(accelerometer) sensor(0x7f75186650)
AC plugin not present: dlopen “acplugin.so”, acplugin.so: cannot open shared object file: No such file or directory
Services are started
NvPclSetHotplugCallback: ++++++++++++++++++++++
---- Imager: Calibration blob file handling supported in this build ----
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition – Name: imx185_bottom_360
NvPclHwPrintModuleDefinition – Position: 0
NvPclHwPrintModuleDefinition – CalibrationData Found: 1
NvPclHwPrintCameraSubModule – HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule – HwCamSubModule[0].DevName: imx185 30-001a
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: imx185_bottom_360 position0
NvPclHwScanExternalCameras – adding video0 to discover list
NvPclHwScanExternalCameras – adding video0 to discover list
initialize: /dev/video0
queryControls: 10100739 control Group Hold
queryControls: 10100740 control HDR enable
queryControls: 10100743 control Fuse ID
queryControls: 10100744 control Sensor Mode
queryControls: 10100745 control Gain
queryControls: 10100746 control Exposure
queryControls: 10100747 control Frame Rate
queryControls: 10100836 control Bypass Mode
queryControls: 10100837 control Override Enable
queryControls: 10100838 control Height Align
queryControls: 10100839 control Size Align
queryControls: 10100840 control Write ISP format
queryControls: 10100841 control Sensor Signal Properties
queryControls: 10100842 control Sensor Image Properties
queryControls: 10100843 control Sensor Control Properties
queryControls: 10100844 control Sensor DV Timings
queryControls: 10100866 control Sensor Modes
Ioctl failed: Invalid argument
NvPclHwScanExternalCameras – adding video0 to discover list
initialize: /dev/video0
queryControls: 10100739 control Group Hold
queryControls: 10100740 control HDR enable
queryControls: 10100743 control Fuse ID
queryControls: 10100744 control Sensor Mode
queryControls: 10100745 control Gain
queryControls: 10100746 control Exposure
queryControls: 10100747 control Frame Rate
queryControls: 10100836 control Bypass Mode
queryControls: 10100837 control Override Enable
queryControls: 10100838 control Height Align
queryControls: 10100839 control Size Align
queryControls: 10100840 control Write ISP format
queryControls: 10100841 control Sensor Signal Properties
queryControls: 10100842 control Sensor Image Properties
queryControls: 10100843 control Sensor Control Properties
queryControls: 10100844 control Sensor DV Timings
queryControls: 10100866 control Sensor Modes
Ioctl failed: Invalid argument
getHotplugMonitor: Getting hotplug monitor instance
initializeHotplug++
hotPlugfunc ++
addWatch: Watch added wd=‘1’
CheckProcDTExists: INFO: accessing /proc/device-tree/tegra-virtual-camera-platform/modules; No such file or directory
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
hotPlugfunc: reading from inotify FD, Thread waiting
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 0 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f751b9230
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f751b92c0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f751b9350
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f751b93e0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f751b9470
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f751b9500
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16CheckOverridesPermissions: cannot stat file [/Calib/camera_override.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16CheckOverridesPermissions: cannot stat file [/data/nvcam/camera_overrides.isp]
LoadOverridesFile: looking for override file [/data/nvcam/settings/imx185_bottom_360.isp] 6/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/imx185_bottom_360.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/imx185_bottom_360.isp] 7/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/imx185_bottom_360.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/imx185_bottom_360.isp] 8/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/imx185_bottom_360.isp]
---- imager: No override file found. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/nvcam/settings/imx185_bottom_360.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/imx185_bottom_360.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/imx185_bottom_360.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [devnode-bus]
initialize: imx185 30-001a
(NvOdmDevice) Error ModuleNotPresent: V4L2Device not available (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function findDevice(), line 245)
(NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function initialize(), line 55)
(NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 103)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f751b93e0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f751b9470
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f751b9500
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f751b9230
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f751b92c0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f751b9350
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclStateControllerClose: Module imx185_bottom_360 closed
NvPclOpen: PCL Open Failed. Error: 0xf
NvPclClose: ++++++++++++++++++++++
NvPclClose: ----------------------
NvPclOpen: ----------------------
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 598)
SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 781)
SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 276)
SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 439)
./nv.sh: line 3: 2685 Segmentation fault /usr/sbin/nvcamera-daemon

What the command show by below command? Check the devname is the same with below command shows.

v4l2-ctl --list-devices

Thanks Shane. It is the device name, my dts has imx185 30-001a and v4l2-ctl list it as imx185 6-001a. Now move on to next issues