ADV7280-M capture problem

Hello all,
I use simplified version of imx219 drivers (with removed communication and other features, e.g. to capture pre-configured streams; I used it to capture from FPGAs) to capture video from ADV7280-M. I use default modes for autodetect and capture of PAL signals provided by the official 7280-M documentation. I request those modes through scripts, right before calling gst-launch command.

ADV7280-M seems to be OK, since I can capture it on an iMX6 SOM. The output captured by TX2 is shown below. First 8 pixels of every second line start on a previous line, I belive the next 8 pixels is missing, then there is this 16-pixel long artifact at the end of these lines.
I use R32.2.3.

Does anyone know how to get rid of those artifacts?

EDIT: resolution is 720x576, 8-bit YUV422 ofc.

Try set the preferred_stride like below.

v4l2-ctl --set-ctrl preferred_stride=256

Hello ShaneCCC,
sadly, I don’t have such control for this device. Here is the list of controls that I got.

Camera Controls

                     group_hold 0x009a2003 (bool)   : default=0 value=0 flags=execute-on-write
                    sensor_mode 0x009a2008 (int64)  : min=0 max=2 step=1 default=0 value=0 flags=slider
                    bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
                override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
                   height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                     size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
               write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
       sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
        sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
      sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 [30][34] flags=read-only, has-payload
              sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
               low_latency_mode 0x009a206d (bool)   : default=0 value=0
                   sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=2 flags=read-only
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'UYVY'
	Name        : UYVY 4:2:2

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'NV16'
	Name        : Y/CbCr 4:2:2

	Index       : 2
	Type        : Video Capture
	Pixel Format: 'UYVY'
	Name        : UYVY 4:2:2

Check below link to get the patch.

I tried the patch, the output image is still messed up.

In my notes I have a quotation saved from NVIDIA forums that may shed a little light on the issue, but I’m unable to utilize this knowledge.

due to VI requirements that must be atom (64-Byte) aligned; could you please hack such value in kernel driver for verification. thanks

Bytes per line reported by v4l2-ctl is 1440 (720x576 YUV 422 8 bit). 1440/64=22.5, which means the requirement is not met. This would also, in my opinion, explain the misalignment of the lines.
According to the official docu it is impossible to change bit depth or resolution on ADV7280 to make it fit the 64-byte atomization requirement.

Did you try any others value like 1, 64, 576

The image is the same, regardless of settings. I double checked whether the patch was applied correctly.

Could you try 720 and 1440 if still not working have modify the #define RM_SURFACE_ALIGNMENT 256 in the vi4_fops.c to try.

Hello ShaneCCC,
it turns out I was debugging those patch changes in a wrong manner (I used v4l2-ctl to capture a single frame and then conversion to a png image), today I tried to set stride to 1472 again, but this time used gst-launch - the green stripes are gone. (Now I have only an issue with halved fps, but this is story for another time).

Thanks a lot,