how to get 1080P RAW10 image

Our sensor output 1920*1080 Raw10 image, line length is 2400.

I config the driver in dtsi like this:
mode0 {
mclk_khz = “25000”;
num_lanes = “4”;
tegra_sinterface = “serial_g”;
vc_id = “1”;
phy_mode = “DPHY”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;
mode_type = “bayer”;
csi_pixel_bit_depth = “10”;
pixel_phase = “rggb”;

				active_w = "1920";
				active_h = "1080";
				readout_orientation = "0";
				line_length = "3000";
				inherent_gain = "1";
				mclk_multiplier = "12.8";
				pix_clk_hz = "320000000";

				min_gain_val = "1.0";
				max_gain_val = "177";
				gain_step_pitch = "0.1";
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "1.5";
				max_framerate = "60";
				min_exp_time = "16.165";
				max_exp_time = "165770";
				exp_time_1h = "8";
				embedded_metadata_height = "0";
			};
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					liub960_ub960_out7: endpoint {
						vc-id = <1>;
						port-index = <6>;
						bus-width = <4>;
						remote-endpoint = <&liub960_csi_in7>;
					};
				};
			};

I use this cmd to get image by v4l2:
v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100 -d /dev/video0

But I cannot get image, and I find there are errors in rcpu log. There is a CHANSEL_NOMATCH(0x569) and a CHANSEL_FAULT(0x100). The CHANSEL_FAULT(0x100) means “PIXEL_LONG_LINE”. What shall I do to fix this error?
When the sensor output 1280768 raw10 image, and I change the resolution to 1280768 and line length to 1600, it’s OK.

 kworker/1:3-2094  [001] ....   321.752060: rtcpu_vinotify_event: tstamp:10241715458 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:9890363648 data:0x10000000
 kworker/1:3-2094  [001] ....   321.752061: rtcpu_vinotify_event: tstamp:10241715589 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:9890367488 data:0x31000001
 kworker/1:3-2094  [001] ....   321.752062: rtcpu_vinotify_event: tstamp:10241715751 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9890368480 data:0x07020001
 kworker/1:3-2094  [001] ....   321.752063: rtcpu_vinotify_event: tstamp:10241715876 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:9890404960 data:0x10000000
 kworker/1:3-2094  [001] ....   321.752083: rtcpu_vinotify_event: tstamp:10241716017 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:9890408864 data:0x31000002
 kworker/1:3-2094  [001] ....   321.752084: rtcpu_vinotify_event: tstamp:10241716143 tag:FS channel:0x01 frame:0 vi_tstamp:10241641252 data:0x00000010
 kworker/1:3-2094  [001] ....   321.752085: rtcpu_vinotify_event: tstamp:10241716284 tag:FS channel:0x00 frame:0 vi_tstamp:10241641306 data:0x00000010
 kworker/1:3-2094  [001] ....   321.752086: rtcpu_vinotify_event: tstamp:10241716411 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:10241641309 data:0x00000000
 kworker/1:3-2094  [001] ....   321.752086: rtcpu_vinotify_event: tstamp:10241716553 tag:CHANSEL_NOMATCH channel:0x41 frame:0 vi_tstamp:10241641461 data:0x00000569
 kworker/1:3-2094  [001] ....   321.752087: rtcpu_vinotify_event: tstamp:10241716677 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:10241641672 data:0x00000001
 kworker/1:3-2094  [001] ....   321.752088: rtcpu_vinotify_event: tstamp:10241716839 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9904966304 data:0x08020001
 kworker/1:3-2094  [001] ....   321.752089: rtcpu_vinotify_event: tstamp:10241716961 tag:CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:10241641796 data:0x00000100
 kworker/1:3-2094  [001] ....   321.752089: rtcpu_vinotify_event: tstamp:10241717162 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9904992736 data:0x01020001
 kworker/1:3-2094  [001] ....   321.752090: rtcpu_vinotify_event: tstamp:10242257460 tag:FE channel:0x01 frame:0 vi_tstamp:10242069359 data:0x00000020
 kworker/1:3-2094  [001] ....   321.808112: rtcpu_vinotify_error: tstamp:10243210785 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:10243203258 data:0x000000a0
 kworker/1:3-2094  [001] ....   321.808115: rtcpu_vinotify_error: tstamp:10243211602 tag:CHANSEL_NOMATCH channel:0x41 frame:0 vi_tstamp:10243203420 data:0x00000569
 kworker/1:3-2094  [001] ....   321.808116: rtcpu_vinotify_event: tstamp:10243212016 tag:FS channel:0x01 frame:0 vi_tstamp:10243203206 data:0x00000010
 kworker/1:3-2094  [001] ....   321.808117: rtcpu_vinotify_event: tstamp:10243212140 tag:CSIMUX_FRAME channel:0x00 frame:0 vi_tstamp:10243203258 data:0x000000a0
 kworker/1:3-2094  [001] ....   321.808119: rtos_queue_send_from_isr_failed: tstamp:10243220567 queue:0x0bcb41f8
 kworker/1:3-2094  [001] ....   321.808120: rtos_queue_send_from_isr_failed: tstamp:10243220720 queue:0x0bcb8a60
 kworker/1:3-2094  [001] ....   321.808121: rtos_queue_send_from_isr_failed: tstamp:10243220860 queue:0x0bcba5e0
 kworker/1:3-2094  [001] ....   321.808139: rtos_queue_send_from_isr_failed: tstamp:10243220994 queue:0x0bcbb3a0
 kworker/1:3-2094  [001] ....   321.808140: rtos_queue_send_from_isr_failed: tstamp:10243221126 queue:0x0bcbc160
 kworker/1:3-2094  [001] ....   321.808141: rtcpu_vinotify_event: tstamp:10243695466 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:10243203259 data:0x01000000
 kworker/1:3-2094  [001] ....   321.808142: rtcpu_vinotify_event: tstamp:10243695596 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9954953664 data:0x01020001
 kworker/1:3-2094  [001] ....   321.808143: rtcpu_vinotify_event: tstamp:10243695759 tag:FS channel:0x00 frame:0 vi_tstamp:10243203259 data:0x00000010
 kworker/1:3-2094  [001] ....   321.808143: rtcpu_vinotify_event: tstamp:10243695908 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:10243203262 data:0x00000000
 kworker/1:3-2094  [001] ....   321.808144: rtcpu_vinotify_event: tstamp:10243696069 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9954970592 data:0x07020002
 kworker/1:3-2094  [001] ....   321.808145: rtcpu_vinotify_event: tstamp:10243696197 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:10243203262 data:0x00000000
 kworker/1:3-2094  [001] ....   321.808146: rtcpu_vinotify_event: tstamp:10243696356 tag:CHANSEL_NOMATCH channel:0x41 frame:0 vi_tstamp:10243203420 data:0x00000569
 kworker/1:3-2094  [001] ....   321.808147: rtcpu_vinotify_event: tstamp:10243696480 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:10243203631 data:0x00000001

Hi lisubin

I believe it could be your sensor output embedded metadata is incorrect in your device tree entry(embedded_metadata_height != number of metadata line). Kindly check for this parameter in your sensor datasheet

To resolve this issue please try to define correct embedded metadata height in your device tree and try for streaming.

@lisubin
Make sure the embedded data line, if still saw below message you can have driver to report small resolution to try.

kworker/1:3-2094 [001] … 321.808141: rtcpu_vinotify_event: tstamp:10243695466 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:10243203259 data:0x01000000

Hi velmurugan.s and ShaneCCC,

I have already make sure that the metadata line is closed in sensor configuration, so I set embedded_metadata_height = 0 in dtsi. So I think the problem is not about the embedded_metadata_height.

I have already tried small resolution and change the dtsi like this:
active_w = “1280”;
active_h = “768”;
line_length = “1600”;
And I don’t change any other things, it’s OK. So I think the problem is about the resolution or line length.

Do you have any ideas?

Did you just change the resolution in DT but not modify the sensor configure to have v4l2-ctl capture 1280x768 done well?
That means your sensor not output 1080p.

I have already changed the sensor output according to the settings in dtsi, so it’s not the problem you said.

I think the key of the problem is the errors in rcpu logs.
CHANSEL_NOMATCH(0x569) is 0x2b type data not match?
CHANSEL_FAULT(0x100) is long line?

Why do these problems occur?

long line means sensor output pixel more than expect. You can try to reduce the width to check if any change.
0x2b is RAW 10 looks like data type is correct.