• Resolved

TDA2HG: [TDA2HG] Displayout yuv422 over LVDS

Expert 2375 points

Replies: 5

Views: 105

Part Number: TDA2HG

Hello:

SDK:

 VisionSDK 3.05

Display data flow :

QT-APP -->weston(RGB)-->VDRM -->dispaly_m4-->lvds(yuv422)

  •     displaytype
gChains_usecaseCfg.displayType = CHAINS_DISPLAY_TYPE_LCD_10_INCH;

    else if(displayType == CHAINS_DISPLAY_TYPE_LCD_10_INCH)
    {
        pPrm->deviceId = DISPLAYCTRL_LINK_USE_LCD;
        pVInfo->vencId = SYSTEM_DCTRL_DSS_VENC_LCD1;
        pVInfo->outputPort = SYSTEM_DCTRL_DSS_DPI1_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.width                     =   displayWidth;
        pVInfo->mInfo.height                    =   displayHeight;
        pVInfo->mInfo.scanFormat                =   SYSTEM_SF_PROGRESSIVE;
        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;

        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_LOW;
        pVInfo->vencOutputInfo.aFmt             =   SYSTEM_DCTRL_A_OUTPUT_MAX;

        /* Configure overlay params */

        ovlyPrms->vencId                       = SYSTEM_DCTRL_DSS_VENC_LCD1;

  • vdrm in dts

      

                vdrm0: vdrm@0 {
                        compatible = "ti,dra7-vdrm";
                        vdrm0_crtc0: crtc@0 {
                                compatible = "ti,dra7-vdrm-crtc";
                                x-res = <1280>;
                                y-res = <720>;
                                refresh = <60>;
                                supported-formats = <DT_DRM_FORMAT_XRGB8888 DT_DRM_FORMAT_ARGB8888>;
                        };
                };

  sprintf((char *)pUcObj->DispDistSrc_westonPrm.vDrmControllerName,
          V_CONTROLLER_NAME);
  pUcObj->DispDistSrc_westonPrm.vDrmControllerObjectId = VDRM_CRTC;
  pUcObj->DispDistSrc_westonPrm.vDrmControllerObjectType =
      DISP_DIST_SRC_LINK_DRM_OBJECT_TYPE_CRTC;
  pUcObj->DispDistSrc_westonPrm.width = displayWidth;
  pUcObj->DispDistSrc_westonPrm.height = displayHeight;
  pUcObj->DispDistSrc_westonPrm.format = SYSTEM_DF_BGRX24_8888;

  DisplayLink_CreateParams *pPrm_display;

  pPrm_display = &pUcObj->Display_m4Prm;
  pPrm_display->rtParams.tarWidth = displayWidth;
  pPrm_display->rtParams.tarHeight = displayHeight;
  pPrm_display->rtParams.posX = 0;
  pPrm_display->rtParams.posY = 0;
  pPrm_display->displayId = DISPLAY_LINK_INST_DSS_VID1;
  ChainsCommon_SetDisplayPrms(&pUcObj->Display_m4Prm, NULL,
                              pObj->chainsCfg->displayType, displayWidth,
                              displayHeight);

and the document(PROCESSOR_SDK_VISION_03_07_00_00_Docs_Only/docs/TrainingSlides/Video_Drivers_Overview.pdf) say for video pipeline it can do color space conversion.

Question

  1. in this case, how we can directly output the RGB to yuv over LVDS
  2. or configure the weston output to yuv422
  3. Can we set pVInfo->vencOutputInfo.dataFormat = SYSTEM_DF_YUV422I_YUYV

Thanks.

  • Weston cannot produce YUV output. If you need to convert RGB weston output to YUV you will need to use writeback pipeline for color space conversion

  • In reply to Subhajit Paul:

    Hi:

       Thanks, we found there is only one usecase with DSSM2MWB link.

      one more question is that:

      In my case how could we to set the 

      

      pUcObj->DssM2mWbPrm.enableOut = TRUE;
      pUcObj->DssM2mWbPrm.wbInNode = ????
      pUcObj->DssM2mWbPrm.numInPipeLines = 1U;
      pUcObj->DssM2mWbPrm.inPipelines[0U] = ???

    sample code from usecases\avbrx_sv_display_avbtx

      /* DSS M2M WB link */
      pUcObj->DssM2mWbPrm.enableOut = TRUE;
      pUcObj->DssM2mWbPrm.wbInNode = DSSM2MWBLINK_DISPC_WB_IN_NODE_LCD2;
      pUcObj->DssM2mWbPrm.numInPipeLines = 1U;
      pUcObj->DssM2mWbPrm.inPipelines[0U] = DSSM2MWBLINK_DISPC_PIPE_VID3;
      
      /* input pipeline parameters */
      pUcObj->DssM2mWbPrm.inTarWidth[0U] = CAPTURE_SENSOR_WIDTH;
      pUcObj->DssM2mWbPrm.inTarHeight[0U] = CAPTURE_SENSOR_HEIGHT;
      pUcObj->DssM2mWbPrm.inPosX[0U] = 0U;
      pUcObj->DssM2mWbPrm.inPosY[0U] = 0U;
      
      /* The overlay width and height are used only if 'wbInNode' is overlay node */
      pUcObj->DssM2mWbPrm.ovlyWidth = CAPTURE_SENSOR_WIDTH;
      pUcObj->DssM2mWbPrm.ovlyHeight = CAPTURE_SENSOR_HEIGHT;
      
      /* Output parameters */
      /* Input format is ARGB32 and output format is SYSTEM_DF_YUV422I_UYVY */
      pUcObj->DssM2mWbPrm.outDataFmt = SYSTEM_DF_YUV422I_UYVY;
      pUcObj->DssM2mWbPrm.outWidth = CAPTURE_SENSOR_WIDTH;
      pUcObj->DssM2mWbPrm.outHeight = CAPTURE_SENSOR_HEIGHT;

  • In reply to Subhajit Paul:

    Hi :

      There is little document to introduce the DSSM2M link, we make the usecase as following

    DispDistSrc_weston -> DssM2mWb->Null(A15)

     2 issues:

    • if set the weston data format as SYSTEM_DF_BGRX24_8888, the DSSm2m  failed to initiate as not support SYSTEM_DF_BGRX24_8888
    • if set the weson data format as SYSTEM_DF_ARGB32_8888, the dispdist link can caputre the data from the vdram, but not send out the new data as format is not matched
            if(nb->valid)
            {Vps_printf("DispDistSrcLink_processEvent valid \n");
                if(nb->width == width && nb->height == height &&
                        DispDistSrcLink_toSystemDataFormat(nb->drm_format) == format &&
                        nb->pitches[0] == stride0 &&
                        nb->pitches[1] == stride1 &&
                        nb->pitches[2] == stride2)
                {
                    DispDistSrcLink_sendNewBuffer(pObj, nb);
                }
    
    •   what's the mean as m2m of DSSM2M, as the TRM say that the writeback pipeline input is VIDx pipe or LCDx, and why it can accept the resource from other link?

    any suggestion?

  • In reply to Subhajit Paul:

    hi:

      for fully solution, the proposed data flow would be

    which links should be used?

    thanks~~~

  • In reply to Subhajit Paul:

    HI:

      some feedback from FAE(shanghai), we should use capture link to implement this.

      close it