@ShaneCCC
I ran gstreamer with debug logs enabled, but was not able to figure out what exactly is causing the issue. Can you please help us identify the issue in the device tree.
Device tree:
#include "dt-bindings/clock/tegra186-clock.h"
#define CAM0_RST TEGRA_MAIN_GPIO(R, 5)
#define CAM1_RST TEGRA_MAIN_GPIO(R, 1)
#define CAM0_PWDN TEGRA_MAIN_GPIO(R, 0)
#define CAM1_PWDN TEGRA_MAIN_GPIO(N, 2)
/*
I2C Busses:
i2c0 = "/i2c@3160000";
i2c1 = "/i2c@c240000";
i2c2 = "/i2c@3180000";
i2c3 = "/i2c@3190000";
i2c4 = "/i2c@31a0000";
i2c5 = "/i2c@31b0000";
i2c6 = "/i2c@31c0000";
i2c7 = "/i2c@c250000";
i2c8 = "/i2c@31e0000";
*/
/ {
gpio@2200000 {
camera-control-output-low {
gpio-hog;
output-high;
gpios = <CAM0_RST 0 CAM0_PWDN 0 CAM1_RST 0 CAM1_PWDN 0>;
label = "cam0-rst", "cam0-pwdn, cam1-rst, cam1-pwdn";
status = "okay";
};
};
i2c@c240000 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
mt9m021_b@10 {
compatible = "nvidia,mt9m021";
/* I2C device address */
reg = <0x10>;
/* Physical dimensions of sensor */
physical_w = "10";
physical_h = "10";
/* Sensor Model */
sensor_model ="mt9m021";
/* Defines number of frames to be dropped by driver internally after applying */
/* sensor crop settings. Some sensors send corrupt frames after applying */
/* crop co-ordinates */
post_crop_frame_drop = "0";
/* when set true analog gain value expressed in decibels." */
use_decibel_gain = "false";
/* if true, delay gain setting by one frame to be in sync with exposure */
delayed_gain = "false";
/* enable CID_SENSOR_MODE_ID for sensor modes selection */
use_sensor_mode_id = "true";
/* slave or master mode */
trigger_mode = "master";
/* Device */
devnode = "video1";
/* input clock for the device in MHz*/
clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH2>,
<&tegra_car TEGRA186_CLK_PLLP_OUT0>;
clock-names = "extperiph2", "pllp_grtba";
clock-frequency = <24000000>;
mclk = "extperiph2";
reset-gpios = <&tegra_main_gpio CAM1_RST GPIO_ACTIVE_HIGH>;
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
vana-supply = <&battery_reg>; // analog 2.8v
vif-supply = <&battery_reg>; // interface 1.8v
vdig-supply = <&battery_reg>; // digital 1.2v
avdd-reg = "vana";
iovdd-reg = "vana";
dvdd-reg = "vana";
has-eeprom = <0>;
mode0 {
mclk_khz = "24000";
num_lanes = "1";
tegra_sinterface = "serial_b";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0x6";
active_w = "1280";
active_h = "720";
dynamic_pixel_bit_depth = "12";
csi_pixel_bit_depth = "12";
mode_type="bayer";
pixel_phase="rggb";
pixel_t = "bayer_rggb12";
readout_orientation = "0";
line_length = "1650";
inherent_gain = "1";
mclk_multiplier = "3.094";
pix_clk_hz = "74250000";
min_gain_val = "1";
max_gain_val = "22.2";
min_hdr_ratio = "1";
max_hdr_ratio = "64";
min_framerate = "1.462526";
max_framerate = "60";
min_exp_time = "16.165";
max_exp_time = "165770";
embedded_metadata_height = "0";
};
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
port@0 {
reg = <0x0>;
status = "okay";
mt9m021_slave: endpoint {
status = "okay";
csi-port = <0x1>;
bus-width = <0x1>;
remote-endpoint = <&mt9m021_slave_nvcsi_port0>;
};
};
};
};
};
i2c@3180000 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
mt9m021_a@10 {
compatible = "nvidia,mt9m021";
/* I2C device address */
reg = <0x10>;
/* Physical dimensions of sensor */
physical_w = "10";
physical_h = "10";
/* Sensor Model */
// sensor_model ="mt9m021";
/* Defines number of frames to be dropped by driver internally after applying */
/* sensor crop settings. Some sensors send corrupt frames after applying */
/* crop co-ordinates */
// post_crop_frame_drop = "0";
/* when set true analog gain value expressed in decibels." */
// use_decibel_gain = "false";
/* if trae, delay gain setting by one frame to be in sync with exposure */
delayed_gain = "true";
/* enable CID_SENSOR_MODE_ID for sensor modes selection */
// use_sensor_mode_id = "true";
/* slave or master mode */
trigger_mode = "master";
/* Device */
devnode = "video0";
/* input clock for the device in MHz*/
clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>,
<&tegra_car TEGRA186_CLK_PLLP_OUT0>;
clock-names = "extperiph1", "pllp_grtba";
clock-frequency = <24000000>;
mclk = "extperiph1";
reset-gpios = <&tegra_main_gpio CAM0_RST GPIO_ACTIVE_HIGH>;
/* Define any required hw resources needed by driver */
/* ie. clocks, io pins, power sources */
vana-supply = <&battery_reg>; // analog 2.8v
vif-supply = <&battery_reg>; // interface 1.8v
vdig-supply = <&battery_reg>; // digital 1.2v
avdd-reg = "vana";
iovdd-reg = "vana";
dvdd-reg = "vana";
has-eeprom = <0>;
status = "okay";
mode0 {
mclk_khz = "24000";
num_lanes = "1";
tegra_sinterface = "serial_a";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0x6";
active_w = "1280";
active_h = "720";
pixel_t = "bayer_rggb12";
readout_orientation = "0";
line_length = "1650";
inherent_gain = "1";
mclk_multiplier = "3.094";
pix_clk_hz = "74250000";
min_gain_val = "1.0";
max_gain_val = "22.2";
min_hdr_ratio = "1";
max_hdr_ratio = "64";
min_framerate = "1.462526";
max_framerate = "60";
min_exp_time = "16.165";
max_exp_time = "165770";
embedded_metadata_height = "0";
};
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
status = "okay";
port@0 {
reg = <0x0>;
status = "okay";
mt9m021_master: endpoint {
status = "okay";
csi-port = <0x0>;
bus-width = <0x1>;
remote-endpoint = <&mt9m021_master_nvcsi_port0>;
};
};
};
};
};
host1x {
vi@15700000 {
num-channels = <0x2>;
status = "okay";
ports {
#address-cells = <0x1>;
#size-cells = <0x0>;
port@0 {
reg = <0x0>;
status = "okay";
mt9m021_master_vi: endpoint {
status = "okay";
csi-port = <0x0>;
bus-width = <0x1>;
remote-endpoint = <&mt9m021_master_nvcsi_port1>;
};
};
port@1 {
reg = <0x1>;
status = "okay";
mt9m021_slave_vi: endpoint {
status = "okay";
csi-port = <0x1>;
bus-width = <0x1>;
remote-endpoint = <&mt9m021_slave_nvcsi_port1>;
};
};
};
};
nvcsi@150c0000 {
status = "okay";
num-channels = <0x2>;
#address-cells = <0x1>;
#size-cells = <0x0>;
channel@0 {
status = "okay";
reg = <0x0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0x0>;
mt9m021_master_nvcsi_port0: endpoint@0 {
status = "okay";
csi-port = <0x0>;
bus-width = <0x1>;
remote-endpoint = <&mt9m021_master>;
};
};
port@1 {
status = "okay";
reg = <0x1>;
mt9m021_master_nvcsi_port1: endpoint@1 {
status = "okay";
remote-endpoint = <&mt9m021_master_vi>;
};
};
};
};
channel@1 {
status = "okay";
reg = <0x1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0x0>;
mt9m021_slave_nvcsi_port0: endpoint@2 {
status = "okay";
csi-port = <0x1>;
bus-width = <0x1>;
remote-endpoint = <&mt9m021_slave>;
};
};
port@1 {
status = "okay";
reg = <0x1>;
mt9m021_slave_nvcsi_port1: endpoint@3 {
status = "okay";
remote-endpoint = <&mt9m021_slave_vi>;
};
};
};
};
};
};
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
status = "okay";
num_csi_lanes = <4>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <160000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
module0 {
status = "okay";
badge = "mt9m021_master";
position = "front";
orientation = "1";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "mt9m021 2-0010";
proc-device-tree = "/proc/device-tree/i2c@3180000/mt9m021_a@10";
};
};
module1 {
status = "okay";
badge = "mt9m021_slave";
position = "rear";
orientation = "1";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "mt9m021 1-0010";
proc-device-tree = "/proc/device-tree/i2c@c240000/mt9m021_b@10";
};
};
};
};
};
Logs:
root@tegra-ubuntu:/home/nvidia# ps aux | grep nvcamera
root 823 0.0 0.1 35416 9432 ? Ss 11:46 0:00 /usr/sbin/nvcamera-daemon
root 3008 0.0 0.0 5548 540 pts/2 S+ 11:52 0:00 grep --color=auto nvcamera
root@tegra-ubuntu:/home/nvidia# kill 823
root@tegra-ubuntu:/home/nvidia# ps aux | grep nvcamera
root 3079 0.0 0.0 5548 548 pts/2 S+ 11:52 0:00 grep --color=auto nvcamera
root@tegra-ubuntu:/home/nvidia# export enableCamPclLogs=1
root@tegra-ubuntu:/home/nvidia# export enableCamScfLogs=1
root@tegra-ubuntu:/home/nvidia# /usr/sbin/nvcamera-daemon
Thread 1 getting next capture
Thread 1 is waiting
Thread 2 getting next capture
Thread 2 is waiting
Thread 3 getting next capture
Thread 3 is waiting
Thread 4 getting next capture
Thread 4 is waiting
Thread 5 getting next capture
Thread 5 is waiting
Thread 6 getting next capture
Thread 6 is waiting
Thread 7 getting next capture
Thread 7 is waiting
Thread 8 getting next capture
Thread 8 is waiting
Thread 9 getting next capture
Thread 9 is waiting
Thread 10 getting next capture
Thread 10 is waiting
Thread 11 getting next capture
Thread 11 is waiting
Thread 12 getting next capture
Thread 12 is waiting
Starting services...
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(0x7f9cb92570)
getInstance: s_instance(0x7f9cb92570)
subscribe: create SensorType(gyroscope) sensor(0x7f9cb946f0)
subscribe: create SensorType(accelerometer) sensor(0x7f9cb99b50)
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: mt9m021_slave
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: mt9m021 0-0010
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: mt9m021_master
NvPclHwPrintModuleDefinition -- Position: 1
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: mt9m021 2-0010
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: mt9m021_slave position0
NvPclModuleListInitialize: NvPclModule list[1]: mt9m021_master position1
NvPclModuleListInitialize: No plugable modules on platform
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
PCLHW_DTParser
setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 0 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9cbac840
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9cbac8d0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9cbac960
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9cbac9f0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9cbcc190
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f9cbcc220
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/mt9m021_slave.isp] 6/16CheckOverridesPermissions: cannot stat file [/data/nvcam/settings/mt9m021_slave.isp]
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_slave.isp] 7/16CheckOverridesPermissions: cannot stat file [/opt/nvidia/nvcam/settings/mt9m021_slave.isp]
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/mt9m021_slave.isp] 8/16CheckOverridesPermissions: cannot stat file [/var/nvidia/nvcam/settings/mt9m021_slave.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/mt9m021_slave.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/mt9m021_slave.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/mt9m021_slave.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: mt9m021 0-0010
(NvOdmDevice) Error ModuleNotPresent: V4L2Device not available (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function findDevice(), line 231)
(NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function initialize(), line 54)
(NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 97)
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 @ 0x7f9cbac9f0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9cbcc190
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9cbcc220
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9cbac840
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9cbac8d0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f9cbac960
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclStateControllerClose: Module mt9m021_slave 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 596)
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)
Segmentation fault (core dumped)