This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CMEM error on video encoding DM355

I have a DM355 DVEVM and booting it from flash with nfs. Here is the error I get when I try to encode video. How can I fix this sort of issues?

root@192.168.1.5:/opt/dvsdk/dm355# ./encode -v /opt/dosya/video2.mpeg4
Encode demo started.
CMEMK Error: Failed to find a pool which fits 829440
CMEM Error: getPool: Failed to get a pool fitting a size 829440
Encode Error: Failed to allocate contiguous memory block.
Capturing 720x576 video (cropped to 720x576)
Encode Error: Failed FBIO_WAITFORVSYNC (Connection timed out)

 

All my software is up to date and I recently restored the flash with dm355_flash_image_1_30_01_41.tar

I'm using ubuntu on intel

 

thank you

  • this appears to be an inconsistency between what cmem can provide and what demo needs.  the loadmodules.sh file specifies cmem range and size of memory pools.  Th u-boot bootargs should be defined accordingly not to overlap CMEM.  If you have doubts, can you please post loadmodule.sh and bootargs contents to this post?

  • Hi

    okay I'm posting them. But since than I made a change. I built a new kernel and started to boot it via tftp. First the problem seemed to be gone. But after couple of decodes (video files) it again gave same type of an error. And I should not; after a reboot, problem gets resolved, but again at the second command, gives same type of error. Here are two of the errors;

     

    root@192.168.1.4:/opt/dvsdk/dm355# ./encode -v /opt/dvsdk/dm355/data/videos/davi
    ncieffect_pal.mpeg4
    Encode demo started.
    Encode Error: VIDIOC_S_STD (auto) failed on /dev/vidCMEMK Error: Failed to find
    a pool which fits 1529856
    eo0 (Device or resource busy)
    CMEM Error: getPool: Failed to get a pool fitting a size 1529856
    Encode Error: Failed to open video encode algorithm: mpeg4enc (0x0)

     

    root@192.168.1.4:/opt/dvsdk/dm355# ./encode -v /opt/dvsdk/dm355/data/videos/vide
    o3.mpeg4                                                                       
    Encode demo started.
    Encode Error: VIDIOC_S_STD (auto) failed on /dev/video0 (Device or rCMEMK Error:
     Failed to find a pool which fits 1529856

    -----------------------------------------------

    loadmodule.sh

    #!/bin/sh

    # 12MB
    insmod cmemk.ko phys_start=0x87400000 phys_end=0x88000000 pools=1x2097152,2x1529856,7x829440,1x524288,1x108680,1x81920,2x8192,6x4096

    ./mapdmaq

    insmod dm350mmap.ko
    rm -f /dev/dm350mmap
    mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0

    --------

    bootargs

    bootdelay=3
    baudrate=115200
    bootcmd=dhcp;bootm
    serverip=192.168.1.2
    bootfile=/tftpboot/uImage
    bootargs=console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.16
    8.1.2:/home/lxuser2/workdir/filesys,nolock mem=116M video=davincifb:vid0=720x576
    x16,2500K:vid1=720x576x16,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_outpu
    t=COMPOSITE davinci_enc_mngr.ch0_mode=pal
    stdin=serial
    stdout=serial
    stderr=serial
    videostd=pal

     

    thank you

  • refik said:
    First the problem seemed to be gone. But after couple of decodes (video files) it again gave same type of an error. And I should not; after a reboot, problem gets resolved, but again at the second command, gives same type of error.

    Based on this description, it seems like the memory allocated by CMEM is not being freed after qutting the program the first time.  Are you using the demo from the DVSDK as-is or have you made some changes?

  • Hi,

    No I havent made and changes. And I should note, decoding demos from interface using ./dvevmdemo works fine over and over. Its just giving these errors after using ./decode -v ...  second or third time.

  • The DVSDK you are using is a little old.  I tested this out using DVSDK 2.0 and everything seems to run smoothly.  You may want to upgrade to DVSDK 2.0 which you can get from here.

  • Thanks for pointing me here. I'll test it. But I think there should be a heads up for users who are following the extranet. I thought those were the latest software.