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.

Linux/TMS320DM8148: How do I display YUV422I_UYVY data?

Part Number: TMS320DM8148

Tool/software: Linux

Hi,

I'm using DVR RDK 4.01.  The SWMS create is done if I use YUV422I_YUYV but the image displayed is pink/green.  I switched the channel info data format to YUV422I_UYVY but the SWMS create hangs.  Here's the log:

SWMS: Create in progress !!!
UTILS: DMA: Allocated CH (TCC) = 59 (59)
UTILS: DMA: 0 of 1: Allocated PaRAM = 59 (0x49004760)
SWMS: instance 0, sc id 5, start win 0 end win 17

Does the SWMS/display support YUV422I_YUYV?

Farrah

  • Hello,

    For DVRRDK support check this link:
    e2e.ti.com/.../426680

    You could search in the e2e for similar question.

    BR
    Margarita
  • Hi ,

    Please share the swms link params which has been used in your usecase both working and non-working case.

    Regards,
    Anuj
    Pathpartner Technology Pvt Ltd
  • In the working case (YUV422I_YUYV), the ipcFramesOutHostPrm queue info is:


    inQueInfo.numCh = 5;
    for (i=0; i < inQueInfo.numCh; i++)
    {
    inQueInfo.chInfo[i].bufType = SYSTEM_BUF_TYPE_VIDFRAME;
    inQueInfo.chInfo[i].dataForamt = SYSTEM_DF_YUV422I_YUYV;
    inQueInfo.chInfo[i].memType = SYSTEM_MT_NONTILEDMEM;
    inQueInfo.chInfo[i].scanFormat = SYSTEM_SF_PROGRESSIVE;
    inQueInfo.chInfo[i].startX = 0;
    inQueInfo.chInfo[i].startY = 0;
    inQueInfo.chInfo[i].width = i == 0 ? 1024 : 640;
    inQueInfo.chInfo[i].height = i == 0 ? 768 : 512;
    inQueInfo.chInfo[i].pitch[0] = i == 0 ? (1024*2) : (640*2);
    inQueInfo.chInfo[i].pitch[1] = 0;
    inQueInfo.chInfo[i].pitch[2] = 0;
    }

    The swMsPrm is:

    swMsPrm.includeVipScInDrvPath = FALSE;
    swMsPrm.inQueParams.prevLinkId = ipcFramesInVpssFromHostId;
    swMsPrm.inqueParams.prevLinkQueId = 0;
    swMsPrm.outQueParams.nextLink = gVdisModuleContext.displayId[0];
    swMsPrm.maxInputQuenLen = 4;
    swMsPrm.maxOutRes = VSYS_STD_1080P_60;
    swMsPrm.initOutRes = VSYS_STD_1080P_60;
    swMsPrm.numOutBuf = 4;
    swMsPrm.enableProcessTieWithDisplay = TRUE;

    In the non working case (YUV422I_UYVY), everything is the same except this line:

    inQueInfo.chInfo[i].dataForamt = SYSTEM_DF_YUV422I_UYVY;
  • Hi,

    Please share the usecase code.
    swMsLink params are not complete. There are few more params need to set.

    Regards,
    Anuj
  • gVdisModuleContext.ipcFramesOutHostId = SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0;
    gVdisModuleContext.ipcFramesInVpssFromHostId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_IN_0;
    gVdisModuleContext.swMsId[0] = SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0;
    gVdisModuleContext.swMsId[1] = SYSTEM_LINK_ID_INVALID;
    swMsPrm.numSwMsInst = 1;
    swMsPrm.swMsInstId[0] = SYSTEM_SW_MS_SC_INST_SC5;
    gVdisModuleContext.displayId[0] = SYSTEM_LINK_ID_DISPLAY_0;

    ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
    ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
    ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
    ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
    ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;
    MultiCh_setIpcFramesOutInQueInfo(&ipcFramesOutHostPrm.inQueInfo);

    ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
    ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
    ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;
    ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
    ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLinkId = gVdisModuleContext.swMsId[0];

    swMsPrm.includeVipScInDrvPath = FALSE;
    swMsPrm.inQueParams.prevLinkId = ipcFramesInVpssFromHostId;
    swMsPrm.inqueParams.prevLinkQueId = 0;
    swMsPrm.outQueParams.nextLink = gVdisModuleContext.displayId[0];
    swMsPrm.maxInputQuenLen = 4;
    swMsPrm.maxOutRes = VSYS_STD_1080P_60;
    swMsPrm.initOutRes = VSYS_STD_1080P_60;
    swMsPrm.numOutBuf = 4;
    swMsPrm.enableProcessTieWithDisplay = TRUE;

    swMsPrm.lineSkipMode = FALSE;
    swMsPrm.enableLayoutGridDraw = gVdisModuleContext.vdisConfig.enableLayoutGridDraw;
    MultiCh_swMsGetDefaultLayoutPrm(VDIS_DEV_HDMI, &swMsPrm, FALSE);

    displayPrm.numInputQueues = 1;
    displayPrm.activeQueue = 0;
    displayPrm.queueInISRFlag = TRUE;
    displayPrm.inqueParams[0].prevLinkId = gVdisModuleContext.swMsId[0];
    displayPrm.inqueParams[0].prevLinkQueId = 0;
    displayPrm.displayRes = VSYS_STD_1080P_60;

  • Anuj, any suggestions?

  • Hi,

    Please change your linkid for swms link as SYSTEM_LINK_ID_SW_MS_MULTI_INST_0.

    Did you make any changes insideMultiCh_swMsGetDefaultLayoutPrm function?

    And please share your usecase c file.

    Regards,

    Anuj

  • multich_progressive_4d1_vcap_vdis.c
    /*******************************************************************************
     *                                                                             *
     * Copyright (c) 2009 Texas Instruments Incorporated - http://www.ti.com/      *
     *                        ALL RIGHTS RESERVED                                  *
     *                                                                             *
     ******************************************************************************/
    
    /* This usecase assumes that only 2 outputs - D1 <h.264> + XGA <h.264> are enabled */
    /*------------------------------ D1 <h.264> ---------------------------------------------------------------
    
    DECODING SCHEME:
                                    ETHERNET
                                      |
                                      A8
                                      |
                                      |
                              IPCFRAMES_HLOSOUT(HOST)
                                      |
                                      |
                                  IPCM3IN(VPSS)
                                      |
                                      |
                                  SW Mosaic 0
                                 (SC5 YUV422I)
                                      |
                                      |
                                      |
                                      |
                                -------------
                                  DISPLAY 0
                                -------------   <tied>
                                <On-Chip HDMI> --------- <Off-Chip HDMI>
                                   1080p60                 1080p60
    
    
    */
    
    
    #include "mcfw/src_linux/mcfw_api/usecases/multich_common.h"
    #include "mcfw/src_linux/mcfw_api/usecases/multich_ipcbits.h"
    #include "mcfw/interfaces/link_api/system_tiler.h"
    
    /* =============================================================================
     * Externs
     * =============================================================================
     */
    
    /* =============================================================================
     * Use case code
     * =============================================================================
     */
    static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
    {
        .isPopulated = 1,
        .ivaMap[0] =
        {
            .EncNumCh  = 5,
            .EncChList = {0, 1, 2, 3, 4},
            .DecNumCh  = 5,
            .DecChList = {0, 1, 2, 3, 4},
        },
    
    };
    
    #define	  TILER_ENABLE	              TRUE
    
    static Void MultiCh_setIpcFramesOutInQueInfo(System_LinkQueInfo *inQueInfo)
    {
        Int i;
    
        inQueInfo->numCh = 5;
        for (i = 0; i < inQueInfo->numCh; i++)
        {
            inQueInfo->chInfo[i].bufType = SYSTEM_BUF_TYPE_VIDFRAME;
            inQueInfo->chInfo[i].dataFormat = SYSTEM_DF_YUV422I_YUYV;
            inQueInfo->chInfo[i].memType    = SYSTEM_MT_NONTILEDMEM;
            inQueInfo->chInfo[i].scanFormat = SYSTEM_SF_PROGRESSIVE;
            inQueInfo->chInfo[i].startX     = 0;
            inQueInfo->chInfo[i].startY     = 0;
            inQueInfo->chInfo[i].width      = i == 0 ? 1024 : 640;
            inQueInfo->chInfo[i].height     = i == 0 ? 768 : 512;
            inQueInfo->chInfo[i].pitch[0]   = i == 0 ? (1024*2) : (640*2);
            inQueInfo->chInfo[i].pitch[1]   = 0;
            inQueInfo->chInfo[i].pitch[2]   = 0;
        }
    }
    
    /* TODO: MOVE TO CUSTOM USECASE */
    Void MultiCh_createProgressive4D1VcapVdis()
    {
        // For decoding
        IpcFramesOutLinkHLOS_CreateParams  ipcFramesOutHostPrm;
        IpcFramesInLinkRTOS_CreateParams   ipcFramesInVpssFromHostPrm;
    
        // For Display
        static SwMsLink_CreateParams      swMsPrm;
        DisplayLink_CreateParams          displayPrm;
    
        // General Variables
        //    UInt32 i,j;
    
        // Initialize Structures
        MULTICH_INIT_STRUCT(IpcFramesOutLinkHLOS_CreateParams,ipcFramesOutHostPrm);
        MULTICH_INIT_STRUCT(IpcFramesInLinkRTOS_CreateParams, ipcFramesInVpssFromHostPrm);
        MULTICH_INIT_STRUCT(DisplayLink_CreateParams,         displayPrm);
        MULTICH_INIT_STRUCT(SwMsLink_CreateParams,            swMsPrm);
    
        printf("\nEntered new usecase 1HD + 4SD <8148> OSD Disable SCD Disabled GDC Enabled RTP Enabled\n\n");
    
        MultiCh_detectBoard();
    
        System_linkControl(
            SYSTEM_LINK_ID_M3VPSS,
            SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES,
            NULL,
            0,
            TRUE
            );
    
        System_linkControl(
            SYSTEM_LINK_ID_M3VIDEO,
            SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
            &systemVid_encDecIvaChMapTbl,
            sizeof(SystemVideo_Ivahd2ChMap_Tbl),
            TRUE
        );
    
    #if     (TILER_ENABLE == FALSE)
        SystemTiler_disableAllocator();
    #endif
    
        // Assign IDs
        gVdisModuleContext.ipcFramesOutHostId = SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0;
        gVdisModuleContext.ipcFramesInVpssFromHostId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_IN_0;
        gVdisModuleContext.swMsId[0]          = SYSTEM_LINK_ID_SW_MS_MULTI_INST_0;
        gVdisModuleContext.swMsId[1]          = SYSTEM_LINK_ID_INVALID;
    
        swMsPrm.numSwMsInst                   = 1;
    
        swMsPrm.swMsInstId[0]                 = SYSTEM_SW_MS_SC_INST_SC5;
    
        gVdisModuleContext.displayId[0]       = SYSTEM_LINK_ID_DISPLAY_0; // ON CHIP HDMI
        gVdisModuleContext.displayId[1]       = SYSTEM_LINK_ID_INVALID;
        gVdisModuleContext.displayId[2]       = SYSTEM_LINK_ID_INVALID;
    
        // Print Out Information
    #if 0
        System_linkGetInfo(gVencModuleContext.ipcBitsInHLOSId,&bitsProducerLinkInfo);
        OSA_assert(bitsProducerLinkInfo.numQue == 1);
        printf ("\n\nbitsProducerLinkInfo\n");
        printf ("numQ %d, numCh %d\n",
                        bitsProducerLinkInfo.numQue,
                        bitsProducerLinkInfo.queInfo[0].numCh);
        for (i=0; i<bitsProducerLinkInfo.queInfo[0].numCh; i++)
        {
            printf ("Ch [%d] Width %d, Height %d\n",
                i,
                bitsProducerLinkInfo.queInfo[0].chInfo[i].width,
                bitsProducerLinkInfo.queInfo[0].chInfo[i].height);
        }
    
        if (bitsProducerLinkInfo.queInfo[0].numCh > gVencModuleContext.vencConfig.numPrimaryChn)
        {
            bitsProducerLinkInfo.queInfo[0].numCh = gVencModuleContext.vencConfig.numPrimaryChn;
        }
    
        printf ("Reducing bitsProducerLinkInfo.numCh to %d\n", bitsProducerLinkInfo.queInfo[0].numCh);
    #endif
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////// Decode / DISPLAY
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////
        ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
        ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
        ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
        ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
        ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;
        MultiCh_setIpcFramesOutInQueInfo(&ipcFramesOutHostPrm.inQueInfo);
    
        ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
        ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
        ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;
        ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
        ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.swMsId[0];
    
        swMsPrm.includeVipScInDrvPath     = FALSE;
        swMsPrm.inQueParams.prevLinkId    = gVdisModuleContext.ipcFramesInVpssFromHostId;
        swMsPrm.inQueParams.prevLinkQueId = 0;
        swMsPrm.outQueParams.nextLink     = gVdisModuleContext.displayId[0];
        swMsPrm.maxInputQueLen            = 4; //8; //4; // KC: changed to 4 to make the display smooth
        swMsPrm.maxOutRes                 = VSYS_STD_1080P_60;
        swMsPrm.initOutRes                = VSYS_STD_1080P_60;
        swMsPrm.numOutBuf                 = 4; //8;
        swMsPrm.enableProcessTieWithDisplay = TRUE;
    //    swMsPrm.enableOutDup                = TRUE;
    
    #ifdef  SYSTEM_USE_TILER
            swMsPrm.lineSkipMode = FALSE; // Double pitch not possible in tiler mode; so Line skip not possible
    #else
            swMsPrm.lineSkipMode = TRUE; // Set to TRUE for Enable low cost scaling
    #endif
        swMsPrm.enableLayoutGridDraw  = gVdisModuleContext.vdisConfig.enableLayoutGridDraw;
    
        MultiCh_swMsGetDefaultLayoutPrm(VDIS_DEV_HDMI, &swMsPrm, FALSE);
    
        displayPrm.numInputQueues                 = 1;
        displayPrm.activeQueue                    = 0;
        displayPrm.queueInISRFlag                 = TRUE;
        displayPrm.inQueParams[0].prevLinkId      = gVdisModuleContext.swMsId[0];
        displayPrm.inQueParams[0].prevLinkQueId   = 0;
        displayPrm.displayRes                     = VSYS_STD_1080P_60;
    
        System_linkCreate(gVdisModuleContext.ipcFramesOutHostId, &ipcFramesOutHostPrm, sizeof(ipcFramesOutHostPrm));
        System_linkCreate(gVdisModuleContext.ipcFramesInVpssFromHostId, &ipcFramesInVpssFromHostPrm, sizeof(ipcFramesInVpssFromHostPrm));
        System_linkCreate(gVdisModuleContext.swMsId[0], &swMsPrm, sizeof(swMsPrm));
        System_linkCreate(gVdisModuleContext.displayId[0], &displayPrm, sizeof(displayPrm));
    
        return;
    }
    
    
    Void MultiCh_deleteProgressive4D1VcapVdis()
    {
        System_linkDelete(gVdisModuleContext.ipcFramesOutHostId);
        System_linkDelete(gVdisModuleContext.ipcFramesInVpssFromHostId);
        System_linkDelete(gVdisModuleContext.swMsId[0]);
        System_linkDelete(gVdisModuleContext.displayId[0]);
    
        /* Print the HWI, SWI and all tasks load */
        /* Reset the accumulated timer ticks */
        MultiCh_prfLoadCalcEnable(FALSE, TRUE, FALSE);
    
    #if     (TILER_ENABLE == FALSE)
        /* Reenable tiler allocator that was disabled by this usecase */
        SystemTiler_enableAllocator();
    #endif
    }
    
    
    That is the link id I used.  I've attached the usecase file.