Gstreamer issue in RZ/G2L

Dear Renesas Team,

We are using Renesas RZ/G2L smarc-evaluation board and the bsp/vlp version is 3.0.1, in which we have enabled all the dependency of g-streamer and trying to stream an IP-camera, while running the g-streamer command and accessing the ip-camera(rtsp stream) we are facing the below issue,

  root@smarc-rzg2l:~# gst-launch-1.0 -e rtspsrc protocols=tcp location="rtsp://admin:Smet1234@192.168.1.216:554/cam/realmonitor?channel=1&subtype=1" ! queue ! rtph264depay ! h264parse ! queue ! omxh264dec !

 vspmfilter outbuf-alloc=true ! video/x-raw,width=640,height=480 ! queue ! waylandsink qos=false &
[3] 322
root@smarc-rzg2l:~# MMNGR: open error.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:Smet1234@192.168.1.216:554/cam/realmonitor?channel=1&subtype=1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
MMI open: No such file or directory
ts:1600599387.867470    level:0x00001000        func:OmxrAllocateWorkBuffer_allocfunc(265)      tid:325 mes:error: mmngr fatal. -1
ts:1600599387.867537    level:0x00100000        func:OmxrMeVideoVcmnInterface_AllocateBufferSuper(66)   tid:325 mes:Physical memory allocation error
ts:1600599387.867564    level:0x00100000        func:OmxrMeVideoVcmnInterfaceVdcmn_AllocateBuffer(822)  tid:325 mes:RuntimeError
ts:1600599387.867588    level:0x00010000        func:RegisterNewBufferToPort(361)       tid:325 mes:
ts:1600599387.867620    level:0x00010000        func:OmxrMcErrorHandler_Notify(221)     tid:325 mes:u32ErrorCode = H'80001001
ts:1600599387.867794    level:0x00010000        func:OmxrMcApiProxy_AllocateBuffer(1049)        tid:328 mes:eError = H'80001001
ts:1600599387.867905    level:0x00010000        func:OmxrMcApiProxy_GetParameter(756)   tid:328 mes:eError = H'8000100a
ts:1600599387.867972    level:0x00010000        func:OmxrMcApiProxy_GetParameter(756)   tid:328 mes:eError = H'8000100a
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: GStreamer encountered a general supporting library error.
Additional debug info:
../git/omx/gstomxvideodec.c(3535): gst_omx_video_dec_handle_frame (): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
Failed to enable OMX decoder: Invalid state (0x8000100a)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
Help us to sort out the issue.
Thanks & Regards
Mahesh R
  • Hi Mahesh,

    MMNGR: open error.
    > ...
    > MMI open: No such file or directory

    This is the reason of you issue. This error means MMNGR was missing in your environment.
    If you build BSP/VLP 3.0.1 correctly *with codec feature package*, MMNGR will be available at boot. And you can see it when run:
             # dmesg | grep -i mmngr
             # lsmod | grep mmngr

    If you do not see MMNGR in above commands, you have build the system incorrectly.

  • Hi HungT,

    Please find the output of the above command.

    Thanks & Regards

    Mahesh R

  • Hi Mahesh,

    Your result means MMNGR already available. You can rerun GStreamer command.

    If you still have same error "MMNGR: open error.", check whether /dev/rgnmm exists or not.
    This is a device driver made by MMNGR. If MMNGR is available but this device driver does not exist, some errors must have occured in MMNGR (in that case, check all messages in dmesg for clue).

  • Hi HungT,

    Please find the info w.r.t kernel.

    [    4.188271] mali 11840000.gpu: GPU identified as 0x3 arch 7.0.9 r0p0 status 0

    [    4.200749] random: systemd: uninitialized urandom read (16 bytes read)
    [    4.205403] mali 11840000.gpu: No priority control manager is configured
    [    4.214229] systemd[1]: Started Start psplash boot splash screen.
    [  OK  ] Started Start psplash boot splash screen.
    [    4.229349] mali 11840000.gpu: No memory group manager is configured
    [    4.231744] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    4.244319] systemd[1]: Started RPC Bind.
    [    4.244887] random: systemd-journal: uninitialized urandom read (16 bytes read)
    [  OK  ] Started RPC Bind.
    [    4.267945] random: systemd-journal: uninitialized urandom read (16 bytes read)
    [    4.275559] mali 11840000.gpu: Probed as mali0
    [    4.278765] systemd[1]: Started Journal Service.
    [  OK      4.286503] rgnmm_drv mmngr: assigned reserved memory node linux,multimedia
    0m] Started Journal Service.
    [  OK  ] Mounted Huge Pages File System.
    [    4.335762] alloc_contig_range: [88000, 98000) PFNs busy
    [  OK  ] Mounted POS[    4.344071] cma: cma_alloc: alloc failed, req-size: 65536 pages, ret: -16
    IX Message Queue File Sy[    4.352814] ------------[ cut here ]------------
    stem.
    [    4.358728] WARNING: CPU: 1 PID: 145 at mm/page_alloc.c:4937 __alloc_pages_nodemask+0x214/0x250
    [    4.368309] Modules linked in: mmngr(O+) mali_kbase(O)
    [    4.373447] CPU: 1 PID: 145 Comm: systemd-modules Tainted: G           O      5.10.131-cip13-yocto-standard #1
    [    4.383402] Hardware name: Renesas SMARC EVK based on r9a07g044l2 (DT)
    [    4.389927] pstate: 20400005 (nzCv daif +PAN -UAO -TCO BTYPE=--)
    [    4.395915] pc : __alloc_pages_nodemask+0x214/0x250
    [    4.400771] lr : __dma_direct_alloc_pages+0x15c/0x1a8
    [    4.405795] sp : ffff8000116eb730
    [    4.409090] x29: ffff8000116eb730 x28: 0000000000000100
    [    4.414380] x27: 0000000000000002 x26: ffff00007fc11808
    [    4.419667] x25: ffff8000100fb56c x24: ffff0000096d7010
    [    4.424954] x23: 0000000000000000 x22: 0000000010000000
    [    4.430240] x21: 0000000000000cc1 x20: ffff800010cfc7f8
    [    4.435527] x19: ffff0000096d7010 x18: 0000000000000000
    [    4.440813] x17: 0000000000000000 x16: 0000000000000000
    [    4.446099] x15: 000081d243ad2cc4 x14: 0000000000000026
    [    4.451385] x13: 0000000000000026 x12: 0000000000000000
    [    4.456672] x11: 0000000000000001 x10: 0000000000000950
    [    4.461959] x9 : ffff8000116eb480 x8 : 0000000000000000
    [    4.467245] x7 : 0000000000000000 x6 : ffff00007fbf58f0
    [    4.472531] x5 : ffff00007fbf58f0 x4 : 000000000000003f
    [    4.477817] x3 : 0000000000000000 x2 : 0000000000000000
    [    4.483103] x1 : 0000000000000010 x0 : 0000000000000cc1
    [    4.488391] Call trace:
    [    4.490825]  __alloc_pages_nodemask+0x214/0x250
    [    4.495332]  __dma_direct_alloc_pages+0x15c/0x1a8
    [    4.500011]  dma_direct_alloc+0x74/0x340
    [    4.503912]  dma_alloc_attrs+0x84/0xe8
    [    4.507650]  mm_probe+0x228/0x508 [mmngr]
    [    4.511642]  platform_drv_probe+0x54/0xa8
    [    4.515630]  really_probe+0xec/0x3c8
    [    4.519186]  driver_probe_device+0x58/0xb8
    [    4.523259]  device_driver_attach+0x74/0x80
    [    4.527419]  __driver_attach+0x58/0xe0
    [    4.531150]  bus_for_each_dev+0x74/0xc8
    [    4.534966]  driver_attach+0x24/0x30
    [    4.538521]  bus_add_driver+0x18c/0x200
    [    4.542336]  driver_register+0x64/0x120
    [    4.546150]  __platform_driver_register+0x48/0x58
    [    4.550831]  mm_init+0x24/0x30 [mmngr]
    [    4.554562]  do_one_initcall+0x74/0x1d0
    [    4.558380]  do_init_module+0x44/0x200
    [    4.562108]  load_module+0x1ebc/0x2408
    [    4.565837]  __do_sys_finit_module+0xbc/0xf8
    [    4.570084]  __arm64_sys_finit_module+0x20/0x30
    [    4.574593]  el0_svc_common.constprop.4+0x8c/0x180
    [    4.579359]  do_el0_svc+0x24/0x90
    [    4.582659]  el0_svc+0x14/0x20
    [    4.585697]  el0_sync_handler+0x90/0xb8
    [    4.589511]  el0_sync+0x160/0x180
    [    4.592807] ---[ end trace f8c31834630e5e92 ]---
    [    4.597541] MMD mm_init ERROR
    [    4.600803] rgnmm_drv: probe of mmngr failed with error -1
    [  OK  ] Mounted Kernel Debug File System.
    [  OK  ] Mounted Temporary Directory (/tmp).
    [  OK  ] Started Create list of sta… nodes for the current kernel.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Remount Root and Kernel File Systems.
             Mounting Kernel Configuration File System...
    [  OK  ] Started Start psplash-syst…progress communication helper.
             Starting Flush Journal to Persistent Storage...
             Starting Apply Kernel Variable[    4.782981] systemd-journald[144]: Received client request to flush runtime journal.
    Thanks & Regards
    Mahesh R
  • > [  OK      4.286503] rgnmm_drv mmngr: assigned reserved memory node linux,multimedia
    > [  OK  ] Mounted Huge Pages File System.
    > [    4.335762] alloc_contig_range: [88000, 98000) PFNs busy
    > [  OK  ] Mounted POS[    4.344071] cma: cma_alloc: alloc failed, req-size: 65536 pages, ret: -16
    > [    4.597541] MMD mm_init ERROR
    > [    4.600803] rgnmm_drv: probe of mmngr failed with error -1

    I guess you had changed somethings in the devicetree, regarding CMA memory reserve?

  • Hi HungT,

    As per your instructions we have changed the cma allocation in .dts file for camera streaming, please find the below memory configuration file.

           reserved-memory {

                    #address-cells = <2>;
                    #size-cells = <2>;
                    ranges;
                    global_cma: linux,cma@58000000 {
                            compatible = "shared-dma-pool";
                            linux,cma-default;
                            reusable;
    //                      reg = <0x0 0x58000000 0x0 0x10000000>;
                            reg = <0x0 0x58000000 0x0 0x20000000>;
                    };
                    mmp_reserved: linux,multimedia {
                            compatible = "shared-dma-pool";
                            reusable;
    //                      reg = <0x00000000 0x68000000 0x0 0x8000000>;
                            reg = <0x00000000 0x78000000 0x0 0x10000000>;
                    };
            };
    Please let us know what changes do we have to do.
    Thanks & Reagards
    Mahesh R