media-ctl IPU 绑定:无法设置 link

media-ctl IPU binding : Unable to setup link

我正在尝试 运行 imx6 var dart 上的最新主线内核 (5.1.1)。 目标是从并行 IPU (adv7180) 获取视频并通过网络发送。

随着 5.0 版本的发布,我使用了这些命令来绑定 adv7180:

media-ctl --reset

media-ctl -l "'adv7180 0-0020':0 -> 'ipu2_csi1_mux':1[1]"
media-ctl -l "'ipu2_csi1_mux':2 -> 'ipu2_csi1':0[1]"
media-ctl -l "'ipu2_csi1':1 -> 'ipu2_vdic':0[0]"
media-ctl -l "'ipu2_vdic':2 -> 'ipu2_ic_prp':0[1]"
media-ctl -l "'ipu2_ic_prp':2 -> 'ipu2_ic_prpvf':0[1]"
media-ctl -l "'ipu2_ic_prpvf':1 -> 'ipu2_ic_prpvf capture':0[1]"

resolution="720x576"
media-ctl -V "'adv7180 0-0020':0 [fmt:UYVY2X8/$resolution]"
media-ctl -V "'ipu2_csi1_mux':2 [fmt:UYVY2X8/$resolution field:interlaced]"
media-ctl -V "'ipu2_csi1':1 [fmt:AYUV32/$resolution field:interlaced]"
media-ctl -V "'ipu2_vdic':2 [fmt:AYUV32/$resolution field:none]"
media-ctl -V "'ipu2_ic_prp':2 [fmt:AYUV32/$resolution field:none]"
media-ctl -V "'ipu2_ic_prpvf':1 [fmt:AYUV32/$resolution field:none]"

但是我在捕获分辨率方面遇到了一些问题(内核试图使用 720x240)。这个问题似乎会在下一个内核版本 5.1.1 中修复。

但是现在当我尝试在 ipu2_vdic media-ctl return 上绑定 ipu2_csi1 时出现此错误:

root:devboard $ media-ctl -v -l "'ipu2_csi1':1 -> 'ipu2_vdic':0[1]"
Opening media device /dev/media0
Enumerating entities
Found 23 entities
Enumerating pads and links
Setting up link 83:1 -> 5:0 [5]
Opening media device /dev/media0
media_setup_link: Unable to setup link (Invalid argument)

 'ipu2_csi1':1 -> 'ipu2_vdic':0[1]
                                 ^
Unable to parse link: Invalid argument (22)

graph.png : vdic 未绑定,管道不工作。

我尝试在没有 vdic 的情况下使用管道,但是 gstreamer return 这个错误:

gst-launch-1.0 -v v4l2src device=/dev/video3 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video3' does not support progressive interlacing
Additional debug info:
gstv4l2object.c(3813): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Device wants interleaved interlacing
Execution ended after 0:00:00.000897000
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

有什么想法吗? 我无法在 ipu1_vdic.

上绑定 ipu1_csi0

谢谢


编辑:

它也不适用于 ventana(网关)板。


编辑 2 : 问题在这里:

在内核源代码中:drivers/staging/media/imx/imx-media-vdic.c:748

/* direct pad must connect to a CSI */
        if (!(remote_sd->grp_id & IMX_MEDIA_GRP_ID_CSI) ||
            remote->index != CSI_SRC_PAD_DIRECT) {
            ret = -EINVAL;
            goto out;
        }

内核执行这个goto。

已通过此补丁解决:"Fix wrong CSI group ID"

https://github.com/torvalds/linux/commit/55dde50946988db8d05f84d2ec7750140542730f?diff=unified