UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
323 Views
Registered: ‎10-27-2008

multi-scaler ip core - not able to start gstreamer pipeline

Hello,

I have added the multi-scaler IP core to the ZCU104 reVISION design (2018.3).

After linux boot, I have confirmed the following:

1) /dev/video* devices come up correctly

root@xilinx:~# ls /dev/video*
/dev/video0  /dev/video2  /dev/video4  /dev/video6
/dev/video1  /dev/video3  /dev/video5

root@xilinx:~# v4l2-ctl -D -d /dev/video5
Driver Info (not using libv4l2):
        Driver name   : xm2msc
        Card type     : xm2msc
        Bus info      : platform:xm2msc
        Driver version: 4.14.0
        Capabilities  : 0x80204000
                Video Memory-to-Memory Multiplanar
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x00204000
                Video Memory-to-Memory Multiplanar
                Extended Pix Format

root@xilinx:~# v4l2-ctl -D -d /dev/video6
Driver Info (not using libv4l2):
        Driver name   : xm2msc
        Card type     : xm2msc
        Bus info      : platform:xm2msc
        Driver version: 4.14.0
        Capabilities  : 0x80204000
                Video Memory-to-Memory Multiplanar
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x00204000
                Video Memory-to-Memory Multiplanar
                Extended Pix Format

2) gstreamer recognizes the two multi-scaler instances

root@xilinx:~# gst-inspect-1.0 -a | grep xm2msc
v4l2video6convert:                         String. Default: "xm2msc"
v4l2video5convert:                         String. Default: "xm2msc"

 

I also enabled verbose for debugging purposes

echo 1 > /sys/module/v4l2_mem2mem/parameters/debug
echo 8 > /sys/module/videobuf2_core/parameters/debug
echo 8 > /sys/module/videobuf2_v4l2/parameters/debug
echo 8 > /proc/sys/kernel/printk

 

When attempting to launch a gstreamer pipeline with the , the pipeline hangs ... 

root@xilinx:/media/card# gst-launch-1.0 videotestsrc num-buffers=10 ! video/x-raw, width=1280, height=720, format=RGB ! v4l2video5convert capture-io-mode=4 output-io-mode=4 ! video/x-raw, width=640, height=480, format=RGB ! filesink location=tmp0.rgb

[ 1509.030369] xilinx-multiscaler b0180000.v_multi: Channel 0 instance created
[ 1509.040392] xilinx-multiscaler b0180000.v_multi: Channel 0 instance released
[ 1509.047454] xilinx-multiscaler b0180000.v_multi: Channel 1 instance created
[ 1509.054901] xilinx-multiscaler b0180000.v_multi: Channel 1 instance released
Setting pipeline to PAUSED ...
[ 1509.067497] xilinx-multiscaler b0180000.v_multi: Channel 0 instance created
Pipeline is PREROLLING ...
[ 1509.079822] vb2-core: vb2_verify_memory_type: USERPTR for current setup unsupported
[ 1509.089039] vb2-core: vb2_verify_memory_type: USERPTR for current setup unsupported
[ 1509.097767] vb2-core: __setup_offsets: buffer 0, plane 0 offset 0x00000000
[ 1509.104880] vb2-core: __setup_offsets: buffer 1, plane 0 offset 0x000e1000
[ 1509.112184] vb2-core: __setup_offsets: buffer 2, plane 0 offset 0x001c2000
[ 1509.119527] vb2-core: __setup_offsets: buffer 3, plane 0 offset 0x002a3000
[ 1509.126405] vb2-core: __vb2_queue_alloc: allocated 4 buffers, 1 plane(s) each
[ 1509.133618] vb2-core: vb2_core_expbuf: buffer 0, plane 0 exported as 22 descriptor
[ 1509.141249] vb2-core: vb2_core_qbuf: qbuf of buffer 0 succeeded
[ 1509.147166] v4l2_m2m_try_schedule: Trying to schedule a job for m2m_ctx: ffffffc07d71c800
[ 1509.155342] v4l2_m2m_try_schedule: Streaming needs to be on for both queues
[ 1509.162332] vb2-core: vb2_core_expbuf: buffer 1, plane 0 exported as 24 descriptor
[ 1509.169913] vb2-core: vb2_core_qbuf: qbuf of buffer 1 succeeded
[ 1509.175842] v4l2_m2m_try_schedule: Trying to schedule a job for m2m_ctx: ffffffc07d71c800
[ 1509.184021] v4l2_m2m_try_schedule: Streaming needs to be on for both queues
[ 1509.191012] vb2-core: vb2_core_expbuf: buffer 2, plane 0 exported as 26 descriptor
[ 1509.198601] vb2-core: vb2_core_qbuf: qbuf of buffer 2 succeeded
[ 1509.204521] v4l2_m2m_try_schedule: Trying to schedule a job for m2m_ctx: ffffffc07d71c800
[ 1509.212701] v4l2_m2m_try_schedule: Streaming needs to be on for both queues
[ 1509.219685] vb2-core: vb2_core_expbuf: buffer 3, plane 0 exported as 28 descriptor
[ 1509.227290] vb2-core: vb2_core_qbuf: qbuf of buffer 3 succeeded
[ 1509.233209] v4l2_m2m_try_schedule: Trying to schedule a job for m2m_ctx: ffffffc07d71c800
[ 1509.241387] v4l2_m2m_try_schedule: Streaming needs to be on for both queues
[ 1509.248387] vb2-core: vb2_core_streamon: successful
[ 1509.253260] v4l2_m2m_try_schedule: Trying to schedule a job for m2m_ctx: ffffffc07d71c800
[ 1509.261438] v4l2_m2m_try_schedule: Streaming needs to be on for both queues
[ 1509.269290] vb2-core: __setup_offsets: buffer 0, plane 0 offset 0x00000000
[ 1509.276920] vb2-core: __setup_offsets: buffer 1, plane 0 offset 0x002a3000
[ 1509.283799] vb2-core: __vb2_queue_alloc: allocated 2 buffers, 1 plane(s) each
[ 1509.290978] vb2-core: vb2_core_expbuf: buffer 0, plane 0 exported as 30 descriptor
[ 1509.298622] vb2-core: vb2_core_expbuf: buffer 1, plane 0 exported as 32 descriptor
[ 1509.319597] vb2-core: vb2_core_qbuf: qbuf of buffer 0 succeeded
[ 1509.325519] v4l2_m2m_try_schedule: Trying to schedule a job for m2m_ctx: ffffffc07d71c800
[ 1509.333699] v4l2_m2m_try_schedule: Streaming needs to be on for both queues
[ 1509.340748] vb2-core: vb2_core_streamon: successful
[ 1509.345629] v4l2_m2m_try_schedule: Trying to schedule a job for m2m_ctx: ffffffc07d71c800

 

If I try to force the gstreamer pipeline to stop (CTRL-C), this also hangs ...

^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

 

Any idea what I could be doing wrong ?

How do I investigate / debug my issue further ?

 

- Mario -

 

Reference:

   https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/75399218/Multi-Scaler+Linux+Driver?view=blog

Tags (2)
0 Kudos
9 Replies
Moderator
Moderator
273 Views
Registered: ‎11-09-2015

Re: multi-scaler ip core - not able to start gstreamer pipeline

HI @marron 

I think you might need to look on your HW. It might be that one IP is stuck somehow. And if it cannot provide the data the pipeline may never complete.

Was the design working pior adding the multi-scaler?

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
256 Views
Registered: ‎10-27-2008

Re: multi-scaler ip core - not able to start gstreamer pipeline

Thank you for your response @florentw .

Yes, the design was working prior to adding the multi-scaler IP core.

My first test is not using any other core, other than the multi-scaler core.

Here is the launch script that I am using:

===================================================

echo 1 > /sys/module/v4l2_mem2mem/parameters/debug
echo 8 > /sys/module/videobuf2_core/parameters/debug
echo 8 > /sys/module/videobuf2_v4l2/parameters/debug
echo 8 > /proc/sys/kernel/printk

gst-launch-1.0 videotestsrc num-buffers=10 ! video/x-raw, width=1280, height=720, format=RGB ! v4l2video5convert capture-io-mode=4 output-io-mode=4 ! video/x-raw, width=640, height=480, format=RGB ! filesink location=tmp0.rgb

===================================================

Regards,

Mario.

 

0 Kudos
Moderator
Moderator
230 Views
Registered: ‎11-09-2015

Re: multi-scaler ip core - not able to start gstreamer pipeline

Hi @marron 

Can you share how you connected the multiscaler IP? It expects to be connected to the GPIO for reseting. Is it something that you did?

If not you might see an error in the boot log.


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Moderator
Moderator
209 Views
Registered: ‎11-09-2015

Re: multi-scaler ip core - not able to start gstreamer pipeline

Hi @marron 

Do you have any update on this topic?

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply)

If this is not solved/answered, please reply in the topic giving more information on your current status.

Thanks and Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
165 Views
Registered: ‎10-27-2008

Re: multi-scaler ip core - not able to start gstreamer pipeline

@florentw ,

Sorry for the long delay in my response (was on vacation) ... 

Yes, I do have a PS GPIO connected to the multi-scaler IP core.  It is connected to the PS EMIO GPIO (at offset [1]).

It is also defined in the device tree description.  It is defined as gpio 79, which I believe to be correct.

   reset-gpios = <&gpio 79 1>;

Regards,

Mario.

0 Kudos
Moderator
Moderator
142 Views
Registered: ‎11-09-2015

Re: multi-scaler ip core - not able to start gstreamer pipeline

HI @marron 

Did you try the different debugging commands as mentioned in the wiki page?

echo 1 > /sys/module/v4l2_mem2mem/parameters/debug
echo 8 > /sys/module/videobuf2_core/parameters/debug
echo 8 > /sys/module/videobuf2_v4l2/parameters/debug
echo 8 > /proc/sys/kernel/printk

Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
123 Views
Registered: ‎10-27-2008

Re: multi-scaler ip core - not able to start gstreamer pipeline

Florent,

As previously described, I am launching my test with the following script:

===================================================

echo 1 > /sys/module/v4l2_mem2mem/parameters/debug
echo 8 > /sys/module/videobuf2_core/parameters/debug
echo 8 > /sys/module/videobuf2_v4l2/parameters/debug
echo 8 > /proc/sys/kernel/printk

gst-launch-1.0 videotestsrc num-buffers=10 ! video/x-raw, width=1280, height=720, format=RGB ! v4l2video5convert capture-io-mode=4 output-io-mode=4 ! video/x-raw, width=640, height=480, format=RGB ! filesink location=tmp0.rgb

===================================================

Regards,

Mario.

0 Kudos
Moderator
Moderator
76 Views
Registered: ‎11-09-2015

Re: multi-scaler ip core - not able to start gstreamer pipeline

Hi @marron 

Is it possible for you to share your design this way I could debug on my side?

Thanks and Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Moderator
Moderator
41 Views
Registered: ‎11-21-2018

Re: multi-scaler ip core - not able to start gstreamer pipeline

Hi @marron 

If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply)

 

If this is not solved/answered, please reply in the topic giving more information on your current status.

 

Thanks and Regards,

 

 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos