XilinxProcessorIPLib/drivers/dp14rxss/src/xdprxss.c
u32 XDpRxSs_SetLinkRate(XDpRxSs *InstancePtr, u8 LinkRate)
{
	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid((LinkRate == (XDPRXSS_LINK_BW_SET_162GBPS)) ||
			(LinkRate == (XDPRXSS_LINK_BW_SET_270GBPS)) ||
			(LinkRate == (XDPRXSS_LINK_BW_SET_540GBPS)) ||
			(LinkRate == (XDPRXSS_LINK_BW_SET_810GBPS)));

	/* Check for maximum supported link 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;
	}

	/* Set link rate */
	XDp_RxSetLinkRate(InstancePtr->DpPtr, LinkRate);
	InstancePtr->UsrOpt.LinkRate = LinkRate;

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function sets the data rate to be used by the DisplayPort RX Subsystem
* core.
*
* @param	InstancePtr is a pointer to the XDpRxSs instance.
* @param	LinkRate is the rate at which link needs to be driven.
*		- XDPRXSS_LINK_BW_SET_162GBPS = 0x06(for a 1.62 Gbps data rate)
*		- XDPRXSS_LINK_BW_SET_270GBPS = 0x0A(for a 2.70 Gbps data rate)
*		- XDPRXSS_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		None.
*
******************************************************************************/
This function sets the data rate to be used by the DisplayPort RX Subsystem
core.
This function sets the data rate to be used by the DisplayPort RX Subsystem core .
u32 XDpRxSs_SetLinkRate(XDpRxSs *InstancePtr, u8 LinkRate)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid((LinkRate == (XDPRXSS_LINK_BW_SET_162GBPS)) ||
			(LinkRate == (XDPRXSS_LINK_BW_SET_270GBPS)) ||
			(LinkRate == (XDPRXSS_LINK_BW_SET_540GBPS)) ||
			(LinkRate == (XDPRXSS_LINK_BW_SET_810GBPS)));
	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;
	}
	XDp_RxSetLinkRate(InstancePtr->DpPtr, LinkRate);
	InstancePtr->UsrOpt.LinkRate = LinkRate;
	return XST_SUCCESS;
}
u32 XDpRxSs_SetLinkRate ( XDpRxSs * InstancePtr , u8 LinkRate ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( ( LinkRate == ( XDPRXSS_LINK_BW_SET_162GBPS ) ) || ( LinkRate == ( XDPRXSS_LINK_BW_SET_270GBPS ) ) || ( LinkRate == ( XDPRXSS_LINK_BW_SET_540GBPS ) ) || ( LinkRate == ( XDPRXSS_LINK_BW_SET_810GBPS ) ) ) ; 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 ; } XDp_RxSetLinkRate ( InstancePtr -> DpPtr , LinkRate ) ; InstancePtr -> UsrOpt . LinkRate = LinkRate ; return XST_SUCCESS ; }
This function sets the data rate to be used by the DisplayPort RX Subsystem
core.
This function sets the data rate to be used by the DisplayPort RX Subsystem core .
/* Verify arguments. */ /* Check for maximum supported link rate */ /* Set link rate */