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.

TDA2EVM5777: Vision SDK : want to create use case with 3 camera input and output will be 3 LCD display

Part Number: TDA2EVM5777

Hi,

I would like to create use case in Vision SDK which takes input from 3 camera and will display output on 3 LCD's , please help me.

We have already explored given examples of singlecamdualdisplay and dualcamdualdisplay but they were not helpful.

Thanks,

  • Hi Rajesh,

    You can follow dual cam and dual display and add one more capture and display into it. What issue are you facing in it?

    Regards,

    Brijesh

  • Hi,

    My first question is , in dual cam dual display how can I show two LCDs (not one HDMI and one LCD) which will show the input of two different camera.

    We have also explored lcd.c file and we see there is LCD_DEVICE_INST_ID_MAX which is 2, what does that mean? meaning we can not create more than two instance.? Can we increase it's value and make it 3 ? if so what are the other changes required to support it.

    We are first trying with two camera and two lcds and then we will go for 3 camera and 3 lcds.

    Thanks,
  • Hi Rajesh,

    This is a sample example utility to configure LCDs. You could very well change it to output on two or three LCDs using different overlay managers.   

    By default, VSDK uses HDMI as output device. So you see HDMI and one of the LCD as output devices. You could add support for third LCD in your display controller tree and have three LCD outputs. 

    Regards,

    Brijesh

  • Hi,

    Thanks for your reply and just would like to inform you that we are working on this issue since one week and we have already tried to configure second LCD and also tried adding one more LCD but none of that work and it gives assertion error and location was chains_lvdsVipDualCam_DualDisplay_priv.c.

    The reason is we are not able to understand it properly, could you please guide us to add one more LCD in place of HDMI as a first step?

    Thanks,

  • Hi,
    here is the log when we change HDMI to LCD.

    [IPU1-0] 19.020435 s: dispcore/src/vpscore_dctrl.c @ Line 2082:
    [IPU1-0] 19.020527 s: Unsupported Pipe/Venc
    [IPU1-0] 19.020588 s: dispdrv/src/vpsdrv_dctrl.c @ Line 1128:
    [IPU1-0] 19.020679 s: Core control: Set pipelineconfig failed!!
    [IPU1-0] 19.020740 s: Assertion @ Line: 1199 in displayCtrlLink_drv.c: retVal == SYSTEM_LINK_STATUS_SOK : failed !!!
    [IPU1-0] 19.021259 s: Assertion @ Line: 1199 in displayCtrlLink_drv.c: retVal == SYSTEM_LINK_STATUS_SOK : failed !!!

    Thanks,
  • Hi Rajesh,

    Have you looked into the chains_common.c file in the vision sdk? This is the file which helps in creating the display controller tree, which explains how paths are connected to the VENCs and which modes are enable in the VENCS and which VENCs are used. VSDK supports only HDMI and LCD1 Venvs/Overlay manager. You need to make changes in this file to get two LCD outputs.

    Regards,
    Brijesh
  • Hi Brijesh,

    Thanks for your reply and as I said we are working on this issue since week and we already made changes in chains_common.c as you have suggested , please see the attached file for the function where we have made changes.

    But after this changes we are getting display on second LCD only, meaning the LCD which is replaced with HDMI doesn't have display.

    dual_diaplay.c
    Int32 ChainsCommon_DualDisplay_StartDisplayCtrl(
    Chains_DisplayType lcdType, UInt32 displayLCDWidth, UInt32 displayLCDHeight)
    {
        Int32 status;
        DisplayCtrlLink_ConfigParams *pPrm = &gChains_commonObj.dctrlCfgPrms;
        DisplayCtrlLink_VencInfo *pVInfo;
        DisplayCtrlLink_OvlyParams *pOvlyPrms;
        DisplayCtrlLink_OvlyPipeParams *pPipeOvlyPrms;
        DisplayCtrlLink_OvlyParams ovlyPrms[2];
    
        /* Set the link id */
        gChains_commonObj.displayCtrlLinkId = SYSTEM_LINK_ID_DISPLAYCTRL;
    
        /* Number of valid entries in vencInfo array */
        pPrm->numVencs = 2;
        /* Bitmask of tied vencs. Two vencs, which uses same pixel clock and whose vsync are synchronized, can be tied together. */
        pPrm->tiedVencs = 0;
        /* Activate the HDMI BSP layer in the Dctrl link. This is not required if there is no HDMI display in use. */
       // pPrm->deviceId = DISPLAYCTRL_LINK_USE_HDMI;
        /*
        //Configure HDMI display 
        pVInfo                                  = &pPrm->vencInfo[0];
        pVInfo->vencId                          = SYSTEM_DCTRL_DSS_VENC_HDMI;
        pVInfo->outputPort                      = SYSTEM_DCTRL_DSS_HDMI_OUTPUT;
        pVInfo->vencOutputInfo.vsPolarity       = SYSTEM_DCTRL_POLARITY_ACT_HIGH;
        pVInfo->vencOutputInfo.hsPolarity       = SYSTEM_DCTRL_POLARITY_ACT_HIGH;
    
         //Below are of dont care for EVM LCD 
        pVInfo->vencOutputInfo.fidPolarity      = SYSTEM_DCTRL_POLARITY_ACT_LOW;
        pVInfo->vencOutputInfo.actVidPolarity   = SYSTEM_DCTRL_POLARITY_ACT_HIGH;
    
         //We use 1080p60 - set to SYSTEM_STD_720P_60 for 720p! 
        pVInfo->mInfo.standard                  = SYSTEM_STD_1080P_60;
    
        // Configure HDMI overlay parameters 
        pVInfo->mode                            = 0;
        pVInfo->isInputPipeConnected[0]         = TRUE;
        pVInfo->isInputPipeConnected[1]         = FALSE;
        pVInfo->isInputPipeConnected[2]         = FALSE;
        pVInfo->isInputPipeConnected[3]         = TRUE;
        pVInfo->writeBackEnabledFlag            = FALSE;
    
        pVInfo->vencOutputInfo.dataFormat       = SYSTEM_DF_RGB24_888;
        pVInfo->vencOutputInfo.dvoFormat        = SYSTEM_DCTRL_DVOFMT_GENERIC_DISCSYNC;
        pVInfo->vencOutputInfo.videoIfWidth     = SYSTEM_VIFW_24BIT;
    
        pVInfo->vencOutputInfo.pixelClkPolarity = SYSTEM_DCTRL_POLARITY_ACT_HIGH;
        pVInfo->vencOutputInfo.aFmt             = SYSTEM_DCTRL_A_OUTPUT_MAX;
    
        pOvlyPrms                               = &ovlyPrms[0];
        pOvlyPrms->vencId                       = pVInfo->vencId;
        pOvlyPrms->deltaLinesPerPanel           = 0;
        pOvlyPrms->alphaBlenderEnable           = 0;
        pOvlyPrms->backGroundColor              = 0x0;
        pOvlyPrms->colorKeyEnable               = 1;
        pOvlyPrms->colorKeySel                  = SYSTEM_DSS_DISPC_TRANS_COLOR_KEY_SRC;
        pOvlyPrms->ovlyOptimization             = SYSTEM_DSS_DISPC_OVLY_FETCH_ALLDATA;
        pOvlyPrms->transColorKey                = DRAW2D_TRANSPARENT_COLOR;
    
        */
    
        pVInfo                                  = &pPrm->vencInfo[0];
        pVInfo->vencId                          = SYSTEM_DCTRL_DSS_VENC_LCD2;
        pVInfo->outputPort                      = SYSTEM_DCTRL_DSS_DPI2_OUTPUT;
        Vps_printf("dpi port 2 is set for lcd 2 \n");
        pVInfo->vencOutputInfo.vsPolarity       = SYSTEM_DCTRL_POLARITY_ACT_LOW;
        pVInfo->vencOutputInfo.hsPolarity       = SYSTEM_DCTRL_POLARITY_ACT_LOW;
    
        /* Below are of dont care for EVM LCD */
        pVInfo->vencOutputInfo.fidPolarity      = SYSTEM_DCTRL_POLARITY_ACT_LOW;
        pVInfo->vencOutputInfo.actVidPolarity   = SYSTEM_DCTRL_POLARITY_ACT_LOW;
    
        pVInfo->mInfo.standard                  = SYSTEM_STD_CUSTOM;
        pVInfo->mInfo.scanFormat                = SYSTEM_SF_PROGRESSIVE;
        pVInfo->mInfo.width                     = 800;
        pVInfo->mInfo.height                    = 480;
    
        //if(lcdType == CHAINS_DISPLAY_TYPE_LCD_7_INCH)
        //{
        pVInfo->mInfo.pixelClock                = 29232u;
        pVInfo->mInfo.fps                       = 60U;
        pVInfo->mInfo.hFrontPorch               = 40u;
        pVInfo->mInfo.hBackPorch                = 40u;
        pVInfo->mInfo.hSyncLen                  = 48u;
        pVInfo->mInfo.vFrontPorch               = 13u;
        pVInfo->mInfo.vBackPorch                = 29u;
        pVInfo->mInfo.vSyncLen                  = 3u;
        pVInfo->vencDivisorInfo.divisorLCD      = 1;
        pVInfo->vencDivisorInfo.divisorPCD      = 4;
        //}
        
        /* Configure LCD overlay params */
        pVInfo->mode = 0;
        pVInfo->isInputPipeConnected[0]         = TRUE;
        pVInfo->isInputPipeConnected[1]         = FALSE;
        pVInfo->isInputPipeConnected[2]         = FALSE;
        pVInfo->isInputPipeConnected[3]         = TRUE;
        pVInfo->writeBackEnabledFlag            = FALSE;
    
        pVInfo->vencOutputInfo.dataFormat       = SYSTEM_DF_RGB16_565;
        pVInfo->vencOutputInfo.dvoFormat        = SYSTEM_DCTRL_DVOFMT_GENERIC_DISCSYNC;
        pVInfo->vencOutputInfo.videoIfWidth     = SYSTEM_VIFW_16BIT;
    
        pVInfo->vencOutputInfo.pixelClkPolarity = SYSTEM_DCTRL_POLARITY_ACT_HIGH;
        pVInfo->vencOutputInfo.aFmt             = SYSTEM_DCTRL_A_OUTPUT_MAX;
    
        pOvlyPrms                               = &ovlyPrms[0];
        pOvlyPrms->vencId                       = pVInfo->vencId;
        pOvlyPrms->deltaLinesPerPanel           = 0;
        pOvlyPrms->alphaBlenderEnable           = 0;
        pOvlyPrms->backGroundColor              = 0x0;
        pOvlyPrms->colorKeyEnable               = 1;
        pOvlyPrms->colorKeySel                  = SYSTEM_DSS_DISPC_TRANS_COLOR_KEY_SRC;
        pOvlyPrms->ovlyOptimization             = SYSTEM_DSS_DISPC_OVLY_FETCH_ALLDATA;
        pOvlyPrms->transColorKey                = DRAW2D_TRANSPARENT_COLOR;
    
        /* Configure LCD */
        pVInfo                                  = &pPrm->vencInfo[1];
        pVInfo->vencId                          = SYSTEM_DCTRL_DSS_VENC_LCD1;
        pVInfo->outputPort                      = SYSTEM_DCTRL_DSS_DPI1_OUTPUT;
    
        if ((BSP_PLATFORM_SOC_ID_TDA2EX == Bsp_platformGetSocId()) &&
            (BSP_PLATFORM_PACKAGE_TYPE_17x17 == Bsp_platformGetPackageType()))
        {
            /* In case of TDA2EX and Package is 17 X 17, LCD is on DPI 3 */
            pVInfo->vencId = SYSTEM_DCTRL_DSS_VENC_LCD3;
            pVInfo->outputPort = SYSTEM_DCTRL_DSS_DPI3_OUTPUT;
        }
    
        pVInfo->vencOutputInfo.vsPolarity       = SYSTEM_DCTRL_POLARITY_ACT_LOW;
        pVInfo->vencOutputInfo.hsPolarity       = SYSTEM_DCTRL_POLARITY_ACT_LOW;
    
        /* Below are of dont care for EVM LCD */
        pVInfo->vencOutputInfo.fidPolarity      = SYSTEM_DCTRL_POLARITY_ACT_HIGH;
        pVInfo->vencOutputInfo.actVidPolarity   = SYSTEM_DCTRL_POLARITY_ACT_HIGH;
    
        pVInfo->mInfo.standard                  = SYSTEM_STD_CUSTOM;
        pVInfo->mInfo.scanFormat                = SYSTEM_SF_PROGRESSIVE;
        pVInfo->mInfo.width                     = displayLCDWidth;
        pVInfo->mInfo.height                    = displayLCDHeight;
    
        if(lcdType == CHAINS_DISPLAY_TYPE_LCD_7_INCH)
        {
        pVInfo->mInfo.pixelClock                = 29232u;
        pVInfo->mInfo.fps                       =   60U;
        pVInfo->mInfo.hFrontPorch               = 40u;
        pVInfo->mInfo.hBackPorch                = 40u;
        pVInfo->mInfo.hSyncLen                  = 48u;
        pVInfo->mInfo.vFrontPorch               = 13u;
        pVInfo->mInfo.vBackPorch                = 29u;
        pVInfo->mInfo.vSyncLen                  = 3u;
        pVInfo->vencDivisorInfo.divisorLCD      = 1;
        pVInfo->vencDivisorInfo.divisorPCD      = 4;
        }
        else if(lcdType == CHAINS_DISPLAY_TYPE_LCD_10_INCH)
        {
            pVInfo->mInfo.pixelClock                =   74500U;
            pVInfo->mInfo.fps                       =   60U;
            pVInfo->mInfo.hBackPorch                =   80U;
            pVInfo->mInfo.hSyncLen                  =   62U;
            pVInfo->mInfo.hFrontPorch               =   48U;
            pVInfo->mInfo.vBackPorch                =   12U;
            pVInfo->mInfo.vSyncLen                  =   35U;
            pVInfo->mInfo.vFrontPorch               =   6U;
            pVInfo->vencDivisorInfo.divisorLCD      =   1;
            pVInfo->vencDivisorInfo.divisorPCD      =   1;
        }
        else if (lcdType ==
        CHAINS_DISPLAY_TYPE_LDC_10_INCH_LCDCTRL_TC358778_MIPI_DSI_1920_1200)
        {
            pVInfo->mInfo.pixelClock                =   147000U;
            pVInfo->mInfo.fps                       =   60U;
            pVInfo->mInfo.hBackPorch                =   30U;
            pVInfo->mInfo.hSyncLen                  =   16U;
            pVInfo->mInfo.hFrontPorch               =   32U;
            pVInfo->mInfo.vBackPorch                =   16U;
            pVInfo->mInfo.vSyncLen                  =   2U;
            pVInfo->mInfo.vFrontPorch               =   7U;
            pVInfo->vencDivisorInfo.divisorLCD      =   1;
            pVInfo->vencDivisorInfo.divisorPCD      =   1;
        }
        else
            UTILS_assert(NULL);
    
        /* Configure LCD overlay params */
        pVInfo->mode = 0;
        pVInfo->isInputPipeConnected[0]         = FALSE;
        pVInfo->isInputPipeConnected[1]         = TRUE;
        pVInfo->isInputPipeConnected[2]         = TRUE;
        pVInfo->isInputPipeConnected[3]         = FALSE;
        pVInfo->writeBackEnabledFlag            = FALSE;
    
        pVInfo->vencOutputInfo.dataFormat       = SYSTEM_DF_RGB16_565;
        pVInfo->vencOutputInfo.dvoFormat        = SYSTEM_DCTRL_DVOFMT_GENERIC_DISCSYNC;
        pVInfo->vencOutputInfo.videoIfWidth     = SYSTEM_VIFW_16BIT;
    
        pVInfo->vencOutputInfo.pixelClkPolarity = SYSTEM_DCTRL_POLARITY_ACT_LOW;
        pVInfo->vencOutputInfo.aFmt             = SYSTEM_DCTRL_A_OUTPUT_MAX;
    
        pOvlyPrms                               = &ovlyPrms[1];
        pOvlyPrms->vencId                       = pVInfo->vencId;
        pOvlyPrms->deltaLinesPerPanel           = 0;
        pOvlyPrms->alphaBlenderEnable           = 0;
        pOvlyPrms->backGroundColor              = 0x0;
        pOvlyPrms->colorKeyEnable               = 1;
        pOvlyPrms->colorKeySel                  = SYSTEM_DSS_DISPC_TRANS_COLOR_KEY_SRC;
        pOvlyPrms->ovlyOptimization             = SYSTEM_DSS_DISPC_OVLY_FETCH_ALLDATA;
        pOvlyPrms->transColorKey                = DRAW2D_TRANSPARENT_COLOR;
    
        /* Setting HDMI overlay pipe parameters */
        pPipeOvlyPrms                           = &gChains_commonObj.pipeParams[0];
        pPipeOvlyPrms->pipeLine                 = SYSTEM_DSS_DISPC_PIPE_VID1;
        pPipeOvlyPrms->globalAlpha              = 0xFF;
        pPipeOvlyPrms->preMultiplyAlpha         = 0;
        pPipeOvlyPrms->zorderEnable             = TRUE;
        pPipeOvlyPrms->zorder                   = SYSTEM_DSS_DISPC_ZORDER0;
    
        /* Setting LCD overlay pipe parameters */
        pPipeOvlyPrms                           = &gChains_commonObj.pipeParams[1];
        pPipeOvlyPrms->pipeLine                 = SYSTEM_DSS_DISPC_PIPE_VID2;
        pPipeOvlyPrms->globalAlpha              = 0xFF;
        pPipeOvlyPrms->preMultiplyAlpha         = 0;
        pPipeOvlyPrms->zorderEnable             = TRUE;
        pPipeOvlyPrms->zorder                   = SYSTEM_DSS_DISPC_ZORDER0;
    
        /* Setting PIP overlay pipe parameters on LCD */
        pPipeOvlyPrms                           = &gChains_commonObj.pipeParams[2];
        pPipeOvlyPrms->pipeLine                 = SYSTEM_DSS_DISPC_PIPE_VID3;
        pPipeOvlyPrms->globalAlpha              = 0xFF;
        pPipeOvlyPrms->preMultiplyAlpha         = 0;
        pPipeOvlyPrms->zorderEnable             = TRUE;
        pPipeOvlyPrms->zorder                   = SYSTEM_DSS_DISPC_ZORDER2;
    
        /* Configure graphics overlay for HDMI */
        pPipeOvlyPrms                           = &gChains_commonObj.pipeParams[3];
        pPipeOvlyPrms->pipeLine                 = SYSTEM_DSS_DISPC_PIPE_GFX1;
        pPipeOvlyPrms->globalAlpha              = 0xFF;
        pPipeOvlyPrms->preMultiplyAlpha         = 0;
        pPipeOvlyPrms->zorderEnable             = TRUE;
        pPipeOvlyPrms->zorder                   = SYSTEM_DSS_DISPC_ZORDER3;
    
    /* Create, configure and start the Display Ctrl link */
        status = System_linkCreate(gChains_commonObj.displayCtrlLinkId,
                                    NULL,
                                    0);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        status = System_linkControl(gChains_commonObj.displayCtrlLinkId,
                                    DISPLAYCTRL_LINK_CMD_SET_CONFIG,
                                    &gChains_commonObj.dctrlCfgPrms,
                                    sizeof(DisplayCtrlLink_ConfigParams),
                                    TRUE);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        status = System_linkControl(gChains_commonObj.displayCtrlLinkId,
                                    DISPLAYCTRL_LINK_CMD_SET_OVLY_PARAMS,
                                    &ovlyPrms[0],
                                    sizeof(DisplayCtrlLink_OvlyParams),
                                    TRUE);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        status = System_linkControl(gChains_commonObj.displayCtrlLinkId,
                                    DISPLAYCTRL_LINK_CMD_SET_OVLY_PARAMS,
                                    &ovlyPrms[1],
                                    sizeof(DisplayCtrlLink_OvlyParams),
                                    TRUE);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        status = System_linkControl(gChains_commonObj.displayCtrlLinkId,
                                    DISPLAYCTRL_LINK_CMD_SET_OVLY_PIPELINE_PARAMS,
                                    &gChains_commonObj.pipeParams[0],
                                    sizeof(DisplayCtrlLink_OvlyPipeParams),
                                    TRUE);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        status = System_linkControl(gChains_commonObj.displayCtrlLinkId,
                                    DISPLAYCTRL_LINK_CMD_SET_OVLY_PIPELINE_PARAMS,
                                    &gChains_commonObj.pipeParams[1],
                                    sizeof(DisplayCtrlLink_OvlyPipeParams),
                                    TRUE);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        status = System_linkControl(gChains_commonObj.displayCtrlLinkId,
                                    DISPLAYCTRL_LINK_CMD_SET_OVLY_PIPELINE_PARAMS,
                                    &gChains_commonObj.pipeParams[2],
                                    sizeof(DisplayCtrlLink_OvlyPipeParams),
                                    TRUE);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        status = System_linkControl(gChains_commonObj.displayCtrlLinkId,
                                    DISPLAYCTRL_LINK_CMD_SET_OVLY_PIPELINE_PARAMS,
                                    &gChains_commonObj.pipeParams[3],
                                    sizeof(DisplayCtrlLink_OvlyPipeParams),
                                    TRUE);
        UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    
        return status;
    }
    

  • Hi Rajesh,


    As discussed over the call, please check the pinmux settings for DPI1, DPI2 and DPI3 outputs. It seems that driver does not support configuring pinmux for DPI2 and DPI3. In this case, you require to add code to configure pinmux. You could directly change pinmux in the usecase file. Lets check after changing pinmux for all three LCDs. Also after changing, if you see black background color on the LCD, DSS is outputting correctly. you will need to now connect video pipelines to the overlay managers.

    Rgds,
    Brijesh