XilinxProcessorIPLib/drivers/dp12txss/src/xdptxss.c
u32 XDpTxSs_Start(XDpTxSs *InstancePtr)
{
	u32 Status;

	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid((InstancePtr->UsrOpt.MstSupport == 0) ||
				(InstancePtr->UsrOpt.MstSupport == 1));

	/* Check RX device in MST/SST */
	Status = DpTxSs_CheckRxDeviceMode(InstancePtr);
	if (Status != XST_SUCCESS) {
		return Status;
	}

#if (XPAR_XHDCP_NUM_INSTANCES > 0)
	/* Set physical interface (DisplayPort) down */
	Status = XHdcp1x_SetPhysicalState(InstancePtr->Hdcp1xPtr, 0);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting PHY down "
			"failed.\n\r");
		return Status;
	}
#endif
	/* Start DisplayPort sub-core configuration */
	Status = XDpTxSs_DpTxStart(InstancePtr->DpPtr,
			InstancePtr->UsrOpt.MstSupport,
				InstancePtr->UsrOpt.Bpc,
					InstancePtr->UsrOpt.VmId);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: DP Start failed "
			"in %s!\n\r",
				InstancePtr->UsrOpt.MstSupport?"MST":"SST");
		return Status;
	}

#if (XPAR_XHDCP_NUM_INSTANCES > 0)
	/* Set lane count in HDCP */
	Status = XHdcp1x_SetLaneCount(InstancePtr->Hdcp1xPtr,
		InstancePtr->DpPtr->TxInstance.LinkConfig.LaneCount);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting HDCP lane "
			"count failed.\n\r");
		return Status;
	}

	/* Enable HDCP interface */
	Status = XHdcp1x_Enable(InstancePtr->Hdcp1xPtr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Enabling HDCP failed."
			"\n\r");
		return Status;
	}

	/* Set physical interface (DisplayPort) up */
	Status = XHdcp1x_SetPhysicalState(InstancePtr->Hdcp1xPtr, 1);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting PHY up failed."
			"\n\r");
		return Status;
	}

	/* Poll the HDCP state machine */
	Status = XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: failed to poll HDCP "
			"state machine.\n\r");
		return Status;
	}
#endif
	/* Align video mode being set in DisplayPort */
	InstancePtr->UsrOpt.VmId =
			InstancePtr->DpPtr->TxInstance.MsaConfig[0].Vtm.VmId;

	/* Setup subsystem sub-cores */
	Status = DpTxSs_SetupSubCores(InstancePtr);
	if (Status != XST_SUCCESS) {
		return Status;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function starts the DisplayPort Transmitter Subsystem including all
* sub-cores.
*
* @param	InstancePtr is a pointer to the XDpTxSs core instance.
*
* @return
*		- XST_SUCCESS, if DP TX Subsystem and its included sub-cores
*		configured successfully.
*		- XST_FAILURE, otherwise.
*
* @note		None.
*
******************************************************************************/
This function starts the DisplayPort Transmitter Subsystem including all
sub-cores.
This function starts the DisplayPort Transmitter Subsystem including all sub - cores .
u32 XDpTxSs_Start(XDpTxSs *InstancePtr)
{
	u32 Status;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid((InstancePtr->UsrOpt.MstSupport == 0) ||
				(InstancePtr->UsrOpt.MstSupport == 1));
	Status = DpTxSs_CheckRxDeviceMode(InstancePtr);
	if (Status != XST_SUCCESS) {
		return Status;
	}
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
	Status = XHdcp1x_SetPhysicalState(InstancePtr->Hdcp1xPtr, 0);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting PHY down "
			"failed.\n\r");
		return Status;
	}
#endif
	Status = XDpTxSs_DpTxStart(InstancePtr->DpPtr,
			InstancePtr->UsrOpt.MstSupport,
				InstancePtr->UsrOpt.Bpc,
					InstancePtr->UsrOpt.VmId);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: DP Start failed "
			"in %s!\n\r",
				InstancePtr->UsrOpt.MstSupport?"MST":"SST");
		return Status;
	}
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
	Status = XHdcp1x_SetLaneCount(InstancePtr->Hdcp1xPtr,
		InstancePtr->DpPtr->TxInstance.LinkConfig.LaneCount);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting HDCP lane "
			"count failed.\n\r");
		return Status;
	}
	Status = XHdcp1x_Enable(InstancePtr->Hdcp1xPtr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Enabling HDCP failed."
			"\n\r");
		return Status;
	}
	Status = XHdcp1x_SetPhysicalState(InstancePtr->Hdcp1xPtr, 1);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting PHY up failed."
			"\n\r");
		return Status;
	}
	Status = XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: failed to poll HDCP "
			"state machine.\n\r");
		return Status;
	}
#endif
	InstancePtr->UsrOpt.VmId =
			InstancePtr->DpPtr->TxInstance.MsaConfig[0].Vtm.VmId;
	Status = DpTxSs_SetupSubCores(InstancePtr);
	if (Status != XST_SUCCESS) {
		return Status;
	}
	return XST_SUCCESS;
}
u32 XDpTxSs_Start ( XDpTxSs * InstancePtr ) { u32 Status ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( ( InstancePtr -> UsrOpt . MstSupport == 0 ) || ( InstancePtr -> UsrOpt . MstSupport == 1 ) ) ; Status = DpTxSs_CheckRxDeviceMode ( InstancePtr ) ; if ( Status != XST_SUCCESS ) { return Status ; } #if ( XPAR_XHDCP_NUM_INSTANCES > 0 ) Status = XHdcp1x_SetPhysicalState ( InstancePtr -> Hdcp1xPtr , 0 ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " ) ; return Status ; } #endif Status = XDpTxSs_DpTxStart ( InstancePtr -> DpPtr , InstancePtr -> UsrOpt . MstSupport , InstancePtr -> UsrOpt . Bpc , InstancePtr -> UsrOpt . VmId ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " , InstancePtr -> UsrOpt . MstSupport ? " " : " " ) ; return Status ; } #if ( XPAR_XHDCP_NUM_INSTANCES > 0 ) Status = XHdcp1x_SetLaneCount ( InstancePtr -> Hdcp1xPtr , InstancePtr -> DpPtr -> TxInstance . LinkConfig . LaneCount ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " ) ; return Status ; } Status = XHdcp1x_Enable ( InstancePtr -> Hdcp1xPtr ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " ) ; return Status ; } Status = XHdcp1x_SetPhysicalState ( InstancePtr -> Hdcp1xPtr , 1 ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " ) ; return Status ; } Status = XHdcp1x_Poll ( InstancePtr -> Hdcp1xPtr ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " ) ; return Status ; } #endif InstancePtr -> UsrOpt . VmId = InstancePtr -> DpPtr -> TxInstance . MsaConfig [ 0 ] . Vtm . VmId ; Status = DpTxSs_SetupSubCores ( InstancePtr ) ; if ( Status != XST_SUCCESS ) { return Status ; } return XST_SUCCESS ; }
This function starts the DisplayPort Transmitter Subsystem including all
sub-cores.
This function starts the DisplayPort Transmitter Subsystem including all sub - cores .
/* Verify arguments. */ /* Check RX device in MST/SST */ /* Set physical interface (DisplayPort) down */ /* Start DisplayPort sub-core configuration */ /* Set lane count in HDCP */ /* Enable HDCP interface */ /* Set physical interface (DisplayPort) up */ /* Poll the HDCP state machine */ /* Align video mode being set in DisplayPort */ /* Setup subsystem sub-cores */