XilinxProcessorIPLib/drivers/dp14txss/examples/src/pt_only/rx.c
void DpRxSs_TrainingLostHandler(void *InstancePtr)
{
	/* Reset CRC Test Counter in DP DPCD Space */
	XVidFrameCrc_Reset(&VidFrameCRC_rx);
	VidFrameCRC_rx.TEST_CRC_CNT = 0;
	XDp_WriteReg(DpRxSsInst.DpPtr->Config.BaseAddr,
			 XDP_RX_CRC_CONFIG,
			 (VidFrameCRC_rx.TEST_CRC_SUPPORTED << 5 |
					 VidFrameCRC_rx.TEST_CRC_CNT));

	XDp_RxGenerateHpdInterrupt(DpRxSsInst.DpPtr, 750);
	XDpRxSs_AudioDisable(&DpRxSsInst);
	XDp_RxDtgDis(DpRxSsInst.DpPtr);
	// mask the TX interrupts to avoid spurious HPDs
	mask_intr();
	DpRxSsInst.link_up_trigger = 0;
	DpRxSsInst.VBlankCount = 0;
	XDp_WriteReg(DpRxSsInst.DpPtr->Config.BaseAddr, 0x1C, 0x80);
	XDp_WriteReg(DpRxSsInst.DpPtr->Config.BaseAddr, 0x1C, 0x0);
	appx_fs_dup = 0;
	tx_done = 0;
	start_i2s_clk = 0;
	i2s_tx_started = 0;
	rx_aud = 0;
	tx_after_rx = 0;
//	audio_info_avail = 0;
    AudioinfoFrame.frame_count = 0;
    AudioinfoFrame.all_count = 0;
	if (rx_trained == 1) {
#if !PHY_COMP
		xil_printf ("Training Lost !!\r\n");
#endif
	}
	rx_trained = 0;
	vblank_captured = 0;
	endindex = 0;
	fifocount = 0;
	startindex = 0;
	type_vsc = 0;

	XDpRxSs_MaskAdaptiveIntr(&DpRxSsInst, 0xC0000000);
}
/*****************************************************************************/
/**
*
* This function is the callback function for when a training lost interrupt
* occurs.
*
* @param    InstancePtr is a pointer to the XDpRxSs instance.
*
* @return    None.
*
* @note        None.
*
******************************************************************************/
This function is the callback function for when a training lost interrupt
occurs.
This function is the callback function for when a training lost interrupt occurs .
void DpRxSs_TrainingLostHandler(void *InstancePtr)
{
	XVidFrameCrc_Reset(&VidFrameCRC_rx);
	VidFrameCRC_rx.TEST_CRC_CNT = 0;
	XDp_WriteReg(DpRxSsInst.DpPtr->Config.BaseAddr,
			 XDP_RX_CRC_CONFIG,
			 (VidFrameCRC_rx.TEST_CRC_SUPPORTED << 5 |
					 VidFrameCRC_rx.TEST_CRC_CNT));
	XDp_RxGenerateHpdInterrupt(DpRxSsInst.DpPtr, 750);
	XDpRxSs_AudioDisable(&DpRxSsInst);
	XDp_RxDtgDis(DpRxSsInst.DpPtr);
	mask_intr();
	DpRxSsInst.link_up_trigger = 0;
	DpRxSsInst.VBlankCount = 0;
	XDp_WriteReg(DpRxSsInst.DpPtr->Config.BaseAddr, 0x1C, 0x80);
	XDp_WriteReg(DpRxSsInst.DpPtr->Config.BaseAddr, 0x1C, 0x0);
	appx_fs_dup = 0;
	tx_done = 0;
	start_i2s_clk = 0;
	i2s_tx_started = 0;
	rx_aud = 0;
	tx_after_rx = 0;
    AudioinfoFrame.frame_count = 0;
    AudioinfoFrame.all_count = 0;
	if (rx_trained == 1) {
#if !PHY_COMP
		xil_printf ("Training Lost !!\r\n");
#endif
	}
	rx_trained = 0;
	vblank_captured = 0;
	endindex = 0;
	fifocount = 0;
	startindex = 0;
	type_vsc = 0;
	XDpRxSs_MaskAdaptiveIntr(&DpRxSsInst, 0xC0000000);
}
void DpRxSs_TrainingLostHandler ( void * InstancePtr ) { XVidFrameCrc_Reset ( & VidFrameCRC_rx ) ; VidFrameCRC_rx . TEST_CRC_CNT = 0 ; XDp_WriteReg ( DpRxSsInst . DpPtr -> Config . BaseAddr , XDP_RX_CRC_CONFIG , ( VidFrameCRC_rx . TEST_CRC_SUPPORTED << 5 | VidFrameCRC_rx . TEST_CRC_CNT ) ) ; XDp_RxGenerateHpdInterrupt ( DpRxSsInst . DpPtr , 750 ) ; XDpRxSs_AudioDisable ( & DpRxSsInst ) ; XDp_RxDtgDis ( DpRxSsInst . DpPtr ) ; mask_intr ( ) ; DpRxSsInst . link_up_trigger = 0 ; DpRxSsInst . VBlankCount = 0 ; XDp_WriteReg ( DpRxSsInst . DpPtr -> Config . BaseAddr , 0x1C , 0x80 ) ; XDp_WriteReg ( DpRxSsInst . DpPtr -> Config . BaseAddr , 0x1C , 0x0 ) ; appx_fs_dup = 0 ; tx_done = 0 ; start_i2s_clk = 0 ; i2s_tx_started = 0 ; rx_aud = 0 ; tx_after_rx = 0 ; AudioinfoFrame . frame_count = 0 ; AudioinfoFrame . all_count = 0 ; if ( rx_trained == 1 ) { #if ! PHY_COMP xil_printf ( " \r \n " ) ; #endif } rx_trained = 0 ; vblank_captured = 0 ; endindex = 0 ; fifocount = 0 ; startindex = 0 ; type_vsc = 0 ; XDpRxSs_MaskAdaptiveIntr ( & DpRxSsInst , 0xC0000000 ) ; }
This function is the callback function for when a training lost interrupt
occurs.
This function is the callback function for when a training lost interrupt occurs .
/* Reset CRC Test Counter in DP DPCD Space */ // mask the TX interrupts to avoid spurious HPDs //	audio_info_avail = 0;