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.

About display with VGA(tied with DVO2)

Hi,everyone!

I use dvrrdk3.0,and board is custom baord.

with its, i wanna display with VGA(tied with dvo2).

my code is the following,its result unnormal

    Both VGA and HDMI output has video sigal, however, vga and hdmi have no video data to display on the monitor.

 

Note

1. the output log is as follows

2.the following pictures are the result of my code.

Questions:

1.Is there something wrong with my code?

2.My Final Goal: display two different video output, one is HDMI, the othe is HDCOMP(VGA),so how to configure HDCOMP(tied with DVO2)?

Appreciate for any reply!

=================================my code=============================================
Int32 Chains_displayCtrlInit_test(void)
{

    Int32   status, i;

    VDIS_PARAMS_S prm;

    Vdis_params_init(&prm);


    for (i = 0; i < SYSTEM_DC_MAX_VENC; i++)
    {
        prm.deviceParams[i].resolution = VSYS_STD_1080P_60;
    }
    /* Setting SD resolution for SD VENC */
    prm.deviceParams[SYSTEM_DC_VENC_SD].resolution = VSYS_STD_NTSC;

    prm.deviceParams[SYSTEM_DC_VENC_HDMI].enable = FALSE;
    prm.deviceParams[SYSTEM_DC_VENC_DVO2].enable = TRUE;
    prm.deviceParams[SYSTEM_DC_VENC_HDCOMP].enable = FALSE;
    prm.deviceParams[SYSTEM_DC_VENC_SD].enable = FALSE;

    //Vdis_tiedVencInit(VDIS_DEV_HDCOMP, VDIS_DEV_HDMI, &prm);

    prm.enableConfigExtVideoEncoder = TRUE;
    prm.enableConfigExtThsFilter = FALSE;
    prm.enableEdgeEnhancement = FALSE;
    prm.numChannels = 1;
    prm.numUserChannels = 1;

    status = System_linkControl(
        SYSTEM_LINK_ID_M3VPSS,
        SYSTEM_M3VPSS_CMD_GET_DISPLAYCTRL_INIT,
        &prm,
        sizeof(prm),
        TRUE
        );
    UTILS_assert(status==OSA_SOK);
    return status;


}
Int32 Chains_displayCtrlDeInit_test()
{
    Int32 status;

    status = System_linkControl(
        SYSTEM_LINK_ID_M3VPSS,
        SYSTEM_M3VPSS_CMD_GET_DISPLAYCTRL_DEINIT,
        NULL,
        0,
        TRUE
        );
    UTILS_assert(status==OSA_SOK);

    return status;
}

int Layout_setInit()
{
    SwMsLink_LayoutPrm prm = { 0 };
    prm.outputFPS = 30;
    prm.numWin = 1;
    SwMsLink_LayoutWinInfo *info = &(prm.winInfo[0]);
    info->channelNum    = 0;
    info->startX        = 0;
    info->startY        = 0;
    info->width         = dis_width;
    info->height        = dis_height;
    info->bypass        = TRUE;
    return System_linkControl(id_swms, SYSTEM_SW_MS_LINK_CMD_SWITCH_LAYOUT, &prm, sizeof(prm), TRUE);
}

static void Chains_capDisp()
{
    printf("========>%s\n", __func__);
    NullSrcLink_CreateParams            srcPrm;
    SwMsLink_CreateParams               swMsPrm;
    DisplayLink_CreateParams            displayPrm;

    UInt32 srcId, displayId, swMsId;
    Int32 linkStatus, ret;

    srcId               = SYSTEM_VPSS_LINK_ID_NULL_SRC_0;
    swMsId              = SYSTEM_LINK_ID_SW_MS_MULTI_INST_0;
    displayId           = SYSTEM_LINK_ID_DISPLAY_1;

    //CHAINS_INIT_STRUCT(DisplayLink_CreateParams,displayPrm);
    DisplayLink_CreateParams_Init(&displayPrm);
    SwMsLink_CreateParams_Init(&swMsPrm);

    //src param init
    srcPrm.tilerEnable = FALSE;
    srcPrm.outQueParams.nextLink = swMsId;
    srcPrm.timerPeriod          = 33;
    srcPrm.inputInfo.numCh          = 1;
    for(Int32 i=0; i<srcPrm.inputInfo.numCh; i++)
    {
        System_LinkChInfo *pChInfo;
        pChInfo = &srcPrm.inputInfo.chInfo[i];
        pChInfo->dataFormat = SYSTEM_DF_YUV420SP_UV;
        pChInfo->memType    = SYSTEM_MT_TILEDMEM;
        pChInfo->width      = 1920;
        pChInfo->height     = 1080;
        pChInfo->scanFormat = SYSTEM_SF_PROGRESSIVE;
        //pChInfo->scanFormat = SYSTEM_SF_INTERLACED;
        pChInfo->pitch[0]   = SystemUtils_align(pChInfo->width+pChInfo->startX,
            SYSTEM_BUFFER_ALIGNMENT);
        pChInfo->pitch[1]   = pChInfo->pitch[0];
        pChInfo->pitch[2]   = 0;
        printf("pitch[0]=%d, pitch[1]=%d\n", pChInfo->pitch[0], pChInfo->pitch[1]);
    }

    /* swMs */
    {
        swMsPrm.inQueParams.prevLinkId      = srcId;
        swMsPrm.inQueParams.prevLinkQueId   = 0;
        swMsPrm.outQueParams.nextLink       = displayId;

        swMsPrm.numSwMsInst                 = 1;
        swMsPrm.swMsInstId[0]               = SYSTEM_SW_MS_SC_INST_DEI_SC;  // SYSTEM_SW_MS_SC_INST_SC5
        swMsPrm.lineSkipMode                = FALSE;
        swMsPrm.enableLayoutGridDraw        = FALSE;
        swMsPrm.layoutPrm.outputFPS         = 30;
        swMsPrm.maxInputQueLen              = SYSTEM_SW_MS_DEFAULT_INPUT_QUE_LEN;
        swMsPrm.numOutBuf                   = 0;
        swMsPrm.maxOutRes                   = VSYS_STD_1080P_60;
        swMsPrm.swMsInstStartWin[0]         = 0;
    }

    /* disp */
    {
        displayPrm.displayRes                   = VSYS_STD_1080P_60;
        displayPrm.numInputQueues               = 1;
        displayPrm.activeQueue                  = 0;
        displayPrm.inQueParams[0].prevLinkId    = swMsId;
        displayPrm.inQueParams[0].prevLinkQueId = 0;
        displayPrm.forceFieldSeparatedInputMode = FALSE;
        /* init hdmi disp */
        Chains_displayCtrlInit_test();

    }

    //link create 
    linkStatus = System_linkCreate(srcId, &srcPrm, sizeof(srcPrm));
    UTILS_assert(linkStatus == ERROR_NONE);

    linkStatus = System_linkCreate(swMsId, &swMsPrm, sizeof(swMsPrm));
    UTILS_assert(linkStatus == ERROR_NONE);
 
    Layout_setInit();

    linkStatus = System_linkCreate(displayId, &displayPrm, sizeof(displayPrm));
    UTILS_assert(linkStatus == ERROR_NONE);

    //Chains_memPrintHeapStatus();

    //link start
    System_linkStart(displayId);
    System_linkStart(swMsId);
    System_linkStart(srcId);


    Int8 ch;

    while(1)
    {
        ch = Chains_menuRunTime();
        if(ch=='0'){
            printf("**** QUIT ****\n");
            break;
        }else if (ch == 'p'){
            printf("****detail****\n");
            Vsys_printDetailedStatistics();
        }

    }

    //link stop
    printf("**** 1.stop link ****\n");
    linkStatus = System_linkStop(srcId);
    UTILS_assert(linkStatus == ERROR_NONE);

    linkStatus = System_linkStop(swMsId);
    UTILS_assert(linkStatus == ERROR_NONE);

    linkStatus = System_linkStop(displayId);
    UTILS_assert(linkStatus == ERROR_NONE);

    //link delete
    linkStatus = System_linkDelete(srcId);
    UTILS_assert(linkStatus == ERROR_NONE);
    linkStatus = System_linkDelete(swMsId);
    UTILS_assert(linkStatus == ERROR_NONE);
    linkStatus = System_linkDelete(displayId);
    UTILS_assert(linkStatus == ERROR_NONE);

    Chains_displayCtrlDeInit_test();

    return ;
}

//cap disp test
int main(void)
{
    //system init
    int ret = System_init();
    if (0 != ret)
    {
        fprintf(stderr, "System_init failed, return %d\n", ret);
        return -1;
    }

    Chains_capDisp();

    ret = System_deInit();
    if (0 != ret){
        fprintf(stderr, "System_deInit failed, return %d\n", ret);
        return -1;
    }
		
		return 0;

}

----------------------The actual results:

-------------The output log:

0525.cap_disp_log.txt
root@dm816x:~/lywDir# ./disTest
 0: SYSTEM: System Common Init in progress !!!
 0: SYSTEM: IPC init in progress !!!
 17: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
 19: SYSTEM: Creating MsgQ [HOST_MSGQ] ...
 21: SYSTEM: Creating MsgQ [HOST_ACK_MSGQ] ...
 22: SYSTEM: Opening MsgQ [DSP_MSGQ] ...
 23: SYSTEM: Opening MsgQ [VIDEO-M3_MSGQ] ...
 23: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
 24: SYSTEM: Notify register to [DSP] line 0, event 15 ... 
 25: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ... 
 25: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ... 
 25: SYSTEM: IPC init DONE !!!
 27: SYSTEM: Creating ListMP [HOST_IPC_OUT_24] in region 0 ...
 29: SYSTEM: Creating ListMP [HOST_IPC_IN_24] in region 0 ...
 31: SYSTEM: ListElem Shared Addr = 0x2b068080
 32: SYSTEM: Creating ListMP [HOST_IPC_OUT_25] in region 0 ...
 34: SYSTEM: Creating ListMP [HOST_IPC_IN_25] in region 0 ...
 36: SYSTEM: ListElem Shared Addr = 0x2b085b80
 37: SYSTEM: Creating ListMP [HOST_IPC_OUT_19] in region 0 ...
 40: SYSTEM: Creating ListMP [HOST_IPC_IN_19] in region 0 ...
 41: SYSTEM: ListElem Shared Addr = 0x2b0a3680
 43: SYSTEM: Creating ListMP [HOST_IPC_OUT_20] in region 0 ...
 45: SYSTEM: Creating ListMP [HOST_IPC_IN_20] in region 0 ...
 47: SYSTEM: ListElem Shared Addr = 0x2b0c3080
 48: SYSTEM: Creating ListMP [HOST_IPC_OUT_21] in region 0 ...
 50: SYSTEM: Creating ListMP [HOST_IPC_IN_21] in region 0 ...
 52: SYSTEM: ListElem Shared Addr = 0x2b0e2a80
 68: SYSTEM: System Common Init Done !!!
********************************Chains_capDisp
pitch[0]=1920, pitch[1]=1920
 [m3vpss ]  94762: HDMI: Starting HDMI Transmitter ... !!!
 [m3vpss ] System_hdmiCreate: Error 0 @ line 224
 [m3vpss ] System_hdmiStart: Error -2 @ line 248
 [m3vpss ]  94762: NULL_SRC: Create in progress !!!
 [m3vpss ]  94791: NULL_SRC: Create Done !!!
 [m3vpss ]  94792: SWMS: Create in progress !!!
 [m3vpss ] pChInfo->width = 1920, pChInfo->height = 1080
 [m3vpss ]  UTILS: DMA: Allocated CH (TCC) = 58 (58)
 [m3vpss ] SWMS: instance 0, sc id 2, start win 0 end win 17
 [m3vpss ]  94890: SWMS    : VipScReq is FALSE!!!
 [m3vpss ]  95426: SWMS0    : Loading Vertical Co-effs (UPSCALE)x ... 
 [m3vpss ]  95426: SWMS0    : Loading Horizontal Co-effs (UPSCALE)x ... 
 [m3vpss ]  95426: SWMS    : Co-effs Loading ... DONE !!!
 [m3vpss ]  95426: SWMS    : VipScReq is FALSE!!!
 [m3vpss ] AVSYNC:WARNING!! Application wrongly configureddisplayID[-1]. Reseting to correct displayID[1]
 [m3vpss ]  95430: SWMS    : ******* Configuring clock 33 secs... 
 [m3vpss ]  95430: SWMS0    : Loading Vertical Co-effs (UPSCALE)x ... 
 [m3vpss ]  95430: SWMS0    : Loading Horizontal Co-effs (UPSCALE)x ... 
 [m3vpss ]  95430: SWMS    : Co-effs Loading ... DONE !!!
 [m3vpss ]  95430: SWMS0    : Loading Vertical Co-effs (UPSCALE)x ... 
 [m3vpss ]  95430: SWMS0    : Loading Horizontal Co-effs (UPSCALE)x ... 
 [m3vpss ]  95430: SWMS    : Co-effs Loading ... DONE !!!
 [m3vpss ]  
 [m3vpss ]  *** [SWMS0] Mosaic Parameters *** 
 [m3vpss ]  
 [m3vpss ]  Output FPS: 30
 [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 ]  
 [m3vpss ] SWMS:HEAPID:0        USED:424
 [m3vpss ] SWMS:HEAPID:1        USED:26144
 [m3vpss ] SWMS:HEAPID:4        USED:136857600
 [m3vpss ]  95431: SWMS: Create Done !!!
 [m3vpss ]  95432: SWMS    : ******* Configuring clock 33 secs... 
 [m3vpss ]  95432: SWMS0    : Loading Vertical Co-effs (UPSCALE)x ... 
 [m3vpss ]  95432: SWMS0    : Loading Horizontal Co-effs (UPSCALE)x ... 
 [m3vpss ]  95432: SWMS    : Co-effs Loading ... DONE !!!
 [m3vpss ]  95432: SWMS0    : Loading Vertical Co-effs (UPSCALE)x ... 
 [m3vpss ]  95432: SWMS0    : Loading Horizontal Co-effs (UPSCALE)x ... 
 [m3vpss ]  95432: SWMS    : Co-effs Loading ... DONE !!!
 [m3vpss ]  
 [m3vpss ]  *** [SWMS0] Mosaic Parameters *** 
 [m3vpss ]  
 [m3vpss ]  Output FPS: 30
 [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 |  1920 /  1920 | NON-TILED   |    0,    0 |  1920 x   1080 |  3840 /      0 | NON-TILED   |      ON  |    0 |  420SP |   OFF |
 [m3vpss ]  
 [m3vpss ]  95433: DISPLAY: Create in progress !!!
 [m3vpss ]  95434: DISPLAY: 1: Window size 1920x1080, 3840B
 [m3vpss ]  95434: DISPLAY: Create Done !!!
 [m3vpss ]  95435: DISPLAY: Start in progress !!!

 ====================
 Chains Run-time Menu
 ====================

 0: Stop Chain
 
 Enter Choice:  [m3vpss ]  95495: DISPLAY: Start Done !!!
 [m3vpss ]  95495: DISPLAY: DVO2(BP1)  : 33 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 255 / 0 ) !!! 
 [m3vpss ]  95495: SWMS: Start in Progress !!!
 [m3vpss ]  95496: SWMS: Start Done !!!
 [m3vpss ]  95496: NULL_SRC: Start Done !!!


 ====================
 Chains Run-time Menu
 ====================

 0: Stop Chain
 
 Enter Choice: 0
**** QUIT ****
**** 1.stop link ****
 [m3vpss ]  157598: NULL_SRC: Stop Done !!!
 [m3vpss ]  157598: SWMS: Stop in Progress !!!
 [m3vpss ]  157598: SWMS: Stop Done !!!
 [m3vpss ]  157598: DISPLAY: Stop in progress !!!
 62976: SYSTEM: System Common De-Init in progress !!!

 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress... [m3vpss ]  157662: DISPLAY: Stop Done !!!
 [m3vpss ]  157662: NULL_SRC: Delete in progress !!!
 [m3vpss ]  157662: NULL_SRC: Delete Done !!!
 [m3vpss ]  157663: SWMS: Frames = 1879 (fps = 90) !!!
 [m3vpss ]  157663: SWMS: Delete in progress !!!
 [m3vpss ]  UTILS: DMA: Free'ed CH (TCC) = 58 (58)
 [m3vpss ]  157665: SWMS: Delete Done !!!
 [m3vpss ]  157666: DISPLAY: Frames = 1879 (fps = 30) !!!
 [m3vpss ]  157666: DISPLAY: Delete in progress !!!
 [m3vpss ]  157666: DISPLAY: Delete Done !!!
 [m3vpss ]  157666: HDMI: Stopping HDMI Transmitter ... !!!
 [m3vpss ] System_hdmiStop: Error -2 @ line 272
 [m3vpss ]  157667: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 0, HDDAC(BP0) 0, DVO2(BP1) 0, SDDAC(SEC1) 1 

 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress...
 [host] OSA_tskDelete:In progress... 62982: SYSTEM: IPC de-init in progress !!!
 63013: SYSTEM: IPC de-init DONE !!!
 63013: SYSTEM: System Common De-Init Done !!!
root@dm816x:~/lywDir# 
root@dm816x:~/lywDir# 
root@dm816x:~/lywDir# 
root@dm816x:~/lywDir#