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.

SLAVE CORE [VPSS-M3] DOWN!!!

Dears,

I want to build a demo chain like this

capture->dup->swms->display

                     |->ipcframesoutvpss->ipcframesinHLOS->save frame as bmpfile.

After starting the application the VPSS M3 core will go down.

Is that memory problem ?

 

start!!!
[m3vpss ] 13460: CAPTURE: Create in progress !!!
[m3vpss ] 13491: CAPTURE: VIP0 PortA capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
[m3vpss ] 13796: CAPTURE: VIP0 PortB capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
[m3vpss ] 14100: CAPTURE: VIP1 PortA capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
[m3vpss ] 14404: CAPTURE: VIP1 PortB capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
Display 0: Layout: CHAINS_LAYOUT_1x1
[m3vpss ] UTILS: DMA: Allocated CH (TCC) = 49 (49)


1350:!!!SLAVE CORE [VPSS-M3] DOWN!!!
SystemLink_copySlaveCoreExceptionContext:146
mmap of [0xbe9e0000:36864]
mmap virt addresss:0x4002a000
munmap of [0x4002a000:36864]
SystemLink_copySlaveCoreExceptionContext:153
[m3vpss ] CAPTURE::HEAPID:0 USED:992
[m3vpss ] CAPTURE::HEAPID:3 USED:66355200
[m3vpss ] CAPTURE::HEAPID:4 USED:203673600
[m3vpss ] 14710: CAPTURE: Create Done !!!
[m3vpss ] 14711: HDMI: Starting HDMI Transmitter ... !!!
[m3vpss ] 14721: HDMI: HDMI Config ... DONE !!!
[m3vpss ] 14722: HDMI: Starting HDMI Transmitter ... DONE !!!
[m3vpss ] 14722: SWMS: Create in progress !!!
[m3vpss ] 14723: Assertion @ Line: 2189 in links_m3vpss/swMs/swMsLink_drv.c: pPrm->inQueParams.prevLinkQueId < pObj->inTskInfo.numQue : failed !!!

 

thank you for your help.

MJ

  • This is bug in usecase. Attach your usecase file where you are creating and connecting links. From the logs it looks like you are not creating dupLink .Check swms prevLinkId and prevLinkQueueId is correct and prevLink is created.

  • Dear Badri,

    thanks for your reply. I found a bug in my program. The linkcreate sequence caused this problem.

    After I fix this bug, the system still not function well. the monitor always show a freeze image. 

    could you help me? thank you.

    Int32 i;
    char ch;

    CHAINS_INIT_STRUCT(CaptureLink_CreateParams,capturePrm);
    CHAINS_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams,ipcFramesOutVpssPrm);
    CHAINS_INIT_STRUCT(IpcFramesInLinkHLOS_CreateParams,ipcFramesInHostPrm);
    CHAINS_INIT_STRUCT(SwMsLink_CreateParams,swMsPrm);
    CHAINS_INIT_STRUCT(DisplayLink_CreateParams,displayPrm);


    captureId = SYSTEM_LINK_ID_CAPTURE;
    dupId = SYSTEM_VPSS_LINK_ID_DUP_0;
    swMsId = SYSTEM_LINK_ID_SW_MS_MULTI_INST_0;
    displayId = SYSTEM_LINK_ID_DISPLAY_0;
    ipcFramesOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;
    ipcFramesInHostId = SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0;
    printf("start!!!cam number = %d\n",chainsCfg->chNum);
    capturePrm.numVipInst = chainsCfg->chNum;
    capturePrm.tilerEnable = FALSE;
    capturePrm.numBufsPerCh = 16;
    capturePrm.numExtraBufs = 0;
    capturePrm.maxBlindAreasPerCh = 0;
    capturePrm.isPalMode = FALSE;
    capturePrm.enableSdCrop = FALSE;
    capturePrm.doCropInCapture = FALSE;

    for(i=0; i<capturePrm.numVipInst; i++)
    {
    vipInstId = SYSTEM_CAPTURE_INST_VIP0_PORTA + i;
    pCaptureInstPrm = &capturePrm.vipInst[i];
    pCaptureInstPrm->vipInstId = vipInstId % SYSTEM_CAPTURE_INST_MAX;
    pCaptureInstPrm->videoDecoderId = 0;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
    pCaptureInstPrm->standard = chainsCfg->chCfg[i].inStd;
    pCaptureInstPrm->numOutput = 1;
    pCaptureInstPrm->numChPerOutput = 1;
    pCaptureInstPrm->frameCaptureMode = FALSE;
    pCaptureInstPrm->fieldsMerged = FALSE;

    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->outQueId = 0;
    }

    capturePrm.outQueParams[0].nextLink = dupId;

    System_linkCreate(captureId, &capturePrm, sizeof(capturePrm));
    Chains_updateInfo(chainsCfg, &capturePrm);

    dupPrm.inQueParams.prevLinkId = captureId;
    dupPrm.inQueParams.prevLinkQueId = 0;
    dupPrm.numOutQue = 2;
    dupPrm.outQueParams[0].nextLink = ipcFramesOutVpssId;
    dupPrm.outQueParams[1].nextLink = swMsId;
    dupPrm.notifyNextLink = TRUE;

    swMsPrm.numSwMsInst = 1;
    swMsPrm.swMsInstId[0] = SYSTEM_SW_MS_SC_INST_SC5;
    swMsPrm.inQueParams.prevLinkId = dupId;
    swMsPrm.inQueParams.prevLinkQueId = 1;
    swMsPrm.outQueParams.nextLink = displayId;
    swMsPrm.lineSkipMode = FALSE;
    swMsPrm.enableLayoutGridDraw = FALSE;
    swMsPrm.layoutPrm.outputFPS = chainsCfg->chCfg[0].outFrameRate;
    swMsPrm.maxInputQueLen = 15;//SYSTEM_SW_MS_DEFAULT_INPUT_QUE_LEN;
    swMsPrm.maxOutRes = chainsCfg->displayRes[0];
    swMsPrm.initOutRes = chainsCfg->displayRes[0];
    swMsPrm.numOutBuf = 0;
    swMsPrm.enableOuputDup = TRUE;

    Chains_swMsGenerateLayoutParams(0, 2, &swMsPrm);

    displayPrm.displayRes = chainsCfg->displayRes[0];
    displayPrm.numInputQueues = 1;
    displayPrm.activeQueue = 0;
    displayPrm.inQueParams[0].prevLinkId = swMsId;
    displayPrm.inQueParams[0].prevLinkQueId = 0;
    displayPrm.forceFieldSeparatedInputMode = FALSE;
    Chains_displayCtrlInit(chainsCfg->displayRes);


    ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkId = dupId;
    ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesOutVpssPrm.baseCreateParams.notifyPrevLink = FALSE;
    ipcFramesOutVpssPrm.baseCreateParams.numOutQue = 1;
    ipcFramesOutVpssPrm.baseCreateParams.outQueParams[0].nextLink = ipcFramesInHostId;
    ipcFramesOutVpssPrm.baseCreateParams.notifyNextLink = TRUE;
    ipcFramesOutVpssPrm.baseCreateParams.noNotifyMode = FALSE;


    ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkId = ipcFramesOutVpssId;
    ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesInHostPrm.baseCreateParams.outQueParams[0].nextLink = SYSTEM_LINK_ID_INVALID;

    ipcFramesInHostPrm.baseCreateParams.noNotifyMode = FALSE;
    ipcFramesInHostPrm.baseCreateParams.notifyNextLink = FALSE;
    ipcFramesInHostPrm.baseCreateParams.notifyPrevLink = FALSE;

    System_linkCreate(dupId,&dupPrm,sizeof(dupPrm));
    System_linkCreate(ipcFramesOutVpssId, &ipcFramesOutVpssPrm, sizeof(ipcFramesOutVpssPrm));
    System_linkCreate(swMsId, &swMsPrm, sizeof(swMsPrm));
    System_linkCreate(displayId, &displayPrm, sizeof(displayPrm));
    System_linkCreate(ipcFramesInHostId, &ipcFramesInHostPrm, sizeof(ipcFramesInHostPrm));

    Chains_memPrintHeapStatus();

    System_linkStart(ipcFramesInHostId);
    System_linkStart(displayId);
    System_linkStart(swMsId);
    System_linkStart(ipcFramesOutVpssId);

    System_linkStart(dupId);
    System_linkStart(captureId);

    /*****************************************************************/

    [m3vpss ] 13462: CAPTURE: Create in progress !!!
    [m3vpss ] 13493: CAPTURE: VIP0 PortA capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
    [m3vpss ] 13798: CAPTURE: VIP0 PortB capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
    [m3vpss ] 14102: CAPTURE: VIP1 PortA capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
    [m3vpss ] 14407: CAPTURE: VIP1 PortB capture mode is [ 8-bit, Non-mux Discrete Sync - ACTVID_VSYNC] !!!
    Display 0: Layout: CHAINS_LAYOUT_1x1
    [m3vpss ] UTILS: DMA: Allocated CH (TCC) = 58 (58)
    [m3vpss ] CAPTURE::HEAPID:0 USED:992
    [m3vpss ] CAPTURE::HEAPID:3 USED:66355200
    [m3vpss ] CAPTURE::HEAPID:4 USED:203673600
    [m3vpss ] 14712: CAPTURE: Create Done !!!
    [m3vpss ] 14714: HDMI: Starting HDMI Transmitter ... !!!
    [m3vpss ] 14723: HDMI: HDMI Config ... DONE !!!
    [m3vpss ] 14724: HDMI: Starting HDMI Transmitter ... DONE !!!
    [m3vpss ] 0: : 4
    [m3vpss ] 14727: DUP : Create Done !!!
    [m3vpss ] 14727: IPC_FRAMES_OUT : Create in progress !!!
    [m3vpss ] 14729: IPC_FRAMES_OUT : Create Done !!!
    [m3vpss ] 14730: SWMS: Create in progress !!!
    [m3vpss ] UTILS: DMA: Allocated CH (TCC) = 59 (59)
    [m3vpss ] SWMS: instance 0, sc id 5, start win 0 end win 17

    [host] IpcFramesInLink_tskMain:Entered
    [host] 1461: IPC_FRAMES_IN : Create in progress !!!

    [host] 1461: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_19] ...
    1463: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_19] ...
    [m3vpss ] 14831: SWMS0 : Loading Vertical Co-effs (UPSCALE)x ...
    [m3vpss ] 14831: SWMS0 : Loading Horizontal Co-effs (UPSCALE)x ...
    [m3vpss ] 14831: SWMS : Co-effs Loading ... DONE !!!

    [host] 1468: IPC_FRAMES_IN : Create Done !!!
    create done
    [m3vpss ] AVSYNC:WARNING!! Application wrongly configureddisplayID[-1]. Reseting to correct displayID[0]
    [m3vpss ] 14832: SWMS : ******* Configuring clock 16 secs...
    [m3vpss ] 14832: SWMS0 : Loading Vertical Co-effs (UPSCALE)x ...
    [m3vpss ] 14832: SWMS0 : Loading Horizontal Co-effs (UPSCALE)x ...
    [m3vpss ] 14832: SWMS : Co-effs Loading ... DONE !!!
    [m3vpss ]
    [m3vpss ] *** [SWMS0] Mosaic Parameters ***
    [m3vpss ]
    [m3vpss ] Output FPS: 60
    [m3vpss ]
    [m3vpss ] Win | Ch | Input | Input | Input | Input | Output | Output | Output | Output | Low Cost | SWMS | Data | Blank |
    [m3vpss ] Num | Num | Start X, Y | Width x Height | Pitch Y / C | Memory Type | Start X, Y | Width x Height | Pitch Y / C | Memory Type | ON / OFF | Inst | Format| Frame |
    [m3vpss ] ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    [m3vpss ] 0 | 0 | 0, 0 | 1920 x 1080 | 3840 / 3840 | NON-TILED | 0, 0 | 1920 x 1080 | 3840 / 0 | NON-TILED | OFF | 0 | 422I | OFF |
    [m3vpss ]
    [m3vpss ] SWMS:HEAPID:0 USED:360
    [m3vpss ] SWMS:HEAPID:1 USED:47296
    [m3vpss ] SWMS:HEAPID:4 USED:20736000
    [m3vpss ] 14834: SWMS: Create Done !!!
    [m3vpss ] 14834: DISPLAY: Create in progress !!!
    [m3vpss ] 14835: DISPLAY: Create Done !!!
    [m3vpss ] 14842: DISPLAY: Start in progress !!!
    [m3vpss ] 14880: DISPLAY: Start Done !!!
    [m3vpss ] 14880: DISPLAY: HDDAC(BP0) : 52 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 255 / 0 ) !!!
    [m3vpss ] 14881: SWMS: Start in Progress !!!
    [m3vpss ] 14881: SWMS: Start Done !!!
    [m3vpss ] 14881: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 0, HDDAC(BP0) 0, DVO2(BP1) 0, SDDAC(SEC1) 0
    [m3vpss ] 14881: SYSTEM : FREE SPACE : System Heap = 5424 B, Mbx = 10239 msgs)
    [m3vpss ] 14881: CAPTURE: Start in progress !!!
    [m3vpss ] 14881: CAPTURE: Start Done !!!
    [m3vpss ] 14881: SYSTEM : FREE SPACE : SR0 Heap = 11003648 B (10 MB)
    [m3vpss ] 14882: SYSTEM : FREE SPACE : Frame Buffer = 16384896 B (15 MB)
    [m3vpss ] 14882: SYSTEM : FREE SPACE : Bitstream Buffer = 280199040 B (267 MB)
    [m3vpss ] 14882: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB) - TILER ON
    [m3vpss ] 14882: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB) - TILER ON

  • ipcFramesOutVpssPrm.baseCreateParams.notifyPrevLink = FALSE;

    THis should be TRUE

    ipcFramesInHostPrm.baseCreateParams.notifyPrevLink = FALSE;

    This should be TRUE

    Also you application should have a thread to get frames from ipcFramesIn and free the frames using IpcFramesInLink_getFullVideoFrames and IpcFramesInLink_putEmptyVideoFrames

    If issue is still seen after these changes share logs of Vsys_printDetailedStatistics .Since you are directly using link APIs refer implementation of Vsys_printDetailedStatistics and send the same link cmds from your app

  • Dear Badri,

    thanks for your help.

    the problem is solved.