XilinxProcessorIPLib/drivers/dp14txss/examples/xdptxss_debug_example.c
void DpTxSs_ReportEdidInfo(XDpTxSs *InstancePtr)
{
	u8 Edid[128];
	u32 IntrMask;
	u32 Index;
	u32 Index1;

	/* Verify argument. */
	Xil_AssertVoid(InstancePtr != NULL);

	/* Read interrupt */
	IntrMask = XDpTxSs_ReadReg(InstancePtr->DpPtr->Config.BaseAddr,
			(XDPTXSS_INTERRUPT_MASK));

	/* Disable HPD interrupts. */
	XDpTxSs_WriteReg(InstancePtr->DpPtr->Config.BaseAddr,
			(XDPTXSS_INTERRUPT_MASK), IntrMask |
			(XDPTXSS_INTERRUPT_MASK_HPD_PULSE_DETECTED_MASK) |
			(XDPTXSS_INTERRUPT_MASK_HPD_EVENT_MASK));

	/* SST mode sink is accessed directly. */
	if (InstancePtr->UsrOpt.MstSupport == 0) {
		/* Get EDID */
		XDpTxSs_GetEdid(InstancePtr, Edid);

		/* Print the content of EDID block */
		DpTxSs_PrintEdid(Edid);

		/* Parse EDID and print */
		DpTxSs_EdidDecodeBase(Edid);
	}
	/* EDID in MST mode */
	else {
		u8 TotalSink;

		XDp_TxTopologyNode *SelSink;

		TotalSink = InstancePtr->DpPtr->TxInstance.Topology.SinkTotal;

		xil_printf("Total # of sinks found: %d\n\r", TotalSink);

		for (Index = 0; Index < TotalSink; Index++) {
			SelSink = InstancePtr->DpPtr->TxInstance.Topology.
							SinkList[Index];
			xil_printf("> Sink #%ld: LCT = %d ; RAD = ", Index,
						SelSink->LinkCountTotal);
			for (Index1 = 0; Index1 < SelSink->LinkCountTotal;
								Index1++) {
				xil_printf("%d ",
					SelSink->RelativeAddress[Index1]);
			}
			xil_printf("\n\r");

			XDpTxSs_GetRemoteEdid(InstancePtr, Index, Edid);

			DpTxSs_PrintEdid(Edid);
			DpTxSs_EdidDecodeBase(Edid);
		}
	}

	/* Re-enable interrupts */
	XDpTxSs_WriteReg(InstancePtr->DpPtr->Config.BaseAddr,
		(XDPTXSS_INTERRUPT_MASK), IntrMask);
}
/*****************************************************************************/
/**
*
* This function prints EDID info of RX device.
*
* @param	InstancePtr is a pointer to the XDpTxSs core instance.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function prints EDID info of RX device.
This function prints EDID info of RX device .
void DpTxSs_ReportEdidInfo(XDpTxSs *InstancePtr)
{
	u8 Edid[128];
	u32 IntrMask;
	u32 Index;
	u32 Index1;
	Xil_AssertVoid(InstancePtr != NULL);
	IntrMask = XDpTxSs_ReadReg(InstancePtr->DpPtr->Config.BaseAddr,
			(XDPTXSS_INTERRUPT_MASK));
	XDpTxSs_WriteReg(InstancePtr->DpPtr->Config.BaseAddr,
			(XDPTXSS_INTERRUPT_MASK), IntrMask |
			(XDPTXSS_INTERRUPT_MASK_HPD_PULSE_DETECTED_MASK) |
			(XDPTXSS_INTERRUPT_MASK_HPD_EVENT_MASK));
	if (InstancePtr->UsrOpt.MstSupport == 0) {
		XDpTxSs_GetEdid(InstancePtr, Edid);
		DpTxSs_PrintEdid(Edid);
		DpTxSs_EdidDecodeBase(Edid);
	}
	else {
		u8 TotalSink;
		XDp_TxTopologyNode *SelSink;
		TotalSink = InstancePtr->DpPtr->TxInstance.Topology.SinkTotal;
		xil_printf("Total # of sinks found: %d\n\r", TotalSink);
		for (Index = 0; Index < TotalSink; Index++) {
			SelSink = InstancePtr->DpPtr->TxInstance.Topology.
							SinkList[Index];
			xil_printf("> Sink #%ld: LCT = %d ; RAD = ", Index,
						SelSink->LinkCountTotal);
			for (Index1 = 0; Index1 < SelSink->LinkCountTotal;
								Index1++) {
				xil_printf("%d ",
					SelSink->RelativeAddress[Index1]);
			}
			xil_printf("\n\r");
			XDpTxSs_GetRemoteEdid(InstancePtr, Index, Edid);
			DpTxSs_PrintEdid(Edid);
			DpTxSs_EdidDecodeBase(Edid);
		}
	}
	XDpTxSs_WriteReg(InstancePtr->DpPtr->Config.BaseAddr,
		(XDPTXSS_INTERRUPT_MASK), IntrMask);
}
void DpTxSs_ReportEdidInfo ( XDpTxSs * InstancePtr ) { u8 Edid [ 128 ] ; u32 IntrMask ; u32 Index ; u32 Index1 ; Xil_AssertVoid ( InstancePtr != NULL ) ; IntrMask = XDpTxSs_ReadReg ( InstancePtr -> DpPtr -> Config . BaseAddr , ( XDPTXSS_INTERRUPT_MASK ) ) ; XDpTxSs_WriteReg ( InstancePtr -> DpPtr -> Config . BaseAddr , ( XDPTXSS_INTERRUPT_MASK ) , IntrMask | ( XDPTXSS_INTERRUPT_MASK_HPD_PULSE_DETECTED_MASK ) | ( XDPTXSS_INTERRUPT_MASK_HPD_EVENT_MASK ) ) ; if ( InstancePtr -> UsrOpt . MstSupport == 0 ) { XDpTxSs_GetEdid ( InstancePtr , Edid ) ; DpTxSs_PrintEdid ( Edid ) ; DpTxSs_EdidDecodeBase ( Edid ) ; } else { u8 TotalSink ; XDp_TxTopologyNode * SelSink ; TotalSink = InstancePtr -> DpPtr -> TxInstance . Topology . SinkTotal ; xil_printf ( " \n \r " , TotalSink ) ; for ( Index = 0 ; Index < TotalSink ; Index ++ ) { SelSink = InstancePtr -> DpPtr -> TxInstance . Topology . SinkList [ Index ] ; xil_printf ( " " , Index , SelSink -> LinkCountTotal ) ; for ( Index1 = 0 ; Index1 < SelSink -> LinkCountTotal ; Index1 ++ ) { xil_printf ( " " , SelSink -> RelativeAddress [ Index1 ] ) ; } xil_printf ( " \n \r " ) ; XDpTxSs_GetRemoteEdid ( InstancePtr , Index , Edid ) ; DpTxSs_PrintEdid ( Edid ) ; DpTxSs_EdidDecodeBase ( Edid ) ; } } XDpTxSs_WriteReg ( InstancePtr -> DpPtr -> Config . BaseAddr , ( XDPTXSS_INTERRUPT_MASK ) , IntrMask ) ; }
This function prints EDID info of RX device.
This function prints EDID info of RX device .
/* Verify argument. */ /* Read interrupt */ /* Disable HPD interrupts. */ /* SST mode sink is accessed directly. */ /* Get EDID */ /* Print the content of EDID block */ /* Parse EDID and print */ /* EDID in MST mode */ /* Re-enable interrupts */