We have an ADV7280A-M video decoder on a custom board connected via MIPI-CSI
to an Apalis iMX6 on Ixora carrier.
Current kernel is 6.1.80-rt26-6.6.0-devel+git.ca3cd16f344f
, using
Yocto build.
The ADV receives video in PAL format, and we receive the video via
ipu1_csi0
and route through ipu1_ic_prpvf
for upscaling to 1000x800.
When using the de-interlacer (I2P) on the ADV, this is actually working,
with the following resulting media-controller pad configuration:
'adv7180 1-0021':0 [fmt:UYVY8_2X8/720x576@1/25 field:none colorspace:smpte170m]
'imx6-mipi-csi2':0 [fmt:UYVY8_2X8/720x576 field:none]
'imx6-mipi-csi2':1 [fmt:UYVY8_2X8/720x576 field:none]
'ipu1_csi0_mux':0 [fmt:UYVY8_2X8/720x576 field:none]
'ipu1_csi0_mux':2 [fmt:UYVY8_2X8/720x576 field:none]
'ipu1_csi0':0 [fmt:UYVY8_2X8/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range
crop.bounds:(0,0)/720x576
crop:(0,0)/720x576
compose.bounds:(0,0)/720x576
compose:(0,0)/720x576]
'ipu1_csi0':1 [fmt:AYUV8_1X32/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prp':0 [fmt:AYUV8_1X32/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prp':2 [fmt:AYUV8_1X32/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prpvf':0 [fmt:AYUV8_1X32/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prpvf':1 [fmt:AYUV8_1X32/1000x800@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
Due to the poor quality of the I2P on the ADV, we need to use the the
motion-compensated de-interlacer in the IPU (ipu1_vdic
).
It is surprisingly difficult to find a working configuration, and so far
we have not been successful.
Current in-kernel documentation (Documentation/admin/media/imx.rst
)
contains an example using an adv7180, but uses field:seq-bt
on the
adv7180 pad, but since driver commit 6457b6263f0f, only field:alternate
is allowed.
The only media-controller pad configuration we have come up with that
uses field:alternate
and is not rejected before streaming is the following:
'adv7180 1-0021':0 [fmt:UYVY8_2X8/720x288@1/25 field:alternate colorspace:smpte170m]
'imx6-mipi-csi2':0 [fmt:UYVY8_2X8/720x288 field:alternate]
'imx6-mipi-csi2':1 [fmt:UYVY8_2X8/720x288 field:alternate]
'ipu1_csi0_mux':0 [fmt:UYVY8_2X8/720x288 field:alternate]
'ipu1_csi0_mux':2 [fmt:UYVY8_2X8/720x288 field:alternate]
'ipu1_csi0':0 [fmt:UYVY8_2X8/720x288@1/25 field:alternate colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range
crop.bounds:(0,0)/720x576
crop:(0,0)/720x576
compose.bounds:(0,0)/720x576
compose:(0,0)/720x576]
'ipu1_csi0':1 [fmt:AYUV8_1X32/720x576@1/25 field:seq-tb colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_vdic':0 [fmt:AYUV8_1X32/720x576@1/25 field:seq-tb colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_vdic':2 [fmt:AYUV8_1X32/720x576@1/50 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prp':0 [fmt:AYUV8_1X32/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prp':2 [fmt:AYUV8_1X32/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prpvf':0 [fmt:AYUV8_1X32/720x576@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
'ipu1_ic_prpvf':1 [fmt:AYUV8_1X32/1000x800@1/25 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
When trying to stream data, however, we get a
VIDIOC_DQBUF: failed: Input/output error
with the following logged
in dmesg
:
ipu1_ic_prpvf: EOF timeout
ipu1_ic_prpvf: wait last EOF timeout
The only differences between the (broken) ipu1_vdic
configuration and the
(working, but poor quality) I2P configuration further above are
- Use of
field:alternate
with720x288
where appropriate - Use of
ipu1_vdic
and hence a slightly longer route. - A strange interval of
1/50
on the output ofipu1_vdic
, which is
however enforced by the driver
What’s wrong here?