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.

IPNC RDK3.5, capture video display on LCD

Other Parts Discussed in Thread: DM385

Hello

We have a customized board, ipnc_psp_arago package 04.04.00.02 on DM385 platform.
use the DVO2 STEST bit, can look color bar show on LCD.
I want test capture video display on LCD but have some problem.

I have to modify some file:

src_bios6/links_m3vpss/system/system_dctrl.c :
#if defined(TI_8107_BUILD)
/* Display Controller Configuration */
/* To tie DVO2 and HDCOMP together refer following Mesh */
Vps_DcConfig gSystem_dctrlTriDisplayConfig = {
VPS_DC_USERSETTINGS, /* Use Case */
/* Edge information */
{
{VPS_DC_BP0_INPUT_PATH, VPS_DC_VCOMP_MUX},
{VPS_DC_VCOMP_MUX, VPS_DC_VCOMP},
{VPS_DC_CIG_NON_CONSTRAINED_OUTPUT, VPS_DC_HDMI_BLEND},
{VPS_DC_CIG_NON_CONSTRAINED_OUTPUT, VPS_DC_HDCOMP_BLEND},
{VPS_DC_SEC1_INPUT_PATH, VPS_DC_SDVENC_MUX},
{VPS_DC_SDVENC_MUX, VPS_DC_SDVENC_BLEND},
{VPS_DC_GRPX0_INPUT_PATH, VPS_DC_HDMI_BLEND},
{VPS_DC_GRPX0_INPUT_PATH, VPS_DC_HDCOMP_BLEND},
{VPS_DC_GRPX2_INPUT_PATH, VPS_DC_SDVENC_BLEND},

{VPS_DC_MAIN_INPUT_PATH, VPS_DC_VCOMP},
{VPS_DC_AUX_INPUT_PATH, VPS_DC_VCOMP_MUX},
{VPS_DC_BP1_INPUT_PATH, VPS_DC_SDVENC_MUX},
},

12,
/* VENC information */
{
/* Mode information */
{
{VPS_DC_VENC_HDMI, {FVID2_STD_1080P_60}
}
, /* 1080p30 is mode
* is overwritten
* later inside
* System_displayCtrlInit
*/
{VPS_DC_VENC_HDCOMP, {FVID2_STD_PAL}
}, /* 1080p30 is mode
* is overwritten
* later inside
* System_displayCtrlInit
*/
{VPS_DC_VENC_DVO2, {FVID2_STD_PAL}
}
,

{VPS_DC_VENC_SD, {FVID2_STD_NTSC}
}
}
,
(VPS_DC_VENC_DVO2 | VPS_DC_VENC_HDCOMP), /* Tied VENC bit
* mask */
3u /* Number of VENCs
*/
}
};

src_linux/mcfw_api/ti_vdis.c :
- pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dvoVsPolarity = VDIS_POLARITY_ACT_HIGH;
- pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dvoHsPolarity = VDIS_POLARITY_ACT_HIGH;
+ pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dvoVsPolarity = VDIS_POLARITY_ACT_LOW;
+ pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dvoHsPolarity = VDIS_POLARITY_ACT_LOW;
- pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dvoFmt = VDIS_DVOFMT_DOUBLECHAN;
+ pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dvoFmt = VDIS_DVOFMT_SINGLECHAN;

hdvpss_01_00_01_37/packages/ti/psp/vps/hal/src/vpshal_hdvenc.c :
HdVenc_StdModeInfo HdVencStdModeInfo[] = {
16, 60, 62, 9, 30, 6}, 1, 4, 4},
{{FVID2_STD_576P, 720, 576, FVID2_SF_PROGRESSIVE, 27000, 50,
12, 68, 64, 5, 39, 5}, 5, 4, 4},
+
+ {{FVID2_STD_NTSC, 720, 480, FVID2_SF_INTERLACED, 27000, 30,
+ 38, 114, 124, 4, 15, 3}, 0, 1, 264},

src_bios6/links_m3vpss/system/system_dctrl.c :
@@ -391,11 +391,12 @@ Void App_runDemo(Void)
{
Vdis_params_init(&vdisParams);

vdisParams.deviceParams[VDIS_DEV_SD].resolution = VSYS_STD_NTSC;//VSYS_STD_PAL;//VSYS_STD_NTSC;
/* Override the context here as needed */
- vdisParams.deviceParams[VDIS_DEV_DVO2].resolution = VSYS_STD_1080P_60;
+ vdisParams.deviceParams[VDIS_DEV_DVO2].resolution = VSYS_STD_PAL;
+ vdisParams.deviceParams[VDIS_DEV_HDCOMP].resolution = VSYS_STD_PAL; /* add by Vic Lin */
Vdis_tiedVencInit(VDIS_DEV_DVO2, VDIS_DEV_HDCOMP, &vdisParams);

------------------------------------------------------------------------------------------------------------
Insert module and executed flow :
vpss.ko -> ti81xxfb.ko -> ti81xxvo,ko -> ipnc_rdk_mcfw.out

now the program appears to have started working, but the LCD screen looks like a timing error in setting blinking, even if I change the brightness of the lens still does not change the picture

please reference the log message 

 [host]  0: SYSTEM: System Common Init in progress !!!
 [host]  0: SYSTEM: IPC init in progress !!!
 [host]  8: SYSTEM: CPU [DSP] is NOT available on this platform !!!
 [host]  8: SYSTEM: CPU [VIDEO-M3] syslink proc ID is [0] !!!
 [host]  8: SYSTEM: CPU [VPSS-M3] syslink proc ID is [1] !!!
 [host]  8: SYSTEM: CPU [HOST] syslink proc ID is [2] !!!
 [host]  8: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
 [host]  9: SYSTEM: Creating MsgQ [HOST_MSGQ] ...
 [host]  11: SYSTEM: Creating MsgQ [HOST_ACK_MSGQ] ...
 [host]  12: SYSTEM: Opening MsgQ [VIDEO-M3_MSGQ] ...
 [host]  13: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
 [host]  14: SYSTEM: Notify register to [VIDEO-M3] line 0, event 12 ... 
 [host]  15: SYSTEM: Notify register to [VPSS-M3] line 0, event 12 ... 
 [host]  15: SYSTEM: IPC init DONE !!!
 [host]  17: SYSTEM: Creating ListMP [HOST_IPC_OUT_28] in region 0 ...
 [host]  18: SYSTEM: Creating ListMP [HOST_IPC_IN_28] in region 0 ...
 [host]  19: SYSTEM: ListElem Shared Addr = 0x40545580
 [host]  20: SYSTEM: Creating ListMP [HOST_IPC_OUT_29] in region 0 ...
 [host]  22: SYSTEM: Creating ListMP [HOST_IPC_IN_29] in region 0 ...
 [host]  23: SYSTEM: ListElem Shared Addr = 0x4055f200
 [host]  25: SYSTEM: Creating ListMP [HOST_IPC_OUT_23] in region 0 ...
 [host]  27: SYSTEM: Creating ListMP [HOST_IPC_IN_23] in region 0 ...
 [host]  28: SYSTEM: ListElem Shared Addr = 0x40578e80
 [host]  29: SYSTEM: Creating ListMP [HOST_IPC_OUT_24] in region 0 ...
 [host]  31: SYSTEM: Creating ListMP [HOST_IPC_IN_24] in region 0 ...
 [host]  32: SYSTEM: ListElem Shared Addr = 0x40598880
 [host]  34: SYSTEM: Creating ListMP [HOST_IPC_OUT_25] in region 0 ...
 [host]  36: SYSTEM: Creating ListMP [HOST_IPC_IN_25] in region 0 ...
 [host]  37: SYSTEM: ListElem Shared Addr = 0x405b8280
 [host]  38: SYSTEM: System Common Init Done !!!
 [host] Vsys_allocBuf - addr = 0x49c24000,size = 31457280
 [host] MCFW_IPCBITS:App_streamSysInit:virt addr of 87000000 cir buffer  is 49c24000
 [host] MemMng_memcpy_open:OSA_dmaOpen passed with ch id = 4
 [host] CacheMng_MemCpy_open:OSA_dmaOpen passed with ch id = 12
Creat queue id:0
queue id:0
Creat queue id:32769
queue id:32769
 [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:Entered... [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:Entered... [host] DCC Default Intialization File Not Present!
 [host] Before System_linkControl SYSTEM_M3VPSS_CMD_GET_DISPLAYCTRL_INIT
 [m3vpss ] tiedVencs VPS_DC_VENC_HDMI | VPS_DC_VENC_HDCOMP
 [m3vpss ] VPS_DCTRL_INST_0
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_DVO2
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_HDMI
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_SD
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_HDCOMP
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_CLK_SRC VPS_DC_VENC_HDMI | VPS_DC_VENC_HDCOMP
 [m3vpss ] HDCOMPCLK
[host] #### Capture and Display usecase, of 1CH!! (multich_capturedisplay.c,MultiCh_createStreamCaptureDisplay,172)
 [m3vpss ]  82413: CAMERA: Create in progress !!!
 [m3vpss ]  82413: CAMERA: VIP0 PortA camera mode is [ 8-bit, Non-mux Embedded Sync] !!! 
 [m3vpss ] Iss_platformTI814xSelectSensor: i2cInstId=2, boardId=1, i2cDevAddr=0x27, r[0]=239
 [m3vpss ] Iss_Imx104Create
 [m3vpss ]      deviceI2cInstId         = 2
 [m3vpss ]      numDevicesAtPort        = 1
 [m3vpss ]      deviceI2cAddr[]         = 33,0
 [m3vpss ]      deviceResetGpio[]       = -1,0
 [m3vpss ]      VNF/VStab/InputStandard = 0,0,9
 [m3vpss ] Iss_Imx104AllocObj
 [m3vpss ]  82414: CAMERA: VIP 0: VID DEC 268436752 (0x21): 00ef:bebebebe:8ace3f40, AUD_STATUS -1970037048
 [m3vpss ] Stream ID 0: chId = 0 VpsUtils_queCreate.
 [m3vpss ]  82436: CAMERA: Create Done !!!
 [m3vpss ]  82455: CAMERA: Detect video in progress !!!
 [m3vpss ]  82456: CAMERA: Detect video Done !!!
 [m3vpss ] DCC server task running 
 [m3vpss ]  82536: DISPLAY: Create in progress !!!
 [m3vpss ] DisplayId = 2,DataFormat = 1
 [m3vpss ] BP0 displayInstId = 0
 [host] USECASE SETUP DONE
 [m3vpss ]  82547: DISPLAY: Create Done !!!
 [m3vpss ]  82548: DISPLAY: Start in progress !!!
#### (ti_vdis.c,Vdis_switchActiveChannel,2373)
 [m3vpss ]  82555: DISPLAY: Start Done !!!
 [m3vpss ]  82556: DISPLAY: HDDAC(BP0) : 125 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 255 / 0 ) !!! 
 [m3vpss ]  82480: CAMERA: Start in progress !!!
 [m3vpss ] Iss_Imx104Control.START.TODO
 [m3vpss ]  82480: CAMERA: Start Done !!!
 [m3vpss ]  82557: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 1, HDDAC(BP0) 1, DVO2(BP1) 1, SDDAC(SEC1) 0 
 [m3vpss ]  82557: SYSTEM  : FREE SPACE : System Heap      = 410832 B, Mbx = 10238 msgs) 
 [m3vpss ]  82557: SYSTEM  : FREE SPACE : SR0 Heap         = 1141120 B (1 MB) 
 [m3vpss ]  82558: SYSTEM  : FREE SPACE : Frame Buffer     = 33110912 B (31 MB) 
 [m3vpss ]  82558: SYSTEM  : FREE SPACE : Bitstream Buffer = 22003584 B (20 MB) 
 [m3vpss ]  82558: SYSTEM  : FREE SPACE : Tiler Buffer     = 0 B (0 MB)  - TILER OFF 
 [host] 
Application Run Completed
 [m3vpss ]  82622: CAMERA: Fields = 1 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)
 [host] ITT server task running !!!
 [host] 
 ITT ittServer_run
 [host] ITT Server Message initialization successful
 [host] 
 ITT capture task created
 [host] DCC server Message ques is open succefully
 [host] Setting cmd <1> in message <403f1c00>
 [host] Posting message <403f1c00> in QId <10002> 
 [m3vpss ] Command 1 recived from HOST A8 
 [host] Response from M3 is : 1
 [host] Default dcc profile does not exists. Using system defaults ... 
 [host] Server Socket created with ID <22> 

~ #  [host] 
Usecase is Active !!! 
 [m3vpss ]  142639: CAMERA: Fields = 2619 (fps = 43), Total Resets = 0 (Avg 0 ms per reset)
 [host] 
Usecase is Active !!! 
 [m3vpss ]  ==================== CameraLink_PrintDetails ==================== 
 [m3vpss ]  165120: CAMERA: Fields = 3601 (fps = 43, CPU Load = 17)
 [m3vpss ]  165120: CAMERA: Num Resets = 0 (Avg 0 ms per reset)
 [m3vpss ]  ================================================================= 


BTW. this Usecase in tv out is a normal display, I just SD changed to DVO2.
like below:

gVcamModuleContext.cameraId = SYSTEM_LINK_ID_CAMERA;

gVdisModuleContext.displayId[VDIS_DEV_DVO2] = SYSTEM_LINK_ID_DISPLAY_1;

CameraLink_CreateParams_Init(&cameraPrm);
cameraPrm.captureMode = CAMERA_LINK_CAPMODE_ISIF;
cameraPrm.outQueParams[0].nextLink = gVdisModuleContext.displayId[VDIS_DEV_DVO2];

pCameraInstPrm = &cameraPrm.vipInst[0];
pCameraInstPrm->vipInstId = SYSTEM_CAMERA_INST_VP_CSI2;
pCameraInstPrm->videoDecoderId = MultiCh_getSensorId(gUI_mcfw_config.sensorId);
pCameraInstPrm->inDataFormat = SYSTEM_DF_YUV420SP_UV;
pCameraInstPrm->sensorOutWidth = 1280;
pCameraInstPrm->sensorOutHeight = 720;
pCameraInstPrm->standard = SYSTEM_STD_720P_60;
pCameraInstPrm->numOutput = 1;

/* First stream */
pCameraOutPrm = &pCameraInstPrm->outParams[0];
pCameraOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV; //SYSTEM_DF_YUV420SP_UV;
pCameraOutPrm->scEnable = FALSE;
pCameraOutPrm->scOutWidth = 720;
pCameraOutPrm->scOutHeight = 576;
pCameraOutPrm->standard = SYSTEM_STD_PAL;
pCameraOutPrm->outQueId = 0;

MULTICH_INIT_STRUCT(DisplayLink_CreateParams,displayPrm);
displayPrm.inQueParams[0].prevLinkId = gVcamModuleContext.cameraId;
displayPrm.inQueParams[0].prevLinkQueId = 0;
displayPrm.displayRes = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_DVO2].resolution;
displayPrm.displayId = DISPLAY_LINK_DISPLAY_CS2;

Please experts help for the trouble. if the wrong place please correct me.
Thank you very much.