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.

Kernel is crashing while unloading HDVICP2/HDVPSS firmwares in dm8148

Other Parts Discussed in Thread: TVP7002, TLC59108

Hi,

When I do unloading of HDVICP2/HDVPSS firmwares, kernel is crashing:

PC is at notify_shmdrv_isr_callback.isra.2+0x20/0xb0
LR is at notify_shmdrv_video_isr+0x24/0x34

I followed the below link 

http://e2e.ti.com/support/embedded/linux/f/354/t/138501

and built syslink using USE_SYSLINK_NOTIFY=0, but still it was crashing.

Actually my use case is that we want to have the device nodes of /dev/fb0, /dev/fb1 to have a small OSD(we are not using the SGX based graphics acceleration).

We are not performing any video/audio decoding on our system.

So by keeping this in mind, I assumed that we don't to load/unload M3 firmwares and I disabled this. 

But after doing this I created an image and image didn't had /dev/fb0, /dev/fb1 and I was not able to see my OSD.

Please suggest what minimum needs to be done in order to have /dev/fb0, /dev/fb1 available on my system.

Many Thanks,

Saurabh

  • syslink version--> ti-syslink-2_21_01_05

    below are our kernel parameters:

    console=ttyO0,115200n8 notifyk.vpssm3_sva=0xBF900000 vram=50M ti814xfb.vram=0:16M,1:16M,2:6M mem=364M@0x80000000 mem=320M@0x9FC00000 vmalloc=500M

    Many Thanks,
    Saurabh
  • Hello,

    What is the software release that you are using here?
    Is it EZSDK, DVRRDK, IPNC or else?


    BR
    Margarita
  • Hi,

    We are using buildroot.

    Many Thanks,
    Saurabh
  • Hello,

    I am not aware with buildroot. But If you are not using encoding/decoding you could unload HDVICP firmware but you should not unload the HDVPSS.
    Regarding the vpss you could check this guide:
    processors.wiki.ti.com/.../DM816X_AM389X_VPSS_Video_Driver_User_Guide

    If you are rebuilding the kernel you should rebuild the modules(syslink, etc) as well.

    BR
    Margarita

  • Hi,


    Actually we are doing  soft reboots in iterations. After 60-70 iterations, it crashes.

    So you suggested that in start of the script we are doing below:

     echo "Loading HDVICP2 Firmware"
        prcm_config_app s
        if ! lsmod | grep syslink > /dev/null; then
            modprobe syslink
            until [[ -e /dev/syslinkipc_ProcMgr && -e /dev/syslinkipc_ClientNotifyMgr ]]
            do
                sleep 0.5
            done
        fi
        firmware_loader $HDVICP2_ID ${M3VIDEO} start -i2c 0 >/dev/null
        echo "Loading HDVPSS (V4L2) Firmware "
        firmware_loader $HDVPSS_ID ${M3VPSS} start -i2c 0 >/dev/null
        modprobe vpss sbufaddr=0xBFB00000 mode=hdmi:1080p-60 i2c_mode=0
        modprobe ti81xxvo
        modprobe ti81xxfb vram=0:44M,1:1M,2:1M
        modprobe pvrsrvkm
        configure_display

    and in stop of the script, we are doing below:

     echo "unloading pvrsrvkm"
        rmmod pvrsrvkm
        echo "Unloading HDVICP2 Firmware"
        firmware_loader $HDVICP2_ID ${M3VIDEO} stop
        echo "Unloading HDVPSS Firmware"
        rmmod ti81xxfb
        rmmod ti81xxvo
        rmmod vpss
        firmware_loader $HDVPSS_ID ${M3VPSS} stop
        echo "unloading syslink"
        rmmod syslink

    You suggest that we can unload HDVICP2 in stop but not HDVPSS? Is that right?

    Please suggest

    Many Thanks,

    Saurabh

  • Hello,

    Yes.
    You could try to not starting the HDVICP at the begining.
    You could check this script: load-hd-firmware.sh


    BR
    Margarita
  • Hi,

    I did the same as per your suggestion:

    # echo "Loading HDVICP2 Firmware"
    prcm_config_app s
    if ! lsmod | grep syslink > /dev/null; then
    modprobe syslink
    until [[ -e /dev/syslinkipc_ProcMgr && -e /dev/syslinkipc_ClientNotifyMgr ]]
    do
    sleep 0.5
    done
    fi
    # firmware_loader $HDVICP2_ID ${M3VIDEO} start -i2c 0 >/dev/null
    echo "Loading HDVPSS (V4L2) Firmware "
    firmware_loader $HDVPSS_ID ${M3VPSS} start -i2c 0 >/dev/null
    modprobe vpss sbufaddr=0xBFB00000 mode=hdmi:1080p-60 i2c_mode=0
    modprobe ti81xxfb vram=0:44M,1:1M,2:1M
    modprobe ti81xxvo
    modprobe pvrsrvkm
    configure_display


    in stop:

    echo "unloading pvrsrvkm"
    rmmod pvrsrvkm
    #echo "Unloading HDVICP2 Firmware"
    #firmware_loader $HDVICP2_ID ${M3VIDEO} stop
    echo "Unloading HDVPSS Firmware"
    rmmod ti81xxvo
    rmmod ti81xxfb
    rmmod vpss
    firmware_loader $HDVPSS_ID ${M3VPSS} stop
    echo "unloading syslink"
    rmmod syslink


    and I ran the cycles of soft reboot and I found that after 175 iteration, it got crashed at the same position while unloading of the HDVPSS firmware:


    unloading pvrsrvkm
    Unloading HDVPSS Firmware
    fpga_driver:0726:process_image_bottom_half:ready to send signal for scm_1 interrupt
    FIRMWARE: I2cInit will be done by M3
    FIRMWARE: Memory map bin file not passed
    Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
    ===Mandatory arguments===
    <Processor Id> 0: DSP, 1:Unable to handle kernel paging request at virtual address db37c004
    Video-M3, 2: Vppgd = c0004000
    ss-M3
    <Locatio[db37c004] *pgd=96579011n of Firmware> f, *pte=00000000irmware binary f, *ppte=00000000ile
    <start|sto
    p> to Internal error: Oops: 7 [#1] PREEMPT
    last sysfs file: /sys/devices/system/cpu/online
    Modules linked in: syslink GPIO_intr_driver FPGA_I2C_driver g_zero snd_soc_tlv320aic3x snd_soc_core snd_pcm snd_page_alloc snd_timer [last unloaded: vpss]
    CPU: 0 Not tainted (2.6.37 #1)
    PC is at _NameServerRemoteNotify_callback+0x12c/0x154 [syslink]
    LR is at notify_shm_drv_send_event+0x164/0x228
    pc : [<bf096108>] lr : [<c0693fdc>] psr: 60000113
    sp : d65a3e28 ip : d65a3da0 fp : d65a3e5c
    r10: 00000000 r9 : c041cf44 r8 : 00000000
    r7 : 00000001 r6 : fffffffb r5 : 00000000 r4 : db37c000
    r3 : 00000000 r2 : 00000000 r1 : 00000001 r0 : 00000000
    Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    Control: 10c5387d Table: 93900019 DAC: 00000017
    Process kworker/0:1 (pid: 306, stack limit = 0xd65a22e8)
    Stack: (0xd65a3e28 to 0xd65a4000)
    3e20: 00000000 c03fd458 d65a3e5c 00000004 d65a3e64 00000004
    3e40: d67afc00 d67afc28 00000000 d67afc2c d65a3e8c d65a3e60 c0692cf8 bf095fe8
    3e60: 00000000 c03fe8b0 00000000 d66bae80 00000000 0fffffff ffffffff 00000000
    3e80: d65a3eac d65a3e90 c0694a64 c0692c7c ffffffff 00000000 00000004 00000004
    3ea0: d65a3ebc d65a3eb0 c0694aa8 c06949e0 d65a3ee4 d65a3ec0 c0444d9c c0694a90
    3ec0: ffffffff c08a4e28 c08c26e4 ffffffff 00000004 00000004 d65a3f14 d65a3ee8
    3ee0: c0444f1c c0444d68 00000000 d645d600 d65a3f14 d678edd4 d65a2000 d678edc0
    3f00: 00000004 00000000 d65a3f2c d65a3f18 c0444f54 c0444edc 00000000 d678edd4
    3f20: d65a3f54 d65a3f30 c041cfa8 c0444f40 d65a3f54 00000004 d654fec0 d678edd4
    3f40: c08a81e4 d645d600 d65a3f8c d65a3f58 c043a674 c041cf50 d65a3fbc d65a3f90
    3f60: c041e6f0 d654fec0 c08a81e4 d65a2000 d654fed0 c08ebf28 00000009 c08a81e0
    3f80: d65a3fbc d65a3f90 c043ab64 c043a470 00000000 d6433ef0 d654fec0 c043a974
    3fa0: 00000013 00000000 00000000 00000000 d65a3ff4 d65a3fc0 c043f750 c043a980
    3fc0: d6433ef0 00000000 d654fec0 00000000 d65a3fd0 d65a3fd0 00000000 d6433ef0
    3fe0: c043f6c0 c0429034 00000000 d65a3ff8 c0429034 c043f6cc 00008fff 00008fff
    Backtrace:
    [<bf095fdc>] (_NameServerRemoteNotify_callback+0x0/0x154 [syslink]) from [<c0692cf8>] (notify_exec+0x88/0xbc)
    r8:d67afc2c r7:00000000 r6:d67afc28 r5:d67afc00 r4:00000004
    [<c0692c70>] (notify_exec+0x0/0xbc) from [<c0694a64>] (notify_shmdrv_isr_callback.isra.2+0x90/0xb0)
    r8:00000000 r7:ffffffff r6:0fffffff r5:00000000 r4:d66bae80
    [<c06949d4>] (notify_shmdrv_isr_callback.isra.2+0x0/0xb0) from [<c0694aa8>] (notify_shmdrv_vpss_isr+0x24/0x34)
    r7:00000004 r6:00000004 r5:00000000 r4:ffffffff
    [<c0694a84>] (notify_shmdrv_vpss_isr+0x0/0x34) from [<c0444d9c>] (notifier_call_chain+0x40/0x70)
    [<c0444d5c>] (notifier_call_chain+0x0/0x70) from [<c0444f1c>] (__blocking_notifier_call_chain+0x4c/0x64)
    r8:00000004 r7:00000004 r6:ffffffff r5:c08c26e4 r4:c08a4e28
    r3:ffffffff
    [<c0444ed0>] (__blocking_notifier_call_chain+0x0/0x64) from [<c0444f54>] (blocking_notifier_call_chain+0x20/0x28)
    r8:00000000 r7:00000004 r6:d678edc0 r5:d65a2000 r4:d678edd4
    [<c0444f34>] (blocking_notifier_call_chain+0x0/0x28) from [<c041cfa8>] (mbox_rx_work+0x64/0x110)
    [<c041cf44>] (mbox_rx_work+0x0/0x110) from [<c043a674>] (process_one_work+0x210/0x388)
    r7:d645d600 r6:c08a81e4 r5:d678edd4 r4:d654fec0
    [<c043a464>] (process_one_work+0x0/0x388) from [<c043ab64>] (worker_thread+0x1f0/0x36c)
    [<c043a974>] (worker_thread+0x0/0x36c) from [<c043f750>] (kthread+0x90/0x9c)
    [<c043f6c0>] (kthread+0x0/0x9c) from [<c0429034>] (do_exit+0x0/0x66c)
    r6:c0429034 r5:c043f6c0 r4:d6433ef0


    Please suggest how to overcome this.

    Many Thanks,
    Saurabh
  • Hello,


    case "$1" in
    start)
    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 1 /usr/share/ti/ti-media-controller-utils/dm814x_hdvicp.xem3 start
    echo "Loading HDVPSS (V4L2) Firmware "
    firmware_loader 2 /usr/share/ti/ti-media-controller-utils/dm814x_hdvpss_v4l2.xem3 start -i2c 0
    modprobe vpss sbufaddr=0xBFB00000 mode=hdmi:1080p-60 i2c_mode=0
    modprobe ti81xxfb vram=0:40M,1:1M,2:1M
    configure_lcd
    modprobe ti81xxvo
    modprobe tvp7002
    modprobe ti81xxvin
    fbset -depth 32 -rgba 8/16,8/8,8/0,0/0
    modprobe ti81xxhdmi
    modprobe tlc59108
    ;;
    stop)
    echo "Unloading HDVICP2 Firmware"
    firmware_loader 1 /usr/share/ti/ti-media-controller-utils/dm814x_hdvicp.xem3 stop
    echo "Unloading HDVPSS Firmware"
    rmmod tlc59108
    rmmod ti81xxhdmi
    rmmod ti81xxfb
    rmmod ti81xxvin
    rmmod ti81xxvo
    rmmod tvp7002
    rmmod ti81xxhdmi
    rmmod vpss
    firmware_loader 2 /usr/share/ti/ti-media-controller-utils/dm814x_hdvpss_v4l2.xem3 stop
    rmmod syslink
    ;;
    *)

    Could you try there is a difference with yours script.

    BR
    Margarita