I have forced only one mode for the sensor and a fixed data rate of 594 Mbps per lane in a 4 lanes configuration
So the pix clk will be:
pix_clk_hz = 594 Mbps * 4 lanes / 10 bits_per_pixel = 237600000
Line width is taken from the sensor datasheet HMAX register set to 1320, so x 4 is 5280.
mode0 { //
mclk_khz = "37125";
num_lanes = "4";
tegra_sinterface = "serial_a";
discontinuous_clk = "no";
cil_settletime = "0";
active_w = "3864";
active_h = "2192";
dynamic_pixel_bit_depth = "10";
csi_pixel_bit_depth = "10";
mode_type = "bayer";
pixel_phase = "gbrg";
readout_orientation = "0";
line_length = "5280";
inherent_gain = "1";
pix_clk_hz = "237600000";
min_gain_val = "1.0";
max_gain_val = "72.0";
min_hdr_ratio = "1";
max_hdr_ratio = "64";
min_framerate = "1.462526";
max_framerate = "25";
min_exp_time = "1";
max_exp_time = "65535";
embedded_metadata_height = "1";
};
The dmesg confirms register settings are correct but the capture is still timing out
[ 117.828084] imx415_s_ctrl
[ 117.828086] imx415_set_storage_time_register
[ 117.828246] imx415 0-001a: imx415_write_reg: i2c write OK, 3003 = 0
[ 117.828251] imx415 0-001a: imx415_set_operation_mode: operation mode XMASTER reg set to 0
[ 117.828396] imx415 0-001a: imx415_write_reg: i2c write OK, 30ce = 0
[ 117.828400] imx415 0-001a: imx415_set_sync_mode: operation mode EXTMODE set to 0
[ 117.828404] imx415 0-001a: imx415_configure_triggering_pins: Sensor is in Internal sync Master mode
[ 117.828548] imx415 0-001a: imx415_write_reg: i2c write OK, 30c1 = 0
[ 117.828552] imx415 0-001a: imx415_configure_triggering_pins: XVS_XHS driver register: 0
[ 117.828554] imx415_set_data_rate:
[ 117.828555] imx415_set_mclk:
[ 117.842780] imx415 0-001a: imx415_set_data_rate: Data rate: 6
[ 117.842784] imx415 0-001a: imx415_adjust_hmax_register:++
[ 117.842937] imx415 0-001a: imx415_write_reg: i2c write OK, 3001 = 1
[ 117.843177] imx415 0-001a: imx415_write_reg: i2c write OK, 3028 = 28
[ 117.843411] imx415 0-001a: imx415_write_reg: i2c write OK, 3029 = 5
[ 117.843562] imx415 0-001a: imx415_write_reg: i2c write OK, 3001 = 0
[ 117.843566] imx415 0-001a: imx415_adjust_hmax_register: HMAX: 1320
[ 117.843570] imx415 0-001a: imx415_is_pin_configuration_valid: XVS & XHS as output
[ 117.886143] imx415_s_ctrl
[ 117.886148] imx415_s_ctrl
[ 117.886150] imx415_set_integration_time
[ 117.886347] imx415 0-001a: imx415_read_reg: i2c read OK, 3024 value 202
[ 117.886527] imx415 0-001a: imx415_read_reg: i2c read OK, 3025 value 8
[ 117.886705] imx415 0-001a: imx415_read_reg: i2c read OK, 3026 value 0
[ 117.886854] imx415 0-001a: imx415_write_reg: i2c write OK, 3001 = 1
[ 117.887000] imx415 0-001a: imx415_write_reg: i2c write OK, 3050 = f0
[ 117.887145] imx415 0-001a: imx415_write_reg: i2c write OK, 3051 = 2
[ 117.887356] imx415 0-001a: imx415_write_reg: i2c write OK, 3052 = 0
[ 117.887521] imx415 0-001a: imx415_write_reg: i2c write OK, 3001 = 0
[ 117.887526] imx415_s_ctrl
[ 117.928152] imx415_s_ctrl
[ 117.928157] imx415_s_ctrl
[ 117.928159] imx415_set_integration_time
[ 117.928406] imx415 0-001a: imx415_read_reg: i2c read OK, 3024 value 202
[ 117.928636] imx415 0-001a: imx415_read_reg: i2c read OK, 3025 value 8
[ 117.928816] imx415 0-001a: imx415_read_reg: i2c read OK, 3026 value 0
[ 117.928963] imx415 0-001a: imx415_write_reg: i2c write OK, 3001 = 1
[ 117.929107] imx415 0-001a: imx415_write_reg: i2c write OK, 3050 = ef
[ 117.929251] imx415 0-001a: imx415_write_reg: i2c write OK, 3051 = 2
[ 117.929394] imx415 0-001a: imx415_write_reg: i2c write OK, 3052 = 0
[ 117.929537] imx415 0-001a: imx415_write_reg: i2c write OK, 3001 = 0
[ 117.929540] imx415_s_ctrl
[ 119.393050] fence timeout on [ffffffc0b2d676c0] after 1500ms
[ 119.393057] name=[nvhost_sync:20], current value=0 waiting value=1
[ 119.393062] ---- mlocks ----
[ 119.393065] fence timeout on [ffffffc0b2d67540] after 1500ms
[ 119.393069] name=[nvhost_sync:21], current value=0 waiting value=1
[ 119.393073] ---- mlocks ----
[ 119.393077] ---- syncpts ----
[ 119.393084] id 1 (disp0_a) min 39 max 39 refs 1 (previous client : )
[ 119.393085] ---- syncpts ----
[ 119.393089] id 2 (disp0_b) min 3 max 3 refs 1 (previous client : )
[ 119.393092] id 3 (disp0_c) min 3 max 3 refs 1 (previous client : )
[ 119.393095] id 4 (disp0_d) min 3 max 3 refs 1 (previous client : )
[ 119.393102] id 9 (gm20b_507) min 434 max 434 refs 1 (previous client : )
[ 119.393106] id 11 (gm20b_506) min 22 max 22 refs 1 (previous client : )
[ 119.393110] id 12 (gm20b_505) min 376 max 376 refs 1 (previous client : gm20b_505)
[ 119.393113] id 13 (gm20b_504) min 6 max 6 refs 1 (previous client : )
[ 119.393121] id 20 (54600000.isp_0) min 0 max 3 refs 4 (previous client : )
[ 119.393124] id 21 (54600000.isp_1) min 0 max 3 refs 4 (previous client : )
[ 119.393128] id 22 (54600000.isp_2) min 7 max 15 refs 10 (previous client : )
[ 119.393132] id 23 (54600000.isp_3) min 0 max 3 refs 4 (previous client : )
[ 119.393137] id 26 (vblank0) min 6813 max -6 refs 1 (previous client : )
[ 119.393142] id 30 (gm20b_503) min 686 max 686 refs 1 (previous client : )
[ 119.393146] id 31 (gm20b_502) min 2 max 2 refs 1 (previous client : )
[ 119.393150] id 32 (gm20b_501) min 2 max 2 refs 1 (previous client : )
[ 119.393153] id 33 (gm20b_500) min 2 max 2 refs 1 (previous client : )
[ 119.393157] id 34 (gm20b_499) min 4 max 4 refs 1 (previous client : )
[ 119.393160] id 35 (54080000.vi_0) min 0 max 3 refs 4 (previous client : 54080000.vi_0)
[ 119.393165] id 37 (54080000.vi_2) min 2 max 7 refs 7 (previous client : 54080000.vi_2)
[ 119.393170] id 40 (54080000.vi_4) min 0 max 3 refs 4 (previous client : 54080000.vi_4)
[ 119.393175] id 43 (gm20b_498) min 6 max 6 refs 1 (previous client : )
[ 119.393178] id 44 (gm20b_497) min 8 max 8 refs 1 (previous client : )
[ 119.393182] id 45 (gm20b_496) min 6 max 6 refs 1 (previous client : )
[ 119.393185] id 46 (gm20b_495) min 6 max 6 refs 1 (previous client : )
[ 119.393189] id 47 (gm20b_494) min 6 max 6 refs 1 (previous client : )
[ 119.393192] id 48 (gm20b_493) min 6 max 6 refs 1 (previous client : )
[ 119.393278] ---- channels ----
[ 119.393280] id 1 (disp0_a) min 39 max 39 refs 1 (previous client : )
[ 119.393283] id 2 (disp0_b) min 3 max 3 refs 1 (previous client : )
[ 119.393286]
channel 0 - 54600000.isp
[ 119.393287] id 3 (disp0_c) min 3 max 3 refs 1 (previous client : )
[ 119.393289] id 4 (disp0_d) min 3 max 3 refs 1 (previous client : )
[ 119.393293] 0-54600000.isp (18):
[ 119.393296] id 9 (gm20b_507) min 434 max 434 refs 1 (previous client : )
[ 119.393296] active class 01, offset 0050, val 00000014
[ 119.393298] DMAPUT 00000198, DMAGET 00000110, DMACTL 00000000
[ 119.393300] id 11 (gm20b_506) min 22 max 22 refs 1 (previous client : )
[ 119.393301] CBREAD 00000014, CBSTAT 00010050
[ 119.393304] id 12 (gm20b_505) min 376 max 376 refs 1 (previous client : gm20b_505)
[ 119.393305]
ffffffc0eb82a400: JOB, syncpt_id=20, syncpt_val=1, first_get=00000090, timeout=10000, num_slots=3, num_handles=1
[ 119.393308] id 13 (gm20b_504) min 6 max 6 refs 1 (previous client : )
[ 119.393312] GATHER at ffe30000+4490, 8 words
[ 119.393315] 20000001
[ 119.393315] id 20 (54600000.isp_0) min 0 max 3 refs 4 (previous client : )
[ 119.393318] 00000414
[ 119.393318] id 21 (54600000.isp_1) min 0 max 3 refs 4 (previous client : )
[ 119.393320] 20000001
[ 119.393321] id 22 (54600000.isp_2) min 7 max 15 refs 10 (previous client : )
[ 119.393323] 00000515
[ 119.393324] id 23 (54600000.isp_3) min 0 max 3 refs 4 (previous client : )
[ 119.393325] 20000001
[ 119.393328] 00000617
[ 119.393328] id 26 (vblank0) min 6813 max -6 refs 1 (previous client : )
[ 119.393330] 200c0001
[ 119.393332] 00000005
[ 119.393333] id 30 (gm20b_503) min 686 max 686 refs 1 (previous client : )
[ 119.393335] id 31 (gm20b_502) min 2 max 2 refs 1 (previous client : )
[ 119.393339] GATHER at ffe30000+44b0, 2 words
[ 119.393339] id 32 (gm20b_501) min 2 max 2 refs 1 (previous client : )
[ 119.393342] 20000001
[ 119.393342] id 33 (gm20b_500) min 2 max 2 refs 1 (previous client : )
[ 119.393345] 00000016
[ 119.393345] id 34 (gm20b_499) min 4 max 4 refs 1 (previous client : )
[ 119.393348] id 35 (54080000.vi_0) min 0 max 3 refs 4 (previous client : 54080000.vi_0)
[ 119.393352] id 37 (54080000.vi_2) min 2 max 7 refs 7 (previous client : 54080000.vi_2)
[ 119.393352]
channel 1 - 54680000.isp
[ 119.393357] id 40 (54080000.vi_4) min 0 max 3 refs 4 (previous client : 54080000.vi_4)
[ 119.393357] 1-54680000.isp (1):
[ 119.393359] inactive
[ 119.393362] id 43 (gm20b_498) min 6 max 6 refs 1 (previous client : )
[ 119.393362]
channel 2 - 54080000.vi
[ 119.393365] id 44 (gm20b_497) min 8 max 8 refs 1 (previous client : )
[ 119.393367] 2-54080000.vi (13):
[ 119.393369] id 45 (gm20b_496) min 6 max 6 refs 1 (previous client : )
[ 119.393370] active class 01, offset 0050, val 00000023
[ 119.393372] DMAPUT 00000100, DMAGET 00000100, DMACTL 00000000
[ 119.393373] id 46 (gm20b_495) min 6 max 6 refs 1 (previous client : )
[ 119.393375] CBREAD 00000023, CBSTAT 00010050
[ 119.393376] id 47 (gm20b_494) min 6 max 6 refs 1 (previous client : )
[ 119.393379] id 48 (gm20b_493) min 6 max 6 refs 1 (previous client : )
[ 119.393381]
ffffffc0ea8f3c00: JOB, syncpt_id=35, syncpt_val=1, first_get=00000018, timeout=10000, num_slots=7, num_handles=1
[ 119.393386] GATHER at ffe38000+0000, 39 words
[ 119.393388] 10620001
[ 119.393390] 0000001f
[ 119.393392] 10630002
[ 119.393394] 00000000
[ 119.393396] 00000000
[ 119.393398] 103a0001
[ 119.393400] 10100010
[ 119.393402] 103c0001
[ 119.393404] 10101010
[ 119.393406] 10420001
[ 119.393408] 00000001
[ 119.393410] 10430006
[ 119.393412] 00000000
[ 119.393414] 001c984c
[ 119.393416] 00000000
[ 119.393418] 00000000
[ 119.393420] 00000000
[ 119.393422] 00000000
Here also the output of nvgstcapture
bitrate = 4000000
Encoder Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
Opening in BLOCKING MODE
** Message: 10:35:34.319: <main:4599> iterating capture loop ....
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3864 x 2192 FR = 25.000000 fps Duration = 40000000 ; Analog Gain range min 1.000000, max 72.000000; Exposure Range min 1000, max 65535000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3864 H = 2192
seconds to Run = 0
Frame Rate = 25.000000
GST_ARGUS: PowerService: requested_clock_Hz=2016000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
I tried the same settings on Jetson TX2 and it works, but the output of nvgstcapture is different, saying:
GST_ARGUS: PowerService: requested_clock_Hz=4032000
This is double than the clock required by nvgstcapture on Jetson Nano, why ?