Test Environment:
Xavier-NX , Jetpack 4.6
mipi sensor: AR0135 + TC358748XBG
Capture raw10 image (640x480) from v4l2 and convert it to raw8:
640x480 has black line:
raw8_640_480.bmp (301.1 KB)
convert the same data to 1280x240:
raw8_640_480_to_1280_240.bmp (301.1 KB)
And the full size (1280x960) image is correct.
We already verify the mipi signal output:
V:
right part is parallel input, left part is mipi signal
H:
right part is parallel input, left part is mipi signal
Device tree:
mode2 { // AR0135_MODE_640X480_105FPS
mclk_khz = "27000"; // ar0135 and tc358748 use same clock freq
num_lanes = "2";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "640";
active_h = "480";
pixel_t = "bayer_rggb";
readout_orientation = "0";
line_length = "1388";
inherent_gain = "1";
mclk_multiplier = "3.2"; // (tc358748_mipi) 86400000 / 27000000
pix_clk_hz = "86400000"; // (tc358748_mipi) 432 (Mbps/lane) * 2 (lanes) / 10 (bits/pix)
gain_factor = "100000"; // 1x (w/o column gain)
framerate_factor = "1000000"; // don't care
exposure_factor = "1000000"; // don't change
min_gain_val = "100000"; // 1x (w/o column gain)
max_gain_val = "797000"; // 7.97x (w/o column gain)
step_gain_val = "3125"; // 0.03125x (w/o column gain)
default_gain = "100000"; // 1x (w/o column gain)
min_hdr_ratio = "1"; // don't care
max_hdr_ratio = "1"; // don't care
min_framerate = "2000000"; // 2 fps @ 500 ms exp time
max_framerate = "105000000"; // 105 fps
step_framerate = "1"; // don't care
default_framerate = "105000000"; // 105 fps
// ar0135_pix_clk_hz here is 74300000 Hz
min_exp_time = "100"; // (us) 1388 px * 5 (line_length) / ar0135_pix_clk_hz * 1000000 -> 18.681us
max_exp_time = "499997"; // (us) 26765(maximum coarse integration time) * line_length / ar0135_pix_clk_hz * 1000000 -> 499997.5774us
step_exp_time = "1"; // (us) 1 / ar0135_pix_clk_hz -> 0.013us
default_exp_time = "1868"; // 1388 * 100 / ar0135_pix_clk_hz * 1000000 -> 1868.102us
embedded_metadata_height = "0";
};
Could anybody suggest how to fix it ?