XilinxProcessorIPLib/drivers/v_hdmiphy1/src/xhdmiphy1_hdmi.c
u32 XHdmiphy1_SetHdmiRxParam(XHdmiphy1 *InstancePtr, u8 QuadId,
        XHdmiphy1_ChannelId ChId)
{
	XHdmiphy1_ChannelId ChanId = ChId;
	XHdmiphy1_PllType PllType;
	u32 Status;
	u64 DruCenterFreq;

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

#if (XPAR_HDMIPHY1_0_TRANSCEIVER != XHDMIPHY1_GTYE5)
	if (XHdmiphy1_IsRxUsingCpll(InstancePtr, QuadId, ChId)) {
		Status = XHdmiphy1_HdmiCpllParam(InstancePtr, QuadId, ChId,
                    XHDMIPHY1_DIR_RX);
	}
	else {
        Status = XHdmiphy1_HdmiQpllParam(InstancePtr, QuadId, ChId,
                    XHDMIPHY1_DIR_RX);
		/* Update SysClk and PLL Clk registers immediately */
		XHdmiphy1_WriteCfgRefClkSelReg(InstancePtr, QuadId);
	}
#else
        Status = XHdmiphy1_HdmiRxPllParam(InstancePtr, QuadId, ChId);
#endif

	if (InstancePtr->HdmiRxDruIsEnabled) {
		/* Determine PLL type. */
		PllType = XHdmiphy1_GetPllType(InstancePtr, 0, XHDMIPHY1_DIR_RX,
                    XHDMIPHY1_CHANNEL_ID_CH1);
		/* Update the ChId */
		ChanId = XHdmiphy1_GetRcfgChId(InstancePtr, 0,
                    XHDMIPHY1_DIR_RX, PllType);

		DruCenterFreq = XHdmiphy1_DruCalcCenterFreqHz(InstancePtr, QuadId,
					ChanId);
		XHdmiphy1_DruSetCenterFreqHz(InstancePtr, XHDMIPHY1_CHANNEL_ID_CHA,
						DruCenterFreq);
	}

	return Status;
}
/*****************************************************************************/
/**
* This function update/set the HDMI RX parameter.
*
* @param	InstancePtr is a pointer to the Hdmiphy core instance.
* @param	QuadId is the GT quad ID to operate on.
* @param	ChId is the channel ID to operate on.
*
* @return
*		- XST_SUCCESS if RX parameters set/updated.
*		- XST_FAILURE if low resolution video not supported.
*
* @note		None.
*
******************************************************************************/
This function update/set the HDMI RX parameter.
This function update / set the HDMI RX parameter .
u32 XHdmiphy1_SetHdmiRxParam(XHdmiphy1 *InstancePtr, u8 QuadId,
        XHdmiphy1_ChannelId ChId)
{
	XHdmiphy1_ChannelId ChanId = ChId;
	XHdmiphy1_PllType PllType;
	u32 Status;
	u64 DruCenterFreq;
	Xil_AssertNonvoid(InstancePtr != NULL);
#if (XPAR_HDMIPHY1_0_TRANSCEIVER != XHDMIPHY1_GTYE5)
	if (XHdmiphy1_IsRxUsingCpll(InstancePtr, QuadId, ChId)) {
		Status = XHdmiphy1_HdmiCpllParam(InstancePtr, QuadId, ChId,
                    XHDMIPHY1_DIR_RX);
	}
	else {
        Status = XHdmiphy1_HdmiQpllParam(InstancePtr, QuadId, ChId,
                    XHDMIPHY1_DIR_RX);
		XHdmiphy1_WriteCfgRefClkSelReg(InstancePtr, QuadId);
	}
#else
        Status = XHdmiphy1_HdmiRxPllParam(InstancePtr, QuadId, ChId);
#endif
	if (InstancePtr->HdmiRxDruIsEnabled) {
		PllType = XHdmiphy1_GetPllType(InstancePtr, 0, XHDMIPHY1_DIR_RX,
                    XHDMIPHY1_CHANNEL_ID_CH1);
		ChanId = XHdmiphy1_GetRcfgChId(InstancePtr, 0,
                    XHDMIPHY1_DIR_RX, PllType);
		DruCenterFreq = XHdmiphy1_DruCalcCenterFreqHz(InstancePtr, QuadId,
					ChanId);
		XHdmiphy1_DruSetCenterFreqHz(InstancePtr, XHDMIPHY1_CHANNEL_ID_CHA,
						DruCenterFreq);
	}
	return Status;
}
u32 XHdmiphy1_SetHdmiRxParam ( XHdmiphy1 * InstancePtr , u8 QuadId , XHdmiphy1_ChannelId ChId ) { XHdmiphy1_ChannelId ChanId = ChId ; XHdmiphy1_PllType PllType ; u32 Status ; u64 DruCenterFreq ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; #if ( XPAR_HDMIPHY1_0_TRANSCEIVER != XHDMIPHY1_GTYE5 ) if ( XHdmiphy1_IsRxUsingCpll ( InstancePtr , QuadId , ChId ) ) { Status = XHdmiphy1_HdmiCpllParam ( InstancePtr , QuadId , ChId , XHDMIPHY1_DIR_RX ) ; } else { Status = XHdmiphy1_HdmiQpllParam ( InstancePtr , QuadId , ChId , XHDMIPHY1_DIR_RX ) ; XHdmiphy1_WriteCfgRefClkSelReg ( InstancePtr , QuadId ) ; } #else Status = XHdmiphy1_HdmiRxPllParam ( InstancePtr , QuadId , ChId ) ; #endif if ( InstancePtr -> HdmiRxDruIsEnabled ) { PllType = XHdmiphy1_GetPllType ( InstancePtr , 0 , XHDMIPHY1_DIR_RX , XHDMIPHY1_CHANNEL_ID_CH1 ) ; ChanId = XHdmiphy1_GetRcfgChId ( InstancePtr , 0 , XHDMIPHY1_DIR_RX , PllType ) ; DruCenterFreq = XHdmiphy1_DruCalcCenterFreqHz ( InstancePtr , QuadId , ChanId ) ; XHdmiphy1_DruSetCenterFreqHz ( InstancePtr , XHDMIPHY1_CHANNEL_ID_CHA , DruCenterFreq ) ; } return Status ; }
This function update/set the HDMI RX parameter.
This function update / set the HDMI RX parameter .
/* Verify arguments. */ /* Update SysClk and PLL Clk registers immediately */ /* Determine PLL type. */ /* Update the ChId */