XilinxProcessorIPLib/drivers/dp14txss/examples/src/zcu_pt_dp14_mst/xvid_pat_gen.c
void Vpg_VidgenSetTestPattern(XDp *InstancePtr, u8 Stream)
{
#if !NEW_PAT_GEN
	if (XDp_ReadReg(InstancePtr->Config.BaseAddr,
				(XDP_TX_USER_PIXEL_WIDTH)) == 0x4) {
		XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
			StreamOffset[Stream - 1], TestPatternControl,
				(QuadPixelMode | StreamPattern_vpg[Stream - 1]));
	}
	else if (XDp_ReadReg(InstancePtr->Config.BaseAddr,
				(XDP_TX_USER_PIXEL_WIDTH)) == 0x2) {
		XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
			StreamOffset[Stream - 1], TestPatternControl,
				(DualPixelMode | StreamPattern_vpg[Stream - 1]));
	}
	else {
		XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
			StreamOffset[Stream - 1], TestPatternControl,
			StreamPattern_vpg[Stream - 1]);
	}
#else
	XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
		StreamOffset[Stream - 1], TestPatternControl,
			(QuadPixelMode | StreamPattern_vpg[Stream - 1]));


#endif
}
/*****************************************************************************/
/**
*
* This function sets pattern to generate in Video Pattern Generator core.
*
* @param	InstancePtr is a pointer to the XDp instance.
* @param	Stream is the stream number for which to set the pattern.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function sets pattern to generate in Video Pattern Generator core.
This function sets pattern to generate in Video Pattern Generator core .
void Vpg_VidgenSetTestPattern(XDp *InstancePtr, u8 Stream)
{
#if !NEW_PAT_GEN
	if (XDp_ReadReg(InstancePtr->Config.BaseAddr,
				(XDP_TX_USER_PIXEL_WIDTH)) == 0x4) {
		XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
			StreamOffset[Stream - 1], TestPatternControl,
				(QuadPixelMode | StreamPattern_vpg[Stream - 1]));
	}
	else if (XDp_ReadReg(InstancePtr->Config.BaseAddr,
				(XDP_TX_USER_PIXEL_WIDTH)) == 0x2) {
		XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
			StreamOffset[Stream - 1], TestPatternControl,
				(DualPixelMode | StreamPattern_vpg[Stream - 1]));
	}
	else {
		XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
			StreamOffset[Stream - 1], TestPatternControl,
			StreamPattern_vpg[Stream - 1]);
	}
#else
	XDp_WriteReg((XILINX_DISPLAYPORT_VID_BASE_ADDRESS) +
		StreamOffset[Stream - 1], TestPatternControl,
			(QuadPixelMode | StreamPattern_vpg[Stream - 1]));
#endif
}
void Vpg_VidgenSetTestPattern ( XDp * InstancePtr , u8 Stream ) { #if ! NEW_PAT_GEN if ( XDp_ReadReg ( InstancePtr -> Config . BaseAddr , ( XDP_TX_USER_PIXEL_WIDTH ) ) == 0x4 ) { XDp_WriteReg ( ( XILINX_DISPLAYPORT_VID_BASE_ADDRESS ) + StreamOffset [ Stream - 1 ] , TestPatternControl , ( QuadPixelMode | StreamPattern_vpg [ Stream - 1 ] ) ) ; } else if ( XDp_ReadReg ( InstancePtr -> Config . BaseAddr , ( XDP_TX_USER_PIXEL_WIDTH ) ) == 0x2 ) { XDp_WriteReg ( ( XILINX_DISPLAYPORT_VID_BASE_ADDRESS ) + StreamOffset [ Stream - 1 ] , TestPatternControl , ( DualPixelMode | StreamPattern_vpg [ Stream - 1 ] ) ) ; } else { XDp_WriteReg ( ( XILINX_DISPLAYPORT_VID_BASE_ADDRESS ) + StreamOffset [ Stream - 1 ] , TestPatternControl , StreamPattern_vpg [ Stream - 1 ] ) ; } #else XDp_WriteReg ( ( XILINX_DISPLAYPORT_VID_BASE_ADDRESS ) + StreamOffset [ Stream - 1 ] , TestPatternControl , ( QuadPixelMode | StreamPattern_vpg [ Stream - 1 ] ) ) ; #endif }
This function sets pattern to generate in Video Pattern Generator core.
This function sets pattern to generate in Video Pattern Generator core .