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.

[DM8168] How to resolve syslink assertion error after hdvicp xem3 load?

Good day. I see syslink assertion error after loading xem3 hdvicp firmware on my custom board. Here's part of dmesg log:

notify_init : notify drivercreated  for  remote proc id 2 at physical Address 0xbf900000
SysLink version : 2.20.02.20
SysLink module created on Date:Oct 25 2016 Time:14:49:23
Assertion at Line no: 452 in /opt/ezsdk_clean/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/SharedRegionDrv.c: (status >= 0) : failed

Here's the script sequence I use. Based on load-hd-firmware.sh:

./prcm_config_app s
insmod notifyk.ko vpssm3_sva=0xbf900000
insmod syslink.ko
./firmware_loader 1 dm816x_hdvicp.xem3 start -mmap mm_dm81xxbm.bin -i2c 0

EZSDK ver is 05.02.00.60. Syslink is built from ezsdk sources. Also I changed ezsdk memory map as my board has 512 MB RAM: reduced framebuffers size to give linux more memory. I set IPC_SR_FRAME_BUFFERS addr to 0xB1C00000 and size=80MB (0x05000000). The rest memory map is left unchanged. OMX library has been rebuilt. Also made new mm_dm81xxbm.bin. Followed this manual: processors.wiki.ti.com/.../EZSDK_Memory_Map

I got kernel panic when I put notify vpssm3_sva=0xbf900000 in the bootargs. Many messages saying that vpss is trying to communicate via notify_send. To fix it I built syslink with [M] flag and load notifyk.ko and syslink manually. This is quite weird for me as vpss video driver guide states that syslink must be built as [*]. Used this one - processors.wiki.ti.com/.../DM816X_AM389X_VPSS_Video_Driver_User_Guide_PSP_04.00.00.12

What am I doing wrong and how to resolve that error? I'm still able to run gstreamer pipelines with omx_h264enc. It works. Also sys_top shows hdvicp memory correctly.


Linux, syslink, omx, gstomx are built from sources coming with ezsdk package.
memtbl_cfg.h and memsegdef are attached.

memtbl_cfg.h

memsegdef_dm81xxbm.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Copyright (c) 2010-2011, Texas Instruments Incorporated
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Contact information for paper mail:
* Texas Instruments
* Post Office Box 655303
* Dallas, Texas 75265
* Contact information:
* http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
* DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
* ============================================================================
*
*/
/**
* @file memsegdef.c
*
* @brief Memory map segment definitions, This is auto generated file
*
*
*
* @ver 0.1
*
* ============================================================================
*/
/*----------------------------- Memory Segment configuration -----------------*/
#include <ldr_memseg.h>
uint32_t ldrmemcfg_ddrSize = LDR_DDR_SIZE_1G ;
LDR_MemSeg sdk_memseg[] =
{
/* Segment 0 */
{
1, /* valid */
"IPC_SR_VIDEO_M3_VPSS_M3", /* name */
0x00100000, /* size */
LDR_SEGMENT_TYPE_DYNAMIC_SHARED_HEAP, /* LDR_SEGMENT_TYPE_DYNAMIC_SHARED_HEAP,
seg_type */
0, /* flags */
0x9A100000, /* system_addr */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Andrei,

    Can you test with the latest EZSDK 5.05.02.00?

    Can you test on the DM816x TI EVM?

    Regards,
    Pavel
  • Pavel Botev said:
    Can you test with the latest EZSDK 5.05.02.00?

    I'm already using the latest one from here - http://software-dl.ti.com/dsps/dsps_public_sw/ezsdk/latest/index_FDS.html

    Page says 5_05_02_00. Are the newer versions?

    Pavel Botev said:
    Can you test on the DM816x TI EVM?

    No. I have only 8148 kit. I will try new syslink version soon.

    I also noticed that if i try to change encodingPreset or compression profile in the omx_h264encgstreamer  element, I get wrong parameter error. Does dm8168_hdvicp.xem3 supports only baseline profile? Baseline is enough for my task though. Just asking.

  • Hello,

    Andrei K said:
    I also noticed that if i try to change encodingPreset or compression profile in the omx_h264encgstreamer  element, I get wrong parameter error. Does dm8168_hdvicp.xem3 supports only baseline profile? Baseline is enough for my task though. Just asking.

    You could check the gstomx_h264enc.c file and try to change the encodingPreset there the default value is  self->encodingPreset = OMX_Video_Enc_High_Speed_Med_Quality;

    You could check the h264encoder user guide for available options.

    BR
    Margarita

  • Andrei,

    Andrei K said:
    Pavel Botev
    Can you test with the latest EZSDK 5.05.02.00?

    I'm already using the latest one from here - http://software-dl.ti.com/dsps/dsps_public_sw/ezsdk/latest/index_FDS.html

    Page says 5_05_02_00. Are the newer versions?

    But in your first post you state:

    "EZSDK ver is 05.02.00.60"

    I am not sure how to understand this.

    Regards,
    Pavel

  • Pavel Botev said:
    "EZSDK ver is 05.02.00.60"

    Typo. I use 5.05.02.00.

    I get same error with another syslink ver. 2.21.03.11. Downloaded from here http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/syslink/index.html

    Does syslink need any special magic? I build kernel, then cmem, then syslink. OMX and gst-openmax in the end.

    I'm quite new in the IPC programming field. What does assertion mean? Does this message signal that I set shared regions wrong?

    Margaritha, thank you for tip about gstreamer preset.

  • Andrei,

    syslink 2.20.02.20 should work fine with DM816x EZSDK 5.05.02.00

    Andrei K said:
    Here's the script sequence I use. Based on load-hd-firmware.sh:

    ./prcm_config_app s
    insmod notifyk.ko vpssm3_sva=0xbf900000
    insmod syslink.ko
    ./firmware_loader 1 dm816x_hdvicp.xem3 start -mmap mm_dm81xxbm.bin -i2c 0

    The targetfs_dm816x/etc/init.d/load-hd-firmware.sh is kind of different:

    echo "Loading HDVICP2 Firmware"
        prcm_config_app s
            modprobe syslink
            until [[ -e /dev/syslinkipc_ProcMgr && -e /dev/syslinkipc_ClientNotifyMgr ]]
            do                                                
                sleep 0.5
            done
            firmware_loader $HDVICP2_ID /usr/share/ti/ti-media-controller-utils/dm816x_hdvicp.xem3 start

    Can you try with that sequence? Can you try with the default syslink.ko?

    For syslink in EZSDK, you can also examine the below wiki pages:

    http://processors.wiki.ti.com/index.php/OMX_EZSDK_Examples

    http://processors.wiki.ti.com/index.php/RPE_EZSDK_examples

    http://processors.wiki.ti.com/index.php/How_to_integrate_audio/voice_in_RPE_in_EZSDK

    http://processors.wiki.ti.com/index.php/EZSDK_Firmware_Loader_vs_Slaveloader_FAQ

    DM816x_EZ_Software_Developers_Guide.pdf, 3.2 Running the SysLink examples


    Regards,
    Pavel

  • Pavel Botev said:
    Can you try with the default syslink.ko?

    What is "default syslink.ko"? I don't get it clearly. Do you mean the prebuilt .ko file which comes with ezsdk targetfs installation?

    I used 2.20.02.20 which is included in ezsdk package and 2.21.03.11.

  • Hi Andrei,

    Yes, I mean the prebuilt (unmodified by you) syslink.ko file.

    Regards,
    Pavel
  • Very late reply, but still. Maybe it would be helpful.

    I solved problem: memsegdef._dm81xxbm_512M.c file in the mm_host_util directory doesn't contain definitions for DSP_ALG_HEAP and A8_DSP_CMEM. I compared with memsegdef_default in firmware_loader folder. Then I adjust IPC_FRAME_BUFFERS size and recompiled loader. After running load-v4l2-firmware.sh there was no syslink assertion error. I discovered it accidentally when mistyped --mmap instead of -mmap in the script and firmware loader used default map file. Typo leads to solution :)

    Either way thx for replies, people.