Forums

CMEMK Error: Failed to find a pool which fits

  • Hi in on the wiki with the example pipelines they talk about the following error:

    www.ridgerun.com/.../LeopardBoard_365_GStreamer_Pipelines

    CMEMK Error: Failed to find a pool which fits <poolsize>


    and then the proposed way to fix it:

    rmmod cmemk
     modprobe cmemk phys_start=<startaddr> phys_end=<endaddr> pools=<somepools>, <mynewpools>
    where <mynewpools> must be in format: <numberofpools>x<poolsize> (e.g 2x128). You may also need to resize/delete <somepools> .

    What is <somepools> then?
    If someone can explain this it would be greatly appreciated.

  • Hi,

    You will find that line on the loadmodules.sh script located on $DEVDIR/proprietary/ dvsdk* directory.

    Pablo Barrantes
    Embedded Software Engineer
    RidgeRun

  • Hi,

    I think <somepools>  there means the old pools that are already present with your old modprobe command,
    and <mynewpools> are  those you are adding.

    OLD:   insmod cmemk.ko phys_start=0x83C00000 phys_end=0x88000000 pools=2x512,2x256            (<somepools> = 2x512,2x256 )
    NEW:  insmod cmemk.ko phys_start=0x83C00000 phys_end=0x88000000 pools=2x512,2x256,2x128 (<somepools> = 2x512,2x256 , <mynewpools>=2x128)

    Regards.

  • Hi  Justin and a very special hello to Pablo and Marko :)

    Did you solve the problem with CMEMK?

    I get the same error as soon as I want to decode H264. I have no problem with encoding H264 and decoding MPEG4.

    I encode with this gstreamer pipeline without any error:

    gst-launch -e v4l2src always-copy=FALSE num-buffers=500 input-src=composite ! 'video/x-raw-yuv,format=(fourcc)NV12,width=720,height=480,pitch=736' ! dmaiaccel ! queue ! dmaienc_h264 copyOutput=false ! dmaiperf ! qtmux ! filesink location=/sd/file01.mov

    it works well.
    Then I try to decode the same file with:
    gst-launch filesrc location= /sd/file01.mov ! qtdemux  name=demux ! queue ! dmaidec_h264 numOutputBufs=14 ! TIDmaiVideoSink videoOutput=composite
    then i get this error:
    CMEMK Error: Failed to find a pool which fits 622080
    CMEM Error: getPool: Failed to get a pool fitting a size 622080
    Failed to allocate memory.

    I also tried editing loadmodules.sh script on $DEVDIR/proprietary/ dvsdk* as Pablo suggested, but it doesn't exist. 
    I know that there is no correct setting,
    but how can I know the pool size or memory settings when the Pool error is like the error above (Failed to find a pool which fits 622080)

    Can someone please mention the correct settings for CMEM which can work with the gstreamer pipelines from the wiki@ https://www.ridgerun.com/developer/wiki/index.php/LeopardBoard_365_GStreamer_Pipelines_-_SDK_2011Q2
    FYI: I am using RRSDK 2011Q2.
    Thanks in advance for the support.
    MoZa

  • Hi,

    At 2011Q2 configuration I changed two sections in order to run a video recorded with the pipe that you used to create file01.mov

    At make config menu:

    Architecture configurations -> Maximum Video Input Buffer Size (720P) #Select 720P

    Then at Proprietary software

    (0x3B00000) Amount of reserved memory from the kernel #Originally at: 0x1D00000 set to 0x3B00000

    (0x3200000) Amount of reserved memory for cmemk #Originally at: 0xF00000 set to 0x3200000

    Make and install

    I used this pipe to reproduce the video:

    gst-launch filesrc location=test.mov ! qtdemux name=demux ! queue ! dmaidec_h264 numOutputBufs=50 ! video/x-raw-yuv,format=\(fourcc\)NV12,width=720,height=480 ! queue ! dmaiperf ! TIDmaiVideoSink videoStd=D1_NTSC sync=false enable-last-buffer=false accelFrameCopy=true

    Hope this helps

    Carlos Aguero
    Embedded Software Engineer
    RidgeRun

  • Thanks a lot Carlos,

    Your answer was very useful. I had tried it before but I was not sure which values can be used.

    I tried your solution and did a Make and Install, but at boot time, cmem reports that:

    Loading cmem from 0x84e00000 to 0x86600000

    Which is only 0x1800000 or 24MB in size. 

     

    On the build machine, I checked the file "coprocessors" in "/home/moza/LeoSDK/fs/fs/etc/init.d" and it was correct.

    On the LeopardBoard I checked the file "coprocessors" in "/etc/init.d" but it reads:

    PHYS_END=`printf '0x%x' $(($PHYS_START + 0x1800000))`

    PHYS_END_INT=`printf '%d' $(($PHYS_START + 0x1800000))`

    It seems that it was not updated.

    I tried: "make clean" but again to no avail. 

    How can I force "coprocessors" to be rebuilt?

     

    Thanks,

    Moza

  • Thanks a lot Carlos,

    I tried cleaning up the installation and making again.
    Everything works fine now.
    But I had to increase the buffer (in the pipeline with numOutputBufs) to play H.264 files.
    These are the Pipelines I used for playing files, after increasing the memory for CMEM as you mentioned:
    gst-launch filesrc location= file.mov ! qtdemux name=demux ! queue ! dmaidec_h264 numOutputBufs=28 !dmaiperf ! TIDmaiVideoSink videoOutput=composite

    gst-launch filesrc location= file.mov ! qtdemux name=demux ! queue ! dmaidec_h264 numOutputBufs=28 ! priority nice=-10 !  queue ! priority nice=-10 ! dmaiperf ! TIDmaiVideoSink accelFrameCopy=true videoOutput=composite
    Many thanks for the info.
    And please Update the installation instructions and the Wiki for this playback issue. 
    Because I think every fresh installation of RRSDK2011Q2 has this problem and needs to be modified to be able to play the sample Pipelines provided in the installation guide.
    Regards,
    Morteza