rBeal
rBeal

Reputation: 167

media-ctl IPU binding : Unable to setup link

I am trying to run the lastest mainline kernel (5.1.1) on a imx6 var dart. The goal is to get video from parallel IPU (adv7180) and send it over network.

With the 5.0 release I used theses commands to bind the 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]"

But I had some problems with the capture resolution (the kernel was trying to use 720x240). This problem seems to be patched with the next kernel version 5.1.1.

But now when I am trying to bind ipu2_csi1 on ipu2_vdic media-ctl return this error :

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 : enter image description here The vdic is not binded and the pipeline not works.

I tried to use the pipeline without the vdic but gstreamer return this error :

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 ...

Any idea? I can not either bind ipu1_csi0 on ipu1_vdic.

Thanks


Edit :

It does not work on ventana (gateworks) board too.


Edit 2 : The problem is HERE :

In kernel source : 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;
        }

The kernel executes this goto.

Upvotes: 3

Views: 1266

Answers (1)

rBeal
rBeal

Reputation: 167

Solved with this patch: "Fix wrong CSI group ID"

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

Upvotes: 1

Related Questions