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: 
Highlighted
Visitor msadras
Visitor
989 Views
Registered: ‎09-09-2019

v4l2src0 Failed to allocate required memory when streaming two 4kp30 channels (multistream).

Jump to solution

Hi, 

Xilinx Zynq UltraScale+ MPSoC ZCU106, using VCU TRD 2019.1, failed to allocate required memory when streaming two 4kp30 channels (multistream).

When streamilg one source of 4kp30 and one 1080p - works appropriately.

DDR - 2GB.

Is there any way to figure out how mush each video channel takes?

Thanks,

Mor

log:

2019-09-15 - 16:44:45 - [4]:media_configure:311 - called
0:00:06.534992842 25535 0x7f68010d40 ERROR v4l2bufferpool gstv4l2bufferpool.c:677:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool:src> error with STREAMON 22 (Invalid argument)
0:00:06.535236625 25535 0x7f68010d40 ERROR bufferpool gstbufferpool.c:564:gst_buffer_pool_set_active:<v4l2src0:pool:src> start failed
0:00:06.535366708 25535 0x7f68010d40 WARN v4l2src gstv4l2src.c:697:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.
0:00:06.535480919 25535 0x7f68010d40 WARN v4l2src gstv4l2src.c:697:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed
0:00:06.535668637 25535 0x7f68010d40 WARN basesrc gstbasesrc.c:3275:gst_base_src_prepare_allocation:<v4l2src0> Subclass failed to decide allocation
0:00:06.535734164 25535 0x7f8000f630 WARN rtspmedia rtsp-media.c:2722:default_handle_message: 0x7f8003e2a0: got error Failed to allocate required memory. (../../../git/sys/v4l2/gstv4l2src.c(697): gst_v4l2src_decide_allocation (): /GstPipeline:media-pipeline/GstBin:bin0/GstV4l2Src:v4l2src0:
Buffer pool activation failed)
0:00:06.535872607 25535 0x7f8805a0f0 WARN rtspmedia rtsp-media.c:2991:wait_preroll: failed to preroll pipeline
0:00:06.535899300 25535 0x7f8805a0f0 WARN rtspmedia rtsp-media.c:3295:gst_rtsp_media_prepare: failed to preroll pipeline
0:00:06.536058335 25535 0x7f68010d40 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:06.536173766 25535 0x7f68010d40 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
0:00:06.536626280 25535 0x7f8000f630 WARN rtspmedia rtsp-media.c:2722:default_handle_message: 0x7f8003e2a0: got error Internal data stream error. (../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:media-pipeline/GstBin:bin0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4))
0:00:06.538612603 25535 0x7f8805a0f0 ERROR rtspclient rtsp-client.c:1044:find_media: client 0x7f78859960: can't prepare media
0:00:06.538743916 25535 0x7f8805a0f0 ERROR rtspclient rtsp-client.c:2899:handle_describe_request: client 0x7f78859960: no media
2019-09-15 - 16:44:45 - [4]:client_close_handler:211 - called
2019-09-15 - 16:44:45 - [4]:client_close_handler:216 - [0] Client is closing down 192.168.67.1
2019-09-15 - 16:44:45 - [4]:new_client_handler:243 - called
2019-09-15 - 16:44:45 - [4]:new_client_handler:250 - [1] A new client has connected 192.168.67.1
2019-09-15 - 16:44:45 - [2]:new_client_handler:285 - Creating 'closed' signal handler
2019-09-15 - 16:44:45 - [4]:client_close_handler:211 - called
2019-09-15 - 16:44:45 - [4]:client_close_handler:216 - [0] Client is closing down 192.168.67.1

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
785 Views
Registered: ‎11-09-2015

Re: v4l2src0 Failed to allocate required memory when streaming two 4kp30 channels (multistream).

Jump to solution

HI @msadras 

Using 2*4K@30 streams require more encoder buffer than a single 4k@60 stream. You need to make sure the VCU is configured for 2*4K@30 streams in the VCU IP configuration.

Regards


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

View solution in original post

0 Kudos
5 Replies
Moderator
Moderator
954 Views
Registered: ‎11-09-2015

Re: v4l2src0 Failed to allocate required memory when streaming two 4kp30 channels (multistream).

Jump to solution

HI @msadras 

What is your input and what is your output? If you are trying to encode to a file, are you sure you have enough memory on the media?

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Mentor watari
Mentor
936 Views
Registered: ‎06-16-2013

Re: v4l2src0 Failed to allocate required memory when streaming two 4kp30 channels (multistream).

Jump to solution

Hi @msadras 

 

I encounter similar issue.

I guess you need the followings.

 

- Set suitable cma value on Linux kernl argument.

- Describe reserved memory area and size on VCU and memory section in device tree blob file.

 

I will try them to resolve my issue. But I have enough time to do it now...

 

Best regards,

 

Visitor msadras
Visitor
913 Views
Registered: ‎09-09-2019

Re: v4l2src0 Failed to allocate required memory when streaming two 4kp30 channels (multistream).

Jump to solution

- Set suitable cma value on Linux kernl argument.

cma value is 1700M now from 2G we have.

- Describe reserved memory area and size on VCU and memory section in device tree blob file.

do you mean

vcu-modules

al5e, al5d:

al,mcu_ext_mem_size: specifies the size of the external memory of the mcu. default is MCU_SUBALLOCATOR_SIZE

al5r:

al,devicename: specifies the /dev/X name the created device should have. default is that the /dev/X node isn't created

Now the default value of MCU_SUBALLOCATOR_SIZE is 32M. Are we supposed to consider a bigger value?

Need to be added to VCU_vcu_0: vcu@a0100000?

 

VCU_vcu_0: vcu@a0100000 {
  #address-cells = <2>;
  #clock-cells = <1>;
  #size-cells = <2>;
  clock-names = "pll_ref", "aclk", "vcu_core_enc", "vcu_core_dec", "vcu_mcu_enc", "vcu_mcu_dec";
  clocks = <&misc_clk_1>, <&zynqmp_clk 71>, <&VCU_vcu_0 1>, <&VCU_vcu_0 2>, <&VCU_vcu_0 3>, <&VCU_vcu_0 4>;
  compatible = "xlnx,vcu-1.2", "xlnx,vcu";
  interrupt-names = "vcu_host_interrupt";
  interrupt-parent = <&gic>;
  interrupts = <0 96 4>;
  ranges ;
  reg = <0x0 0xa0140000 0x0 0x1000>, <0x0 0xa0141000 0x0 0x1000>;
  reg-names = "vcu_slcr", "logicore";
  reset-gpios = <&gpio 119 0>;
  encoder: al5e@a0100000 {
   compatible = "al,al5e-1.2", "al,al5e";
   interrupt-parent = <&gic>;
   interrupts = <0 96 4>;
   reg = <0x0 0xa0100000 0x0 0x10000>;
  };
  decoder: al5d@a0120000 {
   compatible = "al,al5d-1.2", "al,al5d";
   interrupt-parent = <&gic>;
   interrupts = <0 96 4>;
   reg = <0x0 0xa0120000 0x0 0x10000>;
  };

 

 

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

Re: v4l2src0 Failed to allocate required memory when streaming two 4kp30 channels (multistream).

Jump to solution

HI @msadras 

Using 2*4K@30 streams require more encoder buffer than a single 4k@60 stream. You need to make sure the VCU is configured for 2*4K@30 streams in the VCU IP configuration.

Regards


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

View solution in original post

0 Kudos
Moderator
Moderator
745 Views
Registered: ‎11-21-2018

Re: v4l2src0 Failed to allocate required memory when streaming two 4kp30 channels (multistream).

Jump to solution

Hi @msadras 

If your question is answered or your issue is solved, please kindly mark the response which helped as a 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