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.

Linux/DRA746: About OpenCV Issue

Part Number: DRA746
Other Parts Discussed in Thread: TVP5158,

Tool/software: Linux

Hi Sir 

we download latest automotive processor sdk from TI and do opencv test. the system showed error message as below 

root@dra7xx-evm:~# ./opencv_test 

TIOCL FATAL: OpenCL needs 1 CMEM blocks to operate - one each for off-chip (DDR) and on-chip (MSMC SRAM or OCMC RAM) memory.

Q1: Does TI have any suggestion to fix this issue ?

Q2: Where can we geit OpenCV sample code ? or we need to download via  the yocto pacakge ?

thanks 

BR

Yimin

  • Hi Yimin,

    there is a patch that needs to be applied and firmware to be loaded for OpenCL to work, please check this steps:
    processors.wiki.ti.com/index.php

    Then you can test OpenCV as described here:
    processors.wiki.ti.com/index.php

    Regards,
    Yordan
  • Hi Sir

    thanks for your reply. we followed the steps and got the error message,

    root@dra7xx-evm:/usr/share/ti/examples/opencl/platforms# ./platforms 

    [  287.439568] tvp5158 1-0058: Unable to of_probe

    [  287.446952] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

    [  287.452860] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0

    [  287.459018] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0

    [  287.467827] tvp5158 1-0058: Unable to of_probe

    [  287.479675] omap_hwmod: mmu0_dsp1: _wait_target_disable failed

    [  287.485575] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0

    [  287.495262] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0

    [  287.505538] tvp5158 1-0058: Unable to of_probe

    PLATFORM: TI AM57x

      Version: OpenCL 1.1 TI product version 01.01.12.0 (Dec 28 2017 05:40:58)

      Vendor : Texas Instruments, Inc.

      Profile: FULL_PROFILE

        DEVICE: TI Multicore C66 DSP

          Type       : ACCELERATOR

          CompUnits  : 2

          Frequency  : 0.75 GHz

          Glb Mem    :  163840 KB

          GlbExt1 Mem:       0 KB

          GlbExt2 Mem:       0 KB

          Msmc Mem   :    1024 KB

          Loc Mem    :     128 KB

          Max Alloc  :  147456 KB

    root@dra7xx-evm:/usr/share/ti/examples/opencl/platforms# [  298.153064] omap_hwmod: mmu1_dsp2: _wait_target_disable failed

    [  298.167266] omap_hwmod: mmu1_dsp1: _wait_target_disable failed

    [  298.181113] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

    [  298.194938] omap_hwmod: mmu0_dsp1: _wait_target_disable failed

    do you have similar experience or other suggestion ?

    BR

    Yimin 

  • Hi Yimin,

    I am not sure about this error. I have pinged OpenCL experts to help.

    Regards,
    Yordan
  • Hi Yimin,

    You mentioned DRA746 in your ticket, could you also confirm below

    - Release: Is it PSDKLA 3.04.00.03?
    - What dts are you using in your setup
    - Are you using the prebuilt binaries or built the images

    Aside the error messages, were you able to run the OpenCL kernels at all?

    Thanks,
    Gowtham

  • Hi Sir

    the reply is below 

    - Release: Is it PSDKLA 3.04.00.03?

       Yes


    - What dts are you using in your setup

          please refer to attachment 

        https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/1602.dts.7z

    - Are you using the prebuilt binaries or built the images

        Yes. I am using the prebuilt filesystem and kernel. Besides, I also patch the .dtb file to the target board /boot folder manually.

    - were you able to run the OpenCL kernels at all?   

        The below is the configuration and messages for your reference. As you can see, I had linked the xe66 fw to opencl-monitor.

    root@dra7xx-evm:/lib/firmware# ls -l

    lrwxrwxrwx    1 root     root            49 Dec 28 00:46 am57xx-pru1_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_0.out

    lrwxrwxrwx    1 root     root            49 Dec 28 00:46 am57xx-pru1_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_1.out

    lrwxrwxrwx    1 root     root            49 Dec 28 00:46 am57xx-pru2_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_0.out

    lrwxrwxrwx    1 root     root            49 Dec 28 00:46 am57xx-pru2_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_1.out

    -rwxr-xr-x    1 root     root       9941039 Dec 27 23:39 dra7-dsp1-fw-radio.xe66

    lrwxrwxrwx    1 root     root            32 Mar  8 08:53 dra7-dsp1-fw.xe66 -> dra7-dsp1-fw.xe66.opencl-monitor

    -rw-r--r--    1 root     root      21639776 Dec 28 00:10 dra7-dsp1-fw.xe66.opencl-monitor

    lrwxrwxrwx    1 root     root            32 Mar  8 08:53 dra7-dsp2-fw.xe66 -> dra7-dsp2-fw.xe66.opencl-monitor

    -rw-r--r--    1 root     root      21639776 Dec 28 00:10 dra7-dsp2-fw.xe66.opencl-monitor

    lrwxrwxrwx    1 root     root            55 Dec 28 00:46 dra7-ipu1-fw.xem4 -> ipc/ti_platforms_evmDRA7XX_ipu1/test_omx_ipu1_vayu.xem4

    lrwxrwxrwx    1 root     root            40 Dec 28 00:46 dra7-ipu2-fw.xem4 -> /lib/firmware/dra7-ipu2-fw.xem4.ipumm-fw

    -rw-r--r--    1 root     root       3743112 Dec 28 00:03 dra7-ipu2-fw.xem4.ipumm-fw

    -rw-r--r--    1 root     root        572591 Dec 28 00:03 dra7-ipu2-fw.xem4.map

    -rw-r--r--    1 root     root           186 Dec 27 23:27 goodix_9271_cfg.bin

    drwxr-xr-x    6 root     root          4096 Dec 28 00:00 ipc

    drwxr-xr-x    2 root     root          4096 Dec 28 00:45 pru

    drwxr-xr-x    2 root     root          4096 Dec 28 00:45 ti-connectivity

    -rw-r--r--    1 root     root          4002 Dec 27 23:41 vpdma-1b8.bin

    Ensure that CMEM memory reservations are in effect. 

    root@dra7xx-evm:/lib/firmware# lsmod | grep cmemk

    cmemk                  35174  2

    root@dra7xx-evm:/lib/firmware# cat /proc/iomem | grep -i cmem

    40500000-405fffff : CMEM

    a0000000-abffffff : CMEM

    root@dra7xx-evm:/lib/firmware#

    The testing logs followed the processors.wiki.ti.com/.../Processor_SDK_Linux_Automotive_Software_Developers_Guide

    root@dra7xx-evm:/usr/share/ti/examples/opencl/platforms# ./platforms 

    [ 3957.386603] tvp5158 1-0058: Unable to of_probe

    [ 3957.398786] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

    [ 3957.404690] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0

    [ 3957.412261] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0

    [ 3957.421049] tvp5158 1-0058: Unable to of_probe

    [ 3957.427374] omap_hwmod: mmu0_dsp1: _wait_target_disable failed

    [ 3957.433277] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0

    [ 3957.439456] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0

    [ 3957.449341] tvp5158 1-0058: Unable to of_probe

    PLATFORM: TI AM57x

      Version: OpenCL 1.1 TI product version 01.01.12.0 (Dec 28 2017 05:40:58)

      Vendor : Texas Instruments, Inc.

      Profile: FULL_PROFILE

        DEVICE: TI Multicore C66 DSP

          Type       : ACCELERATOR

          CompUnits  : 2

          Frequency  : 0.75 GHz

          Glb Mem    :  163840 KB

          GlbExt1 Mem:       0 KB

          GlbExt2 Mem:       0 KB

          Msmc Mem   :    1024 KB

          Loc Mem    :     128 KB

          Max Alloc  :  147456 KB

    root@dra7xx-evm:/usr/share/ti/examples/opencl/platforms# [ 3968.190036] omap_hwmod: mmu1_dsp2: _wait_target_disable failed

    [ 3968.203087] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

    [ 3968.217069] omap_hwmod: mmu1_dsp1: _wait_target_disable failed

    [ 3968.230067] omap_hwmod: mmu0_dsp1: _wait_target_disable failed

     

    root@dra7xx-evm:/usr/share/ti/examples/opencl/vecadd# ./vecadd

    [ 4409.360734] tvp5158 1-0058: Unable to of_probe

    [ 4409.376233] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

    [ 4409.382136] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0

    [ 4409.388069] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0

    [ 4409.396446] tvp5158 1-0058: Unable to of_probe

    [ 4409.408580] omap_hwmod: mmu0_dsp1: _wait_target_disable failed

    [ 4409.414483] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0

    [ 4409.420714] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0

    [ 4409.430277] tvp5158 1-0058: Unable to of_probe

    [ 4409.446046] tvp5158 1-0058: Unable to of_probe

    DEVICE: TI Multicore C66 DSP

    Offloading vector addition of 8192K elements...

    Kernel Exec : Queue  to Submit: 14 us

    Kernel Exec : Submit to Start : 47 us

    Kernel Exec : Start  to End   : 30295 us

    Success!

    root@dra7xx-evm:/usr/share/ti/examples/opencl/vecadd# [ 4423.183379] omap_hwmod: mmu1_dsp2: _wait_target_disable failed

    [ 4423.196394] omap_hwmod: mmu0_dsp2: _wait_target_disable failed

    [ 4423.213427] omap_hwmod: mmu1_dsp1: _wait_target_disable failed

    [ 4423.227284] omap_hwmod: mmu0_dsp1: _wait_target_disable failed

    for your information

    BR

    Yimin

  • Hi Yimin,

    I believe you have the OpenCL kernels working as expected. The other messages are not affecting the execution of the kernels itself. Please raise a separate ticket for the occurrence of `omap_hwmod:mmu_....` messages.

    Thanks,
    Gowtham