XilinxProcessorIPLib/drivers/dp12txss/src/xdptxss.c
u32 XDpTxSs_SetLinkRate(XDpTxSs *InstancePtr, u8 LinkRate)
{
	u32 Status;

	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);

	/* Application should set Display Core maximum supported rate.
	Here we should check weather sink device rate is higher than
	display Core maximum rate, and if it is higher we should train sink
	device at Display core's maximum supported rate */
	if (LinkRate > InstancePtr->DpPtr->Config.MaxLinkRate) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS info: This link rate is "
			"not supported by Source/Sink.\n\rMax Supported link "
			"rate is 0x%x.\n\rSetting maximum supported link "
			"rate.\n\r", InstancePtr->DpPtr->Config.MaxLinkRate);
		LinkRate = InstancePtr->DpPtr->Config.MaxLinkRate;
	}

	/* Verify arguments. */
	Xil_AssertNonvoid((LinkRate == XDPTXSS_LINK_BW_SET_162GBPS) ||
			(LinkRate == XDPTXSS_LINK_BW_SET_270GBPS) ||
			(LinkRate == XDPTXSS_LINK_BW_SET_540GBPS));


	/* Set link rate */
	Status = XDp_TxSetLinkRate(InstancePtr->DpPtr, LinkRate);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting link rate "
			"failed.\n\r");
		Status = XST_FAILURE;
	}

	return Status;
}
/*****************************************************************************/
/**
*
* This function sets the data rate to be used by the DisplayPort TX Subsystem
* core.
*
* @param	InstancePtr is a pointer to the XDpTxSs instance.
* @param	LinkRate is the rate at which link needs to be driven.
*		- XDPTXSS_LINK_BW_SET_162GBPS = 0x06(for a 1.62 Gbps data rate)
*		- XDPTXSS_LINK_BW_SET_270GBPS = 0x0A(for a 2.70 Gbps data rate)
*		- XDPTXSS_LINK_BW_SET_540GBPS = 0x14(for a 5.40 Gbps data rate)
*
* @return
*		- XST_SUCCESS if setting the new lane rate was successful.
*		- XST_FAILURE otherwise.
*
* @note		Maximum supported link rate is used if given link rate is
*		greater than the maximum supported link rate.
*
******************************************************************************/
This function sets the data rate to be used by the DisplayPort TX Subsystem
core.
This function sets the data rate to be used by the DisplayPort TX Subsystem core .
u32 XDpTxSs_SetLinkRate(XDpTxSs *InstancePtr, u8 LinkRate)
{
	u32 Status;
	Xil_AssertNonvoid(InstancePtr != NULL);
	if (LinkRate > InstancePtr->DpPtr->Config.MaxLinkRate) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS info: This link rate is "
			"not supported by Source/Sink.\n\rMax Supported link "
			"rate is 0x%x.\n\rSetting maximum supported link "
			"rate.\n\r", InstancePtr->DpPtr->Config.MaxLinkRate);
		LinkRate = InstancePtr->DpPtr->Config.MaxLinkRate;
	}
	Xil_AssertNonvoid((LinkRate == XDPTXSS_LINK_BW_SET_162GBPS) ||
			(LinkRate == XDPTXSS_LINK_BW_SET_270GBPS) ||
			(LinkRate == XDPTXSS_LINK_BW_SET_540GBPS));
	Status = XDp_TxSetLinkRate(InstancePtr->DpPtr, LinkRate);
	if (Status != XST_SUCCESS) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"SS ERR: Setting link rate "
			"failed.\n\r");
		Status = XST_FAILURE;
	}
	return Status;
}
u32 XDpTxSs_SetLinkRate ( XDpTxSs * InstancePtr , u8 LinkRate ) { u32 Status ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; if ( LinkRate > InstancePtr -> DpPtr -> Config . MaxLinkRate ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " " \n \r " " \n \r " , InstancePtr -> DpPtr -> Config . MaxLinkRate ) ; LinkRate = InstancePtr -> DpPtr -> Config . MaxLinkRate ; } Xil_AssertNonvoid ( ( LinkRate == XDPTXSS_LINK_BW_SET_162GBPS ) || ( LinkRate == XDPTXSS_LINK_BW_SET_270GBPS ) || ( LinkRate == XDPTXSS_LINK_BW_SET_540GBPS ) ) ; Status = XDp_TxSetLinkRate ( InstancePtr -> DpPtr , LinkRate ) ; if ( Status != XST_SUCCESS ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " " " \n \r " ) ; Status = XST_FAILURE ; } return Status ; }
This function sets the data rate to be used by the DisplayPort TX Subsystem
core.
This function sets the data rate to be used by the DisplayPort TX Subsystem core .
/* Verify arguments. */ /* Application should set Display Core maximum supported rate.
	Here we should check weather sink device rate is higher than
	display Core maximum rate, and if it is higher we should train sink
	device at Display core's maximum supported rate */ /* Verify arguments. */ /* Set link rate */