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.

DM368 IPNC cmem error while running av_server.out

 

 

Hi,

 

I am working on Appro DM368 reference board.On running ./av_server.out i am getting the following errors:

# ./av_server.out D1                                                           
                                                                               
AVSERVER UI: Initializing.                                                     
                                                                               
 CLK Hz,                                                                       
 ARM   Hz =  432000000                                                         
 DDR   Hz =  340000000                                                         
 VPSS  Hz =  340000000                                                         
 IMCOP Hz =  340000000                                                         
                                                                               
 DRV LDC: GetConfig 0003 0x0                                                   
 [OSA_FILE ] Reading file [/mnt/nand/IMG_Paramset.bin] ... ERROR               
IMAGE TUNE: Paramset File is not available..... Setting DEFAULT parameter      
CMEMK Error: Failed to find a pool which fits 28672                            
CMEMK Error: get_phys: Unable to find phys addr for 0x00000000                 
CMEM Error: getPCMEMK Error: get_phys: get_user_pages() failed: -14            
ool: Failed to gCMEMK Error: GETPHYS: Failed to convert virtual 0x0 to physical.
et a pool fittinCMEMK Error: get_phys: Unable to find phys addr for 0x00000000 
g a size 28672                                                                 
CMEMK Error: get_phys: get_user_pages() failed: -14                            
CMEM Error: getPCMEMK Error: FREE: Failed to convert virtual 0x0 to physical   
hys: Failed to get physical address of 0                                       
CMEM Error: free: failed to free 0                                             
 ERROR  (alg.c|ALG_sysInit|82): VICP Protocol regn failed                      
 ERROR  (avServerApi.c|AVSERVER_init|578): ALG_sysInit()                       
 ERROR  (avServerUi.c|UI_start|54): AVSERVER_init()

Please help me in debugging the cmem error.I tried allowOverlap=1 while doing insmod cmem.ko but same error.

Also if i use cmemk phys_start=0x83700000 phys_end=0x85900000 allowOverlap=1 useHeapIfPoolUnavailable=1

it says useHeapIfPoolUnavailable not defined.I also tried to print debug info using CE_DEBUG=2 info but that also doesn't help

in overcoming this issue.

Is there any other way of getting rid of this issue.

Also i am trying to learn linux,if someone could help me with the following:

1.On customised dm368  evm board what are the things needed to port ipnc application.

2.If we have to implement uboot,bootloader on customised evm board.

3.Also how can we test osa,cmem,codec engine library,video capture and port ipnc application on that.

4.If the dvsdk and lsp we are using with Appro reference design we can port on our own built dm368 evm board.

also following issues in linux:

1.In which files/directory we initialize bootlog.which files i have to change in order to modify boot log.
   how to make a process run as daemon process.
2.Also about linux boot sequence,help/tutorial on linux boot sequence.
3.Major steps in bringing up the new custom evm board.
4.Things to know in order to write the bootloader.

 

Thanks and Regards,

Mayank

 

 

 

  • Mayank,

    How are you insmod'ing cmem?  Do you know the version of cmem you are using?  One way to tell is by running

        dmesg -c

    after you insmod cmemk.ko.  You can also run

        cat /proc/cmem

    to see a list of the available pool buffers.  It looks like you don't have a pool buffer of sufficient size available.   The cmem module parameter, useHeapIfPoolUnavailable should work, unless you have an older version of cmem.  So we need to know your cmem version, and how you are insmod'ing it.

    Best regards,

        Janet

  • Mayank Agarwal said:
    CMEMK Error: Failed to find a pool which fits 28672

    To elimate this error, you can either increase your number of pool buffers >= 28672 in size, or use the "useHeapIfPoolUnavailable=1" option.  You say that the useHeapIfPoolUnavailable option is not recognized, which must mean that you're using an older Linux Utils release (which contains CMEM) that came out before the useHeapIfPoolUnavailable option was introduced.  Linux Utils 2.25.05.11 introduced this feature (it's in later releases too), and you can find LInux Utils downloads here: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/linuxutils/index.html

    As for your other questions, you should open a new forum thread, as the subject of this one might cauase it to miss the radar of Linux folks that could answer your questions.

    Regards,

    - Rob

  • Hi Robert,

     

    Thanks a lot.By following the link i got rid of cmem error and now AV_SERVER is running as given below:

     ./av_server.out D1

    AVSERVER UI: Initializing.
    CMEMK Error: ioctl: failed to allocate heap buffer of size 0x19ae84
     
     CLK Hz,
     ARM   Hz =  432000000
     DDR   Hz =  340000000
     VPSS  Hz =  340000000
     IMCOP Hz =  340000000
     
    CMEM Error: allocHeap: ioctl CMEM_IOCALLOCHEAP failed: -1
     DRV LDC: GetConfig 0003 0x0

    CONFIGURING AVSERVER FOR DM365 .....
    queue id:65538
    ############OPEN###########
    ==========>>>> Start X,Y = 52,18
     Sensor Mode Info,
     Width      = 1736
     Height     = 1124
     fps        =   30
     Bin Enable =    1
     
     Sensor Frame Timing Info,
     fps                  = 30
     t_frame (ns)         = 33333334.000000
     t_row   (ns)         = 27458.333984
     t_pclk  (ns)         = 10.416667
     W                    = 1736
     H                    = 1124
     SW                   = 1125
     SD                   = 0
     HB                   = 450
     VB                   = 89
     HBmin                = 450
     VBmin                = 9
     f_pclk               = 96000000
     shutterOverhead (ns) = 4437.500000
     col_size             = 1736
     row_size             = 1124
     col_bin              = 0
     row_bin              = 0
     col_start            = 232
     row_start            = 348
     pll_M                = 16
     pll_N                = 1
     pll_DIV              = 1
     
    ############reset###########
    ############SPI OPEN###########
     ERROR  (drv_imgs_IMX036_3MP.c|DRV_imgsOpen|646): DRV_spiOpen()
     ERROR  (drv_capture.c|DRV_captureOpen|63): Open failed
     ERROR  (videoCaptureThr.c|VIDEO_captureTskCreate|85): DRV_captureOpen()
     ERROR  (videoCaptureThr.c|VIDEO_captureTskMain|688): VIDEO_captureTskCreate() ERROR  (avServerMainThr.c|AVSERVER_tskStart|24):

    Unknown message. Quit
    Recieved Quit event
    Kill queue id:65538
    Kill queue id:98307
    Kill queue id:32769
    killall: wis-streamer: no process killed
    killall: wis-streamer: no process killed
    Error: Maping size is zero!!
    ApproDrvExit: 1
    Error: DestroySem: Invalid Semaphore handler
    Kill queue id:0
     
     Current Settings,
     Face Detect                     : OFF
     Lens Distortion Correction (LDC): OFF
     Video Stabilization             : OFF
     Spatial NF                      : OFF
     Temporal NF                     : OFF
     File Save                       : OFF
     AE/AWB                          : OFF
     Host-name / IP address          : 192.168.1.1

     ==============
     AV Server Main
     ==============
     
     1: Toggle ON/OFF: Face Detect
     2: Toggle ON/OFF: LDC
     3: Toggle ON/OFF: Video Stabilization
     4: Toggle ON/OFF: Spatial  NF
     5: Toggle ON/OFF: Temporal NF
     6: Toggle ON/OFF: Save to file
     7: Toggle ON/OFF: AE/AWB
     
     r: Save RAW data to file
     y: Save YUV data to file
     p: Print Profile Info
     c: DFC calibration
     i: auto iris calibration
     
     0: Stop and Exit
     
     Enter Choice : 1
     
     
     Current Settings,
     Face Detect                     : ON
     Lens Distortion Correction (LDC): OFF
     Video Stabilization             : OFF
     Spatial NF                      : OFF
     Temporal NF                     : OFF
     File Save                       : OFF
     AE/AWB                          : OFF
     Host-name / IP address          : 192.168.1.1

     ==============
     AV Server Main
     ==============
     
     1: Toggle ON/OFF: Face Detect
     2: Toggle ON/OFF: LDC
     3: Toggle ON/OFF: Video Stabilization
     4: Toggle ON/OFF: Spatial  NF
     5: Toggle ON/OFF: Temporal NF
     6: Toggle ON/OFF: Save to file
     7: Toggle ON/OFF: AE/AWB
     
     r: Save RAW data to file
     y: Save YUV data to file
     p: Print Profile Info
     c: DFC calibration
     i: auto iris calibration
     
     0: Stop and Exit
     
     Enter Choice : 
     Enter Choice : 2
     
     AVSERVER: LDC is NOT ENABLED while starting AV SERVER !!!
     
     Current Settings,
     Face Detect                     : ON
     Lens Distortion Correction (LDC): OFF
     Video Stabilization             : OFF
     Spatial NF                      : OFF
     Temporal NF                     : OFF
     File Save                       : OFF
     AE/AWB                          : OFF
     Host-name / IP address          : 192.168.1.1

     ==============
     AV Server Main
     ==============
     
     1: Toggle ON/OFF: Face Detect
     2: Toggle ON/OFF: LDC
     3: Toggle ON/OFF: Video Stabilization
     4: Toggle ON/OFF: Spatial  NF
     5: Toggle ON/OFF: Temporal NF
     6: Toggle ON/OFF: Save to file
     7: Toggle ON/OFF: AE/AWB
     
     r: Save RAW data to file
     y: Save YUV data to file
     p: Print Profile Info
     c: DFC calibration
     i: auto iris calibration
     
     0: Stop and Exit
     
     Enter Choice : 
     Enter Choice : 2
     
     AVSERVER: LDC is NOT ENABLED while starting AV SERVER !!!
     
     Current Settings,
     Face Detect                     : ON
     Lens Distortion Correction (LDC): OFF
     Video Stabilization             : OFF
     Spatial NF                      : OFF
     Temporal NF                     : OFF
     File Save                       : OFF
     AE/AWB                          : OFF
     Host-name / IP address          : 192.168.1.1

     ==============
     AV Server Main
     ==============
     
     1: Toggle ON/OFF: Face Detect
     2: Toggle ON/OFF: LDC
     3: Toggle ON/OFF: Video Stabilization
     4: Toggle ON/OFF: Spatial  NF
     5: Toggle ON/OFF: Temporal NF
     6: Toggle ON/OFF: Save to file
     7: Toggle ON/OFF: AE/AWB
     
     r: Save RAW data to file
     y: Save YUV data to file
     p: Print Profile Info
     c: DFC calibration
     i: auto iris calibration
     
     0: Stop and Exit
     
     Enter Choice : 
     Enter Choice :
     
     Enter Choice : 3
     
     AVSERVER: VS is NOT ENABLED while starting AV SERVER !!!
     
     Current Settings,
     Face Detect                     : ON
     Lens Distortion Correction (LDC): OFF
     Video Stabilization             : OFF
     Spatial NF                      : OFF
     Temporal NF                     : OFF
     File Save                       : OFF
     AE/AWB                          : OFF
     Host-name / IP address          : 192.168.1.1

     ==============
     AV Server Main
     ==============
     
     1: Toggle ON/OFF: Face Detect
     2: Toggle ON/OFF: LDC
     3: Toggle ON/OFF: Video Stabilization
     4: Toggle ON/OFF: Spatial  NF
     5: Toggle ON/OFF: Temporal NF
     6: Toggle ON/OFF: Save to file
     7: Toggle ON/OFF: AE/AWB
     
     r: Save RAW data to file
     y: Save YUV data to file
     p: Print Profile Info
     c: DFC calibration
     i: auto iris calibration
     
     0: Stop and Exit

    How can i get rid of errors that are indicated in bold above.

    I want to know is this the defualt way of execution of av_server or it should run in some other way.Is there any guide which explains how can i get the captured image by running the av_server e.g if i choose option r:save raw data to file,will it lead to creation of any raw file,i couldn't see any such file.

     

     

     

    Thanks and Regards,

    Mayank

  • Mayank Agarwal said:
    CMEMK Error: ioctl: failed to allocate heap buffer of size 0x19ae84
     
     CLK Hz,
     ARM   Hz =  432000000
     DDR   Hz =  340000000
     VPSS  Hz =  340000000
     IMCOP Hz =  340000000
     
    CMEM Error: allocHeap: ioctl CMEM_IOCALLOCHEAP failed: -1

    I wonder how big your CMEM heap is?  The CMEM heap size is printed in a banner when you insmod (or modprobe) cmemk.ko (which may be getting accomplished automatically, during boot or by some "loadmodules.sh" type of script).

    The above error is simply caused by not having enough heap to satisfy all your heap-based CMEM allocations.  It's feeling like you're going to need to increase the amount of memory given to CMEM (through the phys_start/phys_end parameters).  When doing so, you have the option of increasing your pool buffer allocation geometry in some way, or leaving your existing pools as they are and letting the heap automatically pick up the extra memory.

    Mayank Agarwal said:

     ERROR  (drv_imgs_IMX036_3MP.c|DRV_imgsOpen|646): DRV_spiOpen()
     ERROR  (drv_capture.c|DRV_captureOpen|63): Open failed
     ERROR  (videoCaptureThr.c|VIDEO_captureTskCreate|85): DRV_captureOpen()
     ERROR  (videoCaptureThr.c|VIDEO_captureTskMain|688): VIDEO_captureTskCreate() ERROR  (avServerMainThr.c|AVSERVER_tskStart|24):
    ...
    How can i get rid of errors that are indicated in bold above.

    I'm not familiar with av_server so I don't know what is causing your errors in bold, but it's possible that the CMEM allocation failure is the root cause.

    Since I'm not familiar with av_server, and since the topic of this thread doesn't mention av_server, I would suggest posting your av_server-specific questions to another forum with a topic containing "av_server".  Perhaps the Multimedia Software Codecs forum would be good.

    Regards,

    - Rob