mmidp
Vitis Drivers API Documentation
Overview

Functions

void XMmiDp_ClearGeneralHpdEvent (XMmiDp *InstancePtr)
 This function clears XMMIDP_GENERAL_INT0 HPD_EVENT bit. More...
 
void XMmiDp_GeneralInterruptEnable (XMmiDp *InstancePtr, u32 Mask)
 This function enables XMMIDP_GENERAL_INTERRUPT_0 bits based on the mask. More...
 
void XMmiDp_HpdInterruptEnable (XMmiDp *InstancePtr, u32 Mask)
 This function enables XMMIDP_HPD_INTERRUPT_ENABLE bits based on the mask. More...
 
void XMmiDp_SetHpdIrqHandler (XMmiDp *InstancePtr, XMmiDp_HpdIrqHandler CallbackFunc, void *CallbackRef)
 This function installs a callback function for when a hpd irq event interrupt occurs. More...
 
void XMmiDp_SetHpdHotPlugHandler (XMmiDp *InstancePtr, XMmiDp_HpdHotPlugHandler CallbackFunc, void *CallbackRef)
 This function installs a callback function for when a hpd hotplug interrupt occurs. More...
 
void XMmiDp_HpdInterruptHandler (XMmiDp *InstancePtr)
 This function is the HPD Event interrupt handler for the XMmiDp driver. More...
 
void XMmiDp_FastLinkTrainEnable (XMmiDp *InstancePtr)
 This function enables fast link training in the core controller. More...
 
void XMmiDp_FastLinkTrainDisable (XMmiDp *InstancePtr)
 This function disables fast link training in the core controller. More...
 
u32 XMmiDp_GetRxMaxLaneCount (XMmiDp *InstancePtr)
 This function gets the max lane count supported from DPCD. More...
 
u32 XMmiDp_GetRxMaxLinkRate (XMmiDp *InstancePtr)
 This function gets the max link rate supported from Rx DPCD register. More...
 
u32 XMmiDp_StartLinkXmit (XMmiDp *InstancePtr)
 This function initates link training sequence with the Rx. More...
 
u32 XMmiDp_SetSinkDpcdLinkCfgField (XMmiDp *InstancePtr)
 This function configures DPCD Rx Field. More...
 
void XDpPSu14_EnableCctlEnhanceFraming (XMmiDp *InstancePtr)
 This function configures CCTL enhance framing enable bit. More...
 
void XDpPSu14_DisableCctlEnhanceFraming (XMmiDp *InstancePtr)
 This function configures CCTL enhance framing enable bit. More...
 
void XMmiDp_GetDpcdTrainingAuxRdInterval (XMmiDp *InstancePtr)
 This function reads Training Aux Read Interval register of sink DPCD. More...
 
u32 XMmiDp_GetTrainingDelay (XMmiDp *InstancePtr)
 This function returngs the training aux interval. More...
 
u32 XMmiDp_GetDpcdLaneStatusAdjReqs (XMmiDp *InstancePtr)
 This function will do a burst AUX read from the RX device over the AUX channel. More...
 
u32 XMmiDp_CheckClockRecovery (XMmiDp *InstancePtr, u8 LaneCount)
 This function checks if the RX device's DisplayPort Configuration Data (DPCD) indicates that the clock recovery sequence during link training was successful - the RX device's link clock and data recovery unit has realized and maintained the frequency lock for all lanes currently in use. More...
 
u32 XMmiDp_AdjVswingPreemp (XMmiDp *InstancePtr)
 This function reads the adjusted voltage swing and pre-emphasis level settings from the Rx DPCD register and modify the drive settings accordingly during link training. More...
 
void XMmiDp_SetVswingPreemp (XMmiDp *InstancePtr, u8 *AuxData)
 This function sets current voltage swing and pre-emphasis level settings from the LinkConfig structure to Phy and DPCD. More...
 
u32 XMmiDp_SetTrainingPattern (XMmiDp *InstancePtr, XMmiDp_PhyTrainingPattern Pattern)
 This function sets the training pattern to be used during link training for both the DisplayPort TX core and the RX device. More...
 
u32 XMmiDp_SetLinkRate (XMmiDp *InstancePtr, XMmiDp_PhyRate LinkRate)
 This function sets the Rx Dpcd link rate as well as Phy link rate. More...
 
void XMmiDp_SetLaneCount (XMmiDp *InstancePtr, XMmiDp_PhyLanes LaneCount)
 This function sets the Rx Dpcd lane count as well as Phy lane count. More...
 
XMmiDp_TrainingState XMmiDp_TrainingStateClockRecovery (XMmiDp *InstancePtr)
 This function runs the clock recovery sequence as part of link training. More...
 
XMmiDp_TrainingState XMmiDp_TrainingStateAdjustLinkRate (XMmiDp *InstancePtr)
 This function is reached if either the clock recovery or the channel equalization process failed during training. More...
 
XMmiDp_TrainingState XMmiDp_TrainingStateAdjustLaneCount (XMmiDp *InstancePtr)
 This function is reached if either the clock recovery or the channel equalization process failed during training, and a minimal data rate of 1.62 Gbps was being used. More...
 
void XMmiDp_GetDpcdMaxDownspread (XMmiDp *InstancePtr)
 This function reads Rx DPCD MaxDownspread register bits. More...
 
void XMmiDp_GetDpcdRev (XMmiDp *InstancePtr)
 This function reads Rx DPCD revision number. More...
 
u32 XMmiDp_GetRxCapabilities (XMmiDp *InstancePtr)
 This function reads Rx DPCD capability registers to initiate link training. More...
 
u32 XMmiDp_CheckChannelEqualization (XMmiDp *InstancePtr, u8 LaneCount)
 This function checks if the RX device's DisplayPort Configuration Data (DPCD) indicates that the channel equalization sequence during link training was successful - the RX device has achieved channel equalization, symbol lock, and interlane alignment for all lanes currently in use. More...
 
XMmiDp_TrainingState XMmiDp_TrainingStateChannelEqualization (XMmiDp *InstancePtr)
 This function runs the channel equalization sequence as part of link training. More...
 
u32 XMmiDp_CheckLinkStatus (XMmiDp *InstancePtr, u8 LaneCount)
 This function checks if the Rx DisplayPort Configuration Data (DPCD) indicates the receiver has achieved and maintained clock recovery, channel equalization, symbol lock, and interlane alignment for all lanes currently in use. More...
 
u32 XMmiDp_RunTraining (XMmiDp *InstancePtr)
 This function runs the link training process. More...
 
void XMmiDp_WaitUs (XMmiDp *InstancePtr, u32 MicroSeconds)
 This function is the delay/sleep function for the XMmiDp driver. More...
 
u32 XMmiDp_AuxWrite (XMmiDp *InstancePtr, u32 DpcdAddr, u32 Bytes, void *Data)
 This function issues a write request over the AUX channel that will write to the RX device's DisplayPort Configuration Data (DPCD) address space. More...
 
u32 XMmiDp_AuxRead (XMmiDp *InstancePtr, u32 DpcdAddr, u32 Bytes, void *Data)
 This function issues a read request over the AUX channel that will read from the RX device's DisplayPort Configuration Data (DPCD) address space. More...
 
u32 XMmiDp_I2cWrite (XMmiDp *InstancePtr, u32 I2cAddr, u32 Bytes, void *Data)
 This function performs an I2C write over the AUX channel. More...
 
u32 XMmiDp_I2cRead (XMmiDp *InstancePtr, u32 I2cAddr, u16 Offset, u32 Bytes, void *Data)
 This function performs an I2C read over the AUX channel. More...
 
void XMmiDp_RegReadModifyWrite (XMmiDp *InstancePtr, u32 RegOffset, u32 Mask, u32 Shift, u32 Val)
 This helper api reads value from register, computes the new value and writes to the register. More...
 
void XMmiDp_DpcdReadModifyWrite (XMmiDp *InstancePtr, u32 DpcdReg, u32 Mask, u32 Shift, u32 Val)
 This helper api reads value from DPCD, computes the new value and writes to the DPCD register. More...
 
void XMmiDp_SetDpcdLaneCount (XMmiDp *InstancePtr)
 This function sets the number of lanes to be used by the main link for both the DisplayPort TX core and the RX device. More...
 
void XMmiDp_SetPhyLaneCount (XMmiDp *InstancePtr, XMmiDp_PhyLanes LaneCount)
 This function sets the number of lanes to be used by the main link for both the DisplayPort TX core and the RX device. More...
 
void XMmiDp_SetDpcdLinkRate (XMmiDp *InstancePtr)
 This function sets the dpcd link bw to be used by the main link for both the DisplayPort TX core and the RX device. More...
 
void XMmiDp_SetPhyLinkRate (XMmiDp *InstancePtr, XMmiDp_PhyRate LinkRate)
 This function sets the data rate to be used by the main link for both the DisplayPort TX core and the RX device. More...
 
void XMmiDp_SetDpcdLinkQualPattern (XMmiDp *InstancePtr, XMmiDp_PhyTrainingPattern Pattern)
 This function sets the DPCD Link qual_0 training pattern to be used by the main link for both the DisplayPort TX core and the RX device. More...
 
void XMmiDp_SetDpcdTrainingPattern (XMmiDp *InstancePtr, XMmiDp_PhyTrainingPattern Pattern)
 This function sets the DPCD training pattern to be used by the main link for both the DisplayPort TX core and the RX device. More...
 
void XMmiDp_SetPhyTrainingPattern (XMmiDp *InstancePtr, XMmiDp_PhyTrainingPattern Pattern)
 This function sets the training pattern to be used by the main link for both the DisplayPort TX core and the RX device. More...
 
void XMmiDp_SetDpcdVoltageSwing (XMmiDp *InstancePtr, XMmiDp_PhyVSwing *VsLevel)
 This function sets the DPCD VoltageSwing levels int the DisplayPort TX core. More...
 
void XMmiDp_SetPhyVoltageSwing (XMmiDp *InstancePtr, u8 *VsLevel)
 This function sets the VoltageSwing levels in the DisplayPort TX core. More...
 
void XMmiDp_SetDpcdPreEmphasis (XMmiDp *InstancePtr, XMmiDp_PhyPreEmp *PeLevel)
 This function sets the DPCD VoltagePreEmphasis levels for the DisplayPort TX PHY. More...
 
void XMmiDp_SetPhyPreEmphasis (XMmiDp *InstancePtr, u8 *PeLevel)
 This function sets the VoltagePreEmphasis levels for the DisplayPort TX PHY. More...
 
void XMmiDp_SetPhyXmitEnable (XMmiDp *InstancePtr)
 This function enables phy transfer for lanes. More...
 
void XMmiDp_SetPhyXmitDisable (XMmiDp *InstancePtr)
 This function disables phy transfer for lanes. More...
 
void XMmiDp_PhyScrambleEnable (XMmiDp *InstancePtr)
 This function enables phy scrambler over the main link through CCTL register. More...
 
void XMmiDp_PhyScrambleDisable (XMmiDp *InstancePtr)
 This function disable phy scrambler. More...
 
u32 XMmiDp_IsConnected (XMmiDp *InstancePtr)
 This function checks if there is a connected RX device. More...
 
void XMmiDp_CfgInitialize (XMmiDp *InstancePtr, u32 BaseAddr)
 This function intializes the configuration for the XMmiDp Instance. More...
 
u32 XMmiDp_PhyWaitReady (XMmiDp *InstancePtr)
 This function waits for the DisplayPort PHY to come out of reset. More...
 
void XMmiDp_PhySoftReset (XMmiDp *InstancePtr)
 This function does a PHY Soft reset. More...
 
u32 XMmiDp_GetEdidBlock (XMmiDp *InstancePtr, u8 *Data, u8 BlockNum)
 This function retrieves connected RX devices Extended Display Identification given the block number. More...
 
void XMmiDp_PhySSCEnable (XMmiDp *InstancePtr)
 This function enables SSC on the PHY. More...
 
void XMmiDp_PhySSCDisable (XMmiDp *InstancePtr)
 This function disables SSC on the PHY. More...
 
void XMmiDp_Initialize (XMmiDp *InstancePtr)
 This function Initializes the XMmiDp Instance structure. More...
 
void XMmiDp_SetPhyPowerdown (XMmiDp *InstancePtr, XMmiDp_PhyPwrDown Control)
 This function sets the phy powerdown control val. More...
 
void XMmiDp_SetPhyWidth (XMmiDp *InstancePtr, XMmiDp_PhyWidth Width)
 This function sets the phy width control val. More...
 
void XMmiDp_SetAux_250Us_Cnt_Limit (XMmiDp *InstancePtr, u16 Limit)
 This function sets the AUX_250US_CNT_LIMIT. More...
 
void XMmiDp_SetAux_2000Us_Cnt_Limit (XMmiDp *InstancePtr, u16 Limit)
 This function sets the AUX_2000US_CNT_LIMIT. More...
 
void XMmiDp_SetAux_100000Us_Cnt_Limit (XMmiDp *InstancePtr, u16 Limit)
 This function sets the AUX_100000US_CNT_LIMIT. More...
 
void XMmiDp_SetPmConfig1 (XMmiDp *InstancePtr, u32 Val)
 This function sets PM_COFIG1 register. More...
 
void XMmiDp_SetPmConfig2 (XMmiDp *InstancePtr, u32 Val)
 This function sets PM_COFIG2 register. More...
 
void XMmiDp_DisableVideoStream (XMmiDp *InstancePtr, u8 Stream)
 This function disables video stream. More...
 
void XMmiDp_EnableVideoStream (XMmiDp *InstancePtr, u8 Stream)
 This function enabless video stream. More...
 
void XMmiDp_ClearMsaValues (XMmiDp *InstancePtr, u8 Stream)
 This function clears MSA values. More...
 
void XMmiDp_ClearVideoConfigValues (XMmiDp *InstancePtr, u8 Stream)
 This function clears out Video Config Register values. More...
 
void XMmiDp_SetVInputPolarityCtrl (XMmiDp *InstancePtr, u8 Stream)
 This function sets the video input polarity control. More...
 
void XMmiDp_SetVideoConfig1 (XMmiDp *InstancePtr, u8 Stream)
 This function sets the video config1 register. More...
 
void XMmiDp_SetVideoConfig2 (XMmiDp *InstancePtr, u8 Stream)
 This function sets the video config2 register. More...
 
void XMmiDp_SetVideoConfig3 (XMmiDp *InstancePtr, u8 Stream)
 This function sets the video config3 register. More...
 
void XMmiDp_SetVideoConfig4 (XMmiDp *InstancePtr, u8 Stream)
 This function sets the video config4 register. More...
 
void XMmiDp_SetVideoConfig5 (XMmiDp *InstancePtr, u8 Stream)
 This function sets the video config5 register. More...
 
void XMmiDp_SetVSampleCtrl (XMmiDp *InstancePtr, u8 Stream)
 This function sets the vsample register. More...
 
void XMmiDp_SetVideoMsa1 (XMmiDp *InstancePtr, u8 Stream)
 This function sets video msa1 register. More...
 
void XMmiDp_SetVideoMsa2 (XMmiDp *InstancePtr, u8 Stream)
 This function sets video msa2 register. More...
 
void XMmiDp_SetVideoMsa3 (XMmiDp *InstancePtr, u8 Stream)
 This function sets video msa3 register. More...
 
void XMmiDp_SetHBlankInterval (XMmiDp *InstancePtr, u8 Stream)
 This function sets video HBlankInterval register. More...
 
void XMmiDp_ConfigureVideoController (XMmiDp *InstancePtr, u8 Stream)
 This is helper api that programs the VideoController MSA, VideoConfig registers for a specific stream. More...
 
void XMmiDp_ClearVideoController (XMmiDp *InstancePtr)
 This is helper api that clears the VideoController MSA, VideoConfig registers for a specific stream. More...
 
void XMmiDp_SetMsaBpc (XMmiDp *InstancePtr, u8 Stream, u8 BitsPerColor)
 This function sets the bits per color value of the video stream. More...
 
void XMmiDp_SetPixModeSel (XMmiDp *InstancePtr, u8 Stream, XMmiDp_PPC PixModeSel)
 This function sets the pixel mode of the video stream. More...
 
void XMmiDp_SetVideoMapping (XMmiDp *InstancePtr, u8 Stream, XMmiDp_VidMap VidMap)
 This function sets the video format of the video stream. More...
 
void XMmiDp_SetVidStreamEnable (XMmiDp *InstancePtr, u8 Stream, u8 StreamEnable)
 This function sets the video stream to enable or disable. More...
 

Function Documentation

void XDpPSu14_DisableCctlEnhanceFraming ( XMmiDp InstancePtr)

This function configures CCTL enhance framing enable bit.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

void XDpPSu14_EnableCctlEnhanceFraming ( XMmiDp InstancePtr)

This function configures CCTL enhance framing enable bit.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

u32 XMmiDp_AdjVswingPreemp ( XMmiDp InstancePtr)

This function reads the adjusted voltage swing and pre-emphasis level settings from the Rx DPCD register and modify the drive settings accordingly during link training.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • XST_SUCCESS if writing the settings was successful.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_AuxWrite(), and XMmiDp_SetVswingPreemp().

Referenced by XMmiDp_TrainingStateChannelEqualization(), and XMmiDp_TrainingStateClockRecovery().

u32 XMmiDp_AuxRead ( XMmiDp InstancePtr,
u32  DpcdAddr,
u32  Bytes,
void *  Data 
)

This function issues a read request over the AUX channel that will read from the RX device's DisplayPort Configuration Data (DPCD) address space.

The read message will be divided into multiple transactions which read a maximum of 16 bytes each.

Parameters
InstancePtris a pointer to the XMmiDp instance.
DpcdAddressis the starting address to read from the RX device.
BytesToReadis the number of bytes to read from the RX device.
Datais a pointer to the data buffer that will be filled with read data.
Returns
  • XST_SUCCESS if the AUX read request was successfully acknowledged.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_ERROR_COUNT_MAX if the AUX request timed out.
  • XST_FAILURE otherwise.
Note
None.

Referenced by XMmiDp_DpcdReadModifyWrite(), XMmiDp_GetDpcdLaneStatusAdjReqs(), XMmiDp_GetDpcdMaxDownspread(), XMmiDp_GetDpcdRev(), XMmiDp_GetDpcdTrainingAuxRdInterval(), XMmiDp_GetRxCapabilities(), XMmiDp_GetRxMaxLaneCount(), XMmiDp_GetRxMaxLinkRate(), XMmiDp_RunTraining(), and XMmiDp_SetDpcdTrainingPattern().

u32 XMmiDp_AuxWrite ( XMmiDp InstancePtr,
u32  DpcdAddr,
u32  Bytes,
void *  Data 
)

This function issues a write request over the AUX channel that will write to the RX device's DisplayPort Configuration Data (DPCD) address space.

The write message will be divided into multiple transactions which write a maximum of 16 bytes each.

Parameters
InstancePtris a pointer to the XMmiDp instance.
DpcdAddris the starting address to write to the RX device.
Bytesis the number of bytes to write to the RX device.
Datais a pointer to the data buffer that contains the data to be written to the RX device.
Returns
  • XST_SUCCESS if the AUX write request was successfully acknowledged.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_ERROR_COUNT_MAX if the AUX request timed out.
  • XST_FAILURE otherwise.
Note
None.

Referenced by XMmiDp_AdjVswingPreemp(), XMmiDp_DpcdReadModifyWrite(), XMmiDp_RunTraining(), XMmiDp_SetDpcdLinkRate(), XMmiDp_SetDpcdTrainingPattern(), XMmiDp_SetSinkDpcdLinkCfgField(), and XMmiDp_SetTrainingPattern().

void XMmiDp_CfgInitialize ( XMmiDp InstancePtr,
u32  BaseAddr 
)

This function intializes the configuration for the XMmiDp Instance.

Parameters
InstancePtris a pointer to the XMmiDp instance.
BaseAddrsets the base address of the DP instance
Returns
None.
u32 XMmiDp_CheckChannelEqualization ( XMmiDp InstancePtr,
u8  LaneCount 
)

This function checks if the RX device's DisplayPort Configuration Data (DPCD) indicates that the channel equalization sequence during link training was successful - the RX device has achieved channel equalization, symbol lock, and interlane alignment for all lanes currently in use.

Parameters
InstancePtris a pointer to the XDpPsu instance.
LaneCountis the number of lanes to check.
Returns
  • XST_SUCCESS if the RX device has achieved channel equalization symbol lock, and interlane alignment for all lanes in use.
  • XST_FAILURE otherwise.
Note
None.

Referenced by XMmiDp_CheckLinkStatus(), and XMmiDp_TrainingStateChannelEqualization().

u32 XMmiDp_CheckClockRecovery ( XMmiDp InstancePtr,
u8  LaneCount 
)

This function checks if the RX device's DisplayPort Configuration Data (DPCD) indicates that the clock recovery sequence during link training was successful - the RX device's link clock and data recovery unit has realized and maintained the frequency lock for all lanes currently in use.

Parameters
InstancePtris a pointer to the XMmiDp instance.
LaneCountis the number of lanes to check.
Returns
  • XST_SUCCESS if the RX device's clock recovery PLL has achieved frequency lock for all lanes in use.
  • XST_FAILURE otherwise.
Note
None.

Referenced by XMmiDp_CheckLinkStatus(), XMmiDp_TrainingStateChannelEqualization(), and XMmiDp_TrainingStateClockRecovery().

u32 XMmiDp_CheckLinkStatus ( XMmiDp InstancePtr,
u8  LaneCount 
)

This function checks if the Rx DisplayPort Configuration Data (DPCD) indicates the receiver has achieved and maintained clock recovery, channel equalization, symbol lock, and interlane alignment for all lanes currently in use.

Parameters
InstancePtris a pointer to the XMmiDp instance.
LaneCountis the number of lanes to check.
Returns
  • XST_SUCCESS if the RX device has maintained clock recovery, channel equalization, symbol lock, and interlane alignment.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_CheckChannelEqualization(), XMmiDp_CheckClockRecovery(), XMmiDp_GetDpcdLaneStatusAdjReqs(), and XMmiDp_IsConnected().

Referenced by XMmiDp_RunTraining().

void XMmiDp_ClearGeneralHpdEvent ( XMmiDp InstancePtr)

This function clears XMMIDP_GENERAL_INT0 HPD_EVENT bit.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Returns
None
Note
None.

References XMMIDP_GEN_INT0, XMmiDp_ReadReg, and XMmiDp_WriteReg.

void XMmiDp_ClearMsaValues ( XMmiDp InstancePtr,
u8  Stream 
)

This function clears MSA values.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ClearVideoController().

void XMmiDp_ClearVideoConfigValues ( XMmiDp InstancePtr,
u8  Stream 
)

This function clears out Video Config Register values.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMMIDP_VIDEO_CONFIG1, and XMmiDp_WriteReg.

Referenced by XMmiDp_ClearVideoController().

void XMmiDp_ClearVideoController ( XMmiDp InstancePtr)

This is helper api that clears the VideoController MSA, VideoConfig registers for a specific stream.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_ClearMsaValues(), and XMmiDp_ClearVideoConfigValues().

void XMmiDp_ConfigureVideoController ( XMmiDp InstancePtr,
u8  Stream 
)

This is helper api that programs the VideoController MSA, VideoConfig registers for a specific stream.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_SetHBlankInterval(), XMmiDp_SetVideoConfig1(), XMmiDp_SetVideoConfig2(), XMmiDp_SetVideoConfig3(), XMmiDp_SetVideoConfig4(), XMmiDp_SetVideoConfig5(), XMmiDp_SetVideoMsa1(), XMmiDp_SetVideoMsa2(), XMmiDp_SetVideoMsa3(), XMmiDp_SetVInputPolarityCtrl(), and XMmiDp_SetVSampleCtrl().

void XMmiDp_DisableVideoStream ( XMmiDp InstancePtr,
u8  Stream 
)

This function disables video stream.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_RegReadModifyWrite().

void XMmiDp_DpcdReadModifyWrite ( XMmiDp InstancePtr,
u32  DpcdReg,
u32  Mask,
u32  Shift,
u32  Val 
)

This helper api reads value from DPCD, computes the new value and writes to the DPCD register.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Registeroffset to read/write values
Maskvalue
Shiftvalue
Valto be written
Returns
  • None.
Note
None.

References XMmiDp_AuxRead(), and XMmiDp_AuxWrite().

Referenced by XMmiDp_SetDpcdLaneCount(), XMmiDp_SetDpcdLinkQualPattern(), XMmiDp_SetDpcdPreEmphasis(), XMmiDp_SetDpcdVoltageSwing(), and XMmiDp_SetSinkDpcdLinkCfgField().

void XMmiDp_EnableVideoStream ( XMmiDp InstancePtr,
u8  Stream 
)

This function enabless video stream.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_RegReadModifyWrite().

void XMmiDp_FastLinkTrainDisable ( XMmiDp InstancePtr)

This function disables fast link training in the core controller.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

void XMmiDp_FastLinkTrainEnable ( XMmiDp InstancePtr)

This function enables fast link training in the core controller.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Phywidth val to be used over the main link based on one of the following selects:
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

void XMmiDp_GeneralInterruptEnable ( XMmiDp InstancePtr,
u32  Mask 
)

This function enables XMMIDP_GENERAL_INTERRUPT_0 bits based on the mask.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Maskspecifies the interrupt bits to enable
Returns
None
Note
None.

References XMMIDP_GEN_INT_ENABLE0, XMmiDp_ReadReg, and XMmiDp_WriteReg.

u32 XMmiDp_GetDpcdLaneStatusAdjReqs ( XMmiDp InstancePtr)

This function will do a burst AUX read from the RX device over the AUX channel.

The contents of the status registers will be stored for later use by XDp_TxCheckClockRecovery, XDp_TxCheckChannelEqualization, and XDp_TxAdjVswingPreemp.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
  • XST_SUCCESS if the AUX read was successful.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_AuxRead().

Referenced by XMmiDp_CheckLinkStatus(), XMmiDp_TrainingStateChannelEqualization(), and XMmiDp_TrainingStateClockRecovery().

void XMmiDp_GetDpcdMaxDownspread ( XMmiDp InstancePtr)

This function reads Rx DPCD MaxDownspread register bits.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
None
Note
None.

References XMmiDp_AuxRead().

Referenced by XMmiDp_GetRxCapabilities().

void XMmiDp_GetDpcdRev ( XMmiDp InstancePtr)

This function reads Rx DPCD revision number.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
None
Note
None.

References XMmiDp_AuxRead(), and XMMIDP_DPCD_REV.

Referenced by XMmiDp_GetRxCapabilities().

void XMmiDp_GetDpcdTrainingAuxRdInterval ( XMmiDp InstancePtr)

This function reads Training Aux Read Interval register of sink DPCD.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_AuxRead().

Referenced by XMmiDp_GetRxCapabilities().

u32 XMmiDp_GetEdidBlock ( XMmiDp InstancePtr,
u8 *  Data,
u8  BlockNum 
)

This function retrieves connected RX devices Extended Display Identification given the block number.

A block num of 0 represents the base EDID.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Datais a pointer to the data buffer to save the block data to
BlockNumis the EDID block number to retrieve.
Returns
  • XST_SUCCESS if the block read has successfully completed with no errors.
  • XST_ERROR_COUNT_MAX if a time out occurred while attempting to read the requested block.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_I2cRead().

u32 XMmiDp_GetRxCapabilities ( XMmiDp InstancePtr)

This function reads Rx DPCD capability registers to initiate link training.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
  • XST_SUCCESS if the training process succeeded.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_AuxRead(), XMmiDp_GetDpcdMaxDownspread(), XMmiDp_GetDpcdRev(), XMmiDp_GetDpcdTrainingAuxRdInterval(), XMmiDp_GetRxMaxLaneCount(), and XMmiDp_GetRxMaxLinkRate().

u32 XMmiDp_GetRxMaxLaneCount ( XMmiDp InstancePtr)

This function gets the max lane count supported from DPCD.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_AuxRead().

Referenced by XMmiDp_GetRxCapabilities().

u32 XMmiDp_GetRxMaxLinkRate ( XMmiDp InstancePtr)

This function gets the max link rate supported from Rx DPCD register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_AuxRead().

Referenced by XMmiDp_GetRxCapabilities().

u32 XMmiDp_GetTrainingDelay ( XMmiDp InstancePtr)

This function returngs the training aux interval.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • WaitTime.
Note
None.

Referenced by XMmiDp_TrainingStateChannelEqualization().

void XMmiDp_HpdInterruptEnable ( XMmiDp InstancePtr,
u32  Mask 
)

This function enables XMMIDP_HPD_INTERRUPT_ENABLE bits based on the mask.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Maskspecifies the interrupt bits to enable
Returns
None
Note
None.

References XMmiDp_ReadReg, and XMmiDp_WriteReg.

void XMmiDp_HpdInterruptHandler ( XMmiDp InstancePtr)

This function is the HPD Event interrupt handler for the XMmiDp driver.

When an interrupt happens, it first detects what kind of interrupt happened, then decides which callback function to invoke.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Returns
None.
Note
None.

References XMmiDp_ReadReg, and XMmiDp_WriteReg.

u32 XMmiDp_I2cRead ( XMmiDp InstancePtr,
u32  I2cAddr,
u16  Offset,
u32  Bytes,
void *  Data 
)

This function performs an I2C read over the AUX channel.

Parameters
InstancePtris a pointer to the XMmiDp instance.
IicAddressis the address on the I2C bus of the target device.
BytesToWriteis the number of bytes to write.
WriteDatais a pointer to a buffer which will be used as the data source for the write.
Returns
  • XST_SUCCESS if the I2C write has successfully completed with no errors.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_ERROR_COUNT_MAX if the AUX request timed out.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_IsConnected().

Referenced by XMmiDp_GetEdidBlock().

u32 XMmiDp_I2cWrite ( XMmiDp InstancePtr,
u32  I2cAddr,
u32  Bytes,
void *  Data 
)

This function performs an I2C write over the AUX channel.

Parameters
InstancePtris a pointer to the XMmiDp instance.
IicAddressis the address on the I2C bus of the target device.
BytesToWriteis the number of bytes to write.
WriteDatais a pointer to a buffer which will be used as the data source for the write.
Returns
  • XST_SUCCESS if the I2C write has successfully completed with no errors.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_ERROR_COUNT_MAX if the AUX request timed out.
  • XST_FAILURE otherwise.
Note
None.
void XMmiDp_Initialize ( XMmiDp InstancePtr)

This function Initializes the XMmiDp Instance structure.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.
u32 XMmiDp_IsConnected ( XMmiDp InstancePtr)

This function checks if there is a connected RX device.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Returns
  • TRUE if there is a connection.
  • FALSE if there is no connection.

References XMmiDp_ReadReg, and XMmiDp_WaitUs().

Referenced by XMmiDp_CheckLinkStatus(), and XMmiDp_I2cRead().

void XMmiDp_PhyScrambleDisable ( XMmiDp InstancePtr)

This function disable phy scrambler.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetTrainingPattern().

void XMmiDp_PhyScrambleEnable ( XMmiDp InstancePtr)

This function enables phy scrambler over the main link through CCTL register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetTrainingPattern().

void XMmiDp_PhySoftReset ( XMmiDp InstancePtr)

This function does a PHY Soft reset.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Resetis the type of reset to assert.
Returns
None.
Note
None.

References XMmiDp_PhyWaitReady(), XMmiDp_ReadReg, XMmiDp_WaitUs(), and XMmiDp_WriteReg.

void XMmiDp_PhySSCDisable ( XMmiDp InstancePtr)

This function disables SSC on the PHY.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

void XMmiDp_PhySSCEnable ( XMmiDp InstancePtr)

This function enables SSC on the PHY.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

u32 XMmiDp_PhyWaitReady ( XMmiDp InstancePtr)

This function waits for the DisplayPort PHY to come out of reset.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Returns
  • XST_ERROR_COUNT_MAX if the PHY failed to be ready.
  • XST_SUCCESS otherwise.
Note
None.

References XMmiDp_ReadReg, and XMmiDp_WaitUs().

Referenced by XMmiDp_PhySoftReset(), and XMmiDp_SetLinkRate().

void XMmiDp_RegReadModifyWrite ( XMmiDp InstancePtr,
u32  RegOffset,
u32  Mask,
u32  Shift,
u32  Val 
)
u32 XMmiDp_RunTraining ( XMmiDp InstancePtr)

This function runs the link training process.

It is implemented as a state machine, with each state returning the next state. First, the clock recovery sequence will be run; if successful, the channel equalization sequence will run. If either the clock recovery or channel equalization sequence failed, the link rate or the number of lanes used will be reduced and training will be re-attempted. If training fails at the minimal data rate, 1.62 Gbps with a single lane, training will no longer re-attempt and fail.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
  • XST_SUCCESS if the training process succeeded.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_AuxRead(), XMmiDp_AuxWrite(), XMmiDp_CheckLinkStatus(), XMmiDp_SetTrainingPattern(), XMmiDp_TrainingStateAdjustLaneCount(), XMmiDp_TrainingStateAdjustLinkRate(), XMmiDp_TrainingStateChannelEqualization(), and XMmiDp_TrainingStateClockRecovery().

void XMmiDp_SetAux_100000Us_Cnt_Limit ( XMmiDp InstancePtr,
u16  Limit 
)

This function sets the AUX_100000US_CNT_LIMIT.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Aux100000Us count limit
Returns
  • none.
Note
None.

References XMmiDp_WriteReg.

void XMmiDp_SetAux_2000Us_Cnt_Limit ( XMmiDp InstancePtr,
u16  Limit 
)

This function sets the AUX_2000US_CNT_LIMIT.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Aux2000Us count limit
Returns
  • none.
Note
None.

References XMmiDp_WriteReg.

void XMmiDp_SetAux_250Us_Cnt_Limit ( XMmiDp InstancePtr,
u16  Limit 
)

This function sets the AUX_250US_CNT_LIMIT.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Aux250Us count limit
Returns
  • none.
Note
None.

References XMmiDp_WriteReg.

void XMmiDp_SetDpcdLaneCount ( XMmiDp InstancePtr)

This function sets the number of lanes to be used by the main link for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XMmiDp instance.
LaneCountis the number of lanes to be used over the main link.
Returns
  • None.
Note
None.

References XMmiDp_DpcdReadModifyWrite().

Referenced by XMmiDp_SetLaneCount().

void XMmiDp_SetDpcdLinkQualPattern ( XMmiDp InstancePtr,
XMmiDp_PhyTrainingPattern  Pattern 
)

This function sets the DPCD Link qual_0 training pattern to be used by the main link for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Patternselect to be used over the main link based on one of the following selects: PHY_NO_TRAIN = 0x0, PHY_TPS1 = 0x1, PHY_TPS2 = 0x2, PHY_TPS3 = 0x3, PHY_TPS4 = 0x4, PHY_SYMBOL_ERR_RATE = 0x5, PHY_PRBS7 = 0x6, PHY_CUSTOMPAT = 0x7, PHY_CP2520_PAT_1 = 0x8, PHY_CP2520_PAT_2 = 0x9,
Returns
  • none.
Note
None.

References XMmiDp_DpcdReadModifyWrite(), and XMmiDp_WaitUs().

void XMmiDp_SetDpcdLinkRate ( XMmiDp InstancePtr)

This function sets the dpcd link bw to be used by the main link for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XDpPsu instance.
LinkRateis the link rate to be used over the main link based on one of the following selects:
  • XMMIDP_LINK_BW_SET_162GBPS = 0x06 (for a 1.62 Gbps data rate)
  • XMMIDP_LINK_BW_SET_270GBPS = 0x0A (for a 2.70 Gbps data rate)
  • XMMIDP_LINK_BW_SET_540GBPS = 0x14 (for a 5.40 Gbps data rate)
  • XMMIDP_LINK_BW_SET_810GBPS = 0x1E (for a 8.10 Gbps data rate)
Returns
  • none.
Note
None.

References XMmiDp_AuxWrite(), and XMMIDP_DPCD_LINK_BW_SET.

Referenced by XMmiDp_SetLinkRate().

void XMmiDp_SetDpcdPreEmphasis ( XMmiDp InstancePtr,
XMmiDp_PhyPreEmp PeLevel 
)

This function sets the DPCD VoltagePreEmphasis levels for the DisplayPort TX PHY.

Parameters
InstancePtris a pointer to the XDpPsu instance.
VoltageSwingfor each lane to be used over the main link based on one of the following selects:
  • PHYPREEMP_LEVEL0
  • PHYPREEMP_LEVEL1
  • PHYPREEMP_LEVEL2
  • PHYPREEMP_LEVEL3
Returns
  • none.
Note
None.

References XMmiDp_DpcdReadModifyWrite().

void XMmiDp_SetDpcdTrainingPattern ( XMmiDp InstancePtr,
XMmiDp_PhyTrainingPattern  Pattern 
)

This function sets the DPCD training pattern to be used by the main link for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Patternselect to be used over the main link based on one of the following selects: PHY_NO_TRAIN = 0x0, PHY_TPS1 = 0x1, PHY_TPS2 = 0x2, PHY_TPS3 = 0x3, PHY_TPS4 = 0x4, PHY_SYMBOL_ERR_RATE = 0x5, PHY_PRBS7 = 0x6, PHY_CUSTOMPAT = 0x7, PHY_CP2520_PAT_1 = 0x8, PHY_CP2520_PAT_2 = 0x9,
Returns
  • none.
Note
None.

References XMmiDp_AuxRead(), XMmiDp_AuxWrite(), and XMmiDp_WaitUs().

Referenced by XMmiDp_StartLinkXmit().

void XMmiDp_SetDpcdVoltageSwing ( XMmiDp InstancePtr,
XMmiDp_PhyVSwing VsLevel 
)

This function sets the DPCD VoltageSwing levels int the DisplayPort TX core.

Parameters
InstancePtris a pointer to the XDpPsu instance.
VoltageSwingfor each lane to be used over the main link based on one of the following selects:
  • PHY_VSWING_LEVEL0
  • PHY_VSWING_LEVEL1
  • PHY_VSWING_LEVEL2
  • PHY_VSWING_LEVEL3
Returns
  • none.
Note
None.

References XMmiDp_DpcdReadModifyWrite().

void XMmiDp_SetHBlankInterval ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets video HBlankInterval register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetHpdHotPlugHandler ( XMmiDp InstancePtr,
XMmiDp_HpdHotPlugHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a hpd hotplug interrupt occurs.

Parameters
InstancePtris a pointer to the XMmiDp instance.
CallbackFuncis the address to the callback function.
CallbackRefis the user data item that will be passed to the callback function when it is invoked.
Returns
None.
Note
None.
void XMmiDp_SetHpdIrqHandler ( XMmiDp InstancePtr,
XMmiDp_HpdIrqHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a hpd irq event interrupt occurs.

Parameters
InstancePtris a pointer to the XMmiDp instance.
CallbackFuncis the address to the callback function.
CallbackRefis the user data item that will be passed to the callback function when it is invoked.
Returns
None.
Note
None.
void XMmiDp_SetLaneCount ( XMmiDp InstancePtr,
XMmiDp_PhyLanes  LaneCount 
)

This function sets the Rx Dpcd lane count as well as Phy lane count.

Parameters
InstancePtris a pointer to the XDp instance.
LaneCountvalue to program.
Returns
None
Note
None.

References XMmiDp_SetDpcdLaneCount(), and XMmiDp_SetPhyLaneCount().

Referenced by XMmiDp_TrainingStateAdjustLaneCount(), and XMmiDp_TrainingStateClockRecovery().

u32 XMmiDp_SetLinkRate ( XMmiDp InstancePtr,
XMmiDp_PhyRate  LinkRate 
)

This function sets the Rx Dpcd link rate as well as Phy link rate.

Parameters
InstancePtris a pointer to the XDp instance.
LinkRatevalue to program.
Returns
None
Note
None.

References XMmiDp_PhyWaitReady(), XMmiDp_SetDpcdLinkRate(), XMmiDp_SetPhyLinkRate(), and XMmiDp_SetPhyPowerdown().

Referenced by XMmiDp_TrainingStateAdjustLaneCount(), XMmiDp_TrainingStateAdjustLinkRate(), and XMmiDp_TrainingStateClockRecovery().

void XMmiDp_SetMsaBpc ( XMmiDp InstancePtr,
u8  Stream,
u8  BitsPerColor 
)

This function sets the bits per color value of the video stream.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Streamis the stream number for which to set the color depth.
BitsPerColoris the new number of bits per color to use.
Returns
None.
void XMmiDp_SetPhyLaneCount ( XMmiDp InstancePtr,
XMmiDp_PhyLanes  LaneCount 
)

This function sets the number of lanes to be used by the main link for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XMmiDp instance.
LaneCountis the number of lanes to be used over the main link.
Returns
  • None.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetLaneCount(), and XMmiDp_StartLinkXmit().

void XMmiDp_SetPhyLinkRate ( XMmiDp InstancePtr,
XMmiDp_PhyRate  LinkRate 
)

This function sets the data rate to be used by the main link for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XDpPsu instance.
LinkRateis the link rate to be used over the main link based on one of the following selects:
  • XMMIDP_LINK_BW_SET_162GBPS = 0x06 (for a 1.62 Gbps data rate)
  • XMMIDP_LINK_BW_SET_270GBPS = 0x0A (for a 2.70 Gbps data rate)
  • XMMIDP_LINK_BW_SET_540GBPS = 0x14 (for a 5.40 Gbps data rate)
  • XMMIDP_LINK_BW_SET_810GBPS = 0x1E (for a 8.10 Gbps data rate)
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite(), and XMmiDp_SetPhyWidth().

Referenced by XMmiDp_SetLinkRate(), and XMmiDp_StartLinkXmit().

void XMmiDp_SetPhyPowerdown ( XMmiDp InstancePtr,
XMmiDp_PhyPwrDown  Control 
)

This function sets the phy powerdown control val.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Powerdownval is the link rate to be used over the main link based on one of the following selects:
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetLinkRate().

void XMmiDp_SetPhyPreEmphasis ( XMmiDp InstancePtr,
u8 *  PeLevel 
)

This function sets the VoltagePreEmphasis levels for the DisplayPort TX PHY.

Parameters
InstancePtris a pointer to the XDpPsu instance.
VoltageSwingfor each lane to be used over the main link based on one of the following selects:
  • PHY_PREEMP_LEVEL0
  • PHY_PREEMP_LEVEL1
  • PHY_PREEMP_LEVEL2
  • PHY_PREEMP_LEVEL3
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetVswingPreemp(), and XMmiDp_StartLinkXmit().

void XMmiDp_SetPhyTrainingPattern ( XMmiDp InstancePtr,
XMmiDp_PhyTrainingPattern  Pattern 
)

This function sets the training pattern to be used by the main link for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Patternselect to be used over the main link based on one of the following selects: PHY_NO_TRAIN = 0x0, PHY_TPS1 = 0x1, PHY_TPS2 = 0x2, PHY_TPS3 = 0x3, PHY_TPS4 = 0x4, PHY_SYMBOL_ERR_RATE = 0x5, PHY_PRBS7 = 0x6, PHY_CUSTOMPAT = 0x7, PHY_CP2520_PAT_1 = 0x8, PHY_CP2520_PAT_2 = 0x9,
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetTrainingPattern(), and XMmiDp_StartLinkXmit().

void XMmiDp_SetPhyVoltageSwing ( XMmiDp InstancePtr,
u8 *  VsLevel 
)

This function sets the VoltageSwing levels in the DisplayPort TX core.

Parameters
InstancePtris a pointer to the XDpPsu instance.
VoltageSwingfor each lane to be used over the main link based on one of the following selects:
  • PHY_VSWING_LEVEL0
  • PHY_VSWING_LEVEL1
  • PHY_VSWING_LEVEL2
  • PHY_VSWING_LEVEL3
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetVswingPreemp(), and XMmiDp_StartLinkXmit().

void XMmiDp_SetPhyWidth ( XMmiDp InstancePtr,
XMmiDp_PhyWidth  Width 
)

This function sets the phy width control val.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Phywidth val to be used over the main link based on one of the following selects:
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_SetPhyLinkRate().

void XMmiDp_SetPhyXmitDisable ( XMmiDp InstancePtr)

This function disables phy transfer for lanes.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

void XMmiDp_SetPhyXmitEnable ( XMmiDp InstancePtr)

This function enables phy transfer for lanes.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_RegReadModifyWrite().

Referenced by XMmiDp_StartLinkXmit().

void XMmiDp_SetPixModeSel ( XMmiDp InstancePtr,
u8  Stream,
XMmiDp_PPC  PixModeSel 
)

This function sets the pixel mode of the video stream.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Streamis the stream number for which to set the color depth.
PixModeSel.
Returns
None.
void XMmiDp_SetPmConfig1 ( XMmiDp InstancePtr,
u32  Val 
)

This function sets PM_COFIG1 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
RegVal
Returns
  • none.
Note
None.

References XMmiDp_WriteReg.

void XMmiDp_SetPmConfig2 ( XMmiDp InstancePtr,
u32  Val 
)

This function sets PM_COFIG2 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
RegVal
Returns
  • none.
Note
None.

References XMmiDp_WriteReg.

u32 XMmiDp_SetSinkDpcdLinkCfgField ( XMmiDp InstancePtr)

This function configures DPCD Rx Field.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_AuxWrite(), XMMIDP_DPCD_LINK_BW_SET, and XMmiDp_DpcdReadModifyWrite().

u32 XMmiDp_SetTrainingPattern ( XMmiDp InstancePtr,
XMmiDp_PhyTrainingPattern  Pattern 
)

This function sets the training pattern to be used during link training for both the DisplayPort TX core and the RX device.

Parameters
InstancePtris a pointer to the XDp instance.
Patternselects the pattern to be used.
Returns
  • XST_SUCCESS if setting the pattern was successful.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_AuxWrite(), XMmiDp_PhyScrambleDisable(), XMmiDp_PhyScrambleEnable(), XMmiDp_SetPhyTrainingPattern(), and XMmiDp_SetVswingPreemp().

Referenced by XMmiDp_RunTraining(), XMmiDp_TrainingStateChannelEqualization(), and XMmiDp_TrainingStateClockRecovery().

void XMmiDp_SetVideoConfig1 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets the video config1 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMMIDP_VIDEO_CONFIG1, and XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVideoConfig2 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets the video config2 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVideoConfig3 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets the video config3 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVideoConfig4 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets the video config4 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVideoConfig5 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets the video config5 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVideoMapping ( XMmiDp InstancePtr,
u8  Stream,
XMmiDp_VidMap  VidMap 
)

This function sets the video format of the video stream.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Streamis the stream number for which to set the color depth.
Videoinput mapping.
Returns
None.
void XMmiDp_SetVideoMsa1 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets video msa1 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVideoMsa2 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets video msa2 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVideoMsa3 ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets video msa3 register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVidStreamEnable ( XMmiDp InstancePtr,
u8  Stream,
u8  StreamEnable 
)

This function sets the video stream to enable or disable.

Parameters
InstancePtris a pointer to the XMmiDp instance.
Streamis the stream number for which to set the color depth.
Enableor Disable.
Returns
None.
void XMmiDp_SetVInputPolarityCtrl ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets the video input polarity control.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVSampleCtrl ( XMmiDp InstancePtr,
u8  Stream 
)

This function sets the vsample register.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Streamis the stream number for which to enable or disable video stream.
Returns
None.
Note
None.

References XMmiDp_WriteReg.

Referenced by XMmiDp_ConfigureVideoController().

void XMmiDp_SetVswingPreemp ( XMmiDp InstancePtr,
u8 *  AuxData 
)

This function sets current voltage swing and pre-emphasis level settings from the LinkConfig structure to Phy and DPCD.

Parameters
InstancePtris a pointer to the XDpPsu instance.
AuxDatais a pointer to the array used for preparing a burst write over the AUX channel.
Returns
  • XST_SUCCESS if writing the settings was successful.
  • XST_FAILURE otherwise.
Note
None.

References XMmiDp_SetPhyPreEmphasis(), and XMmiDp_SetPhyVoltageSwing().

Referenced by XMmiDp_AdjVswingPreemp(), and XMmiDp_SetTrainingPattern().

u32 XMmiDp_StartLinkXmit ( XMmiDp InstancePtr)

This function initates link training sequence with the Rx.

Parameters
InstancePtris a pointer to the XDpPsu instance.
Returns
  • none.
Note
None.

References XMmiDp_SetDpcdTrainingPattern(), XMmiDp_SetPhyLaneCount(), XMmiDp_SetPhyLinkRate(), XMmiDp_SetPhyPreEmphasis(), XMmiDp_SetPhyTrainingPattern(), XMmiDp_SetPhyVoltageSwing(), and XMmiDp_SetPhyXmitEnable().

XMmiDp_TrainingState XMmiDp_TrainingStateAdjustLaneCount ( XMmiDp InstancePtr)

This function is reached if either the clock recovery or the channel equalization process failed during training, and a minimal data rate of 1.62 Gbps was being used.

As a result, the number of lanes in use will be reduced, and training will be re-attempted (starting with clock recovery) at this lower lane count.

Note
Training will be re-attempted with the maximum data rate being used with the reduced lane count to train at the main link at the maximum bandwidth possible.
Parameters
InstancePtris a pointer to the XDp instance.
Returns
The next training state:
  • XMMIDP_TS_FAILURE if only one lane is already in use.
  • XMMIDP_TS_CLOCK_RECOVERY otherwise. Re-attempt training.
Note
None.

References XMmiDp_SetLaneCount(), and XMmiDp_SetLinkRate().

Referenced by XMmiDp_RunTraining().

XMmiDp_TrainingState XMmiDp_TrainingStateAdjustLinkRate ( XMmiDp InstancePtr)

This function is reached if either the clock recovery or the channel equalization process failed during training.

As a result, the data rate will be downshifted, and training will be re-attempted (starting with clock recovery) at the reduced data rate. If the data rate is already at 1.62 Gbps, a downshift in lane count will be attempted.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
The next training state:
  • XMMIDP_TS_ADJUST_LANE_COUNT if the minimal data rate is already in use. Re-attempt training at a reduced lane count.
  • XMMIDP_TS_CLOCK_RECOVERY otherwise. Re-attempt training.
Note
None.

References XMmiDp_SetLinkRate().

Referenced by XMmiDp_RunTraining().

XMmiDp_TrainingState XMmiDp_TrainingStateChannelEqualization ( XMmiDp InstancePtr)

This function runs the channel equalization sequence as part of link training.

The sequence is as follows: 0) Start signaling with the same drive settings used at the end of the clock recovery sequence. 1) Transmit training pattern 2 (or 3) over the main link with symbol scrambling disabled. 2) The channel equalization loop. If channel equalization is unsuccessful after 5 loop iterations, return. 2a) Wait for at least the period of time specified in the RX device's DisplayPort Configuration Data (DPCD) register, TRAINING_AUX_RD_INTERVAL. 2b) Check if all lanes have achieved channel equalization, symbol lock, and interlane alignment. If so, return. 2c) Check if the same voltage swing level has been used 5 consecutive times or if the maximum level has been reached. If so, return. 2d) Adjust the voltage swing, pre-emphasis, and post-cursor levels as requested by the RX device. 2e) Loop back to 2a. For a more detailed description of the channel equalization sequence, see section 3.5.1.2.2 of the DisplayPort 1.2a specification document.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
The next training state:
  • XDP_TX_TS_SUCCESS if training succeeded.
  • XDP_TX_TS_FAILURE if writing the drive settings to the RX device was unsuccessful.
  • XDP_TX_TS_ADJUST_LINK_RATE if, after 5 loop iterations, the channel equalization sequence did not complete successfully.
Note
None.

References XMmiDp_AdjVswingPreemp(), XMmiDp_CheckChannelEqualization(), XMmiDp_CheckClockRecovery(), XMmiDp_GetDpcdLaneStatusAdjReqs(), XMmiDp_GetTrainingDelay(), XMmiDp_SetTrainingPattern(), and XMmiDp_WaitUs().

Referenced by XMmiDp_RunTraining().

XMmiDp_TrainingState XMmiDp_TrainingStateClockRecovery ( XMmiDp InstancePtr)

This function runs the clock recovery sequence as part of link training.

The sequence is as follows: 0) Start signaling at the minimum voltage swing, pre-emphasis, and post- cursor levels. 1) Transmit training pattern 1 over the main link with symbol scrambling disabled. 2) The clock recovery loop. If clock recovery is unsuccessful after MaxIterations loop iterations, return. 2a) Wait for at least the period of time specified in the RX device's DisplayPort Configuration Data (DPCD) register, TRAINING_AUX_RD_INTERVAL. 2b) Check if all lanes have achieved clock recovery lock. If so, return. 2c) Check if the same voltage swing level has been used 5 consecutive times or if the maximum level has been reached. If so, return. 2d) Adjust the voltage swing, pre-emphasis, and post-cursor levels as requested by the RX device. 2e) Loop back to 2a.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
The next training state:
  • XMMIDP__TS_CHANNEL_EQUALIZATION if the clock recovery sequence completed successfully.
  • XMMIDP__TS_FAILURE if writing the drive settings to the RX device was unsuccessful.
  • XMMIDP__TS_ADJUST_LINK_RATE if the clock recovery sequence did not complete successfully.
Note
None.

References XMmiDp_AdjVswingPreemp(), XMmiDp_CheckClockRecovery(), XMmiDp_GetDpcdLaneStatusAdjReqs(), XMmiDp_SetLaneCount(), XMmiDp_SetLinkRate(), XMmiDp_SetTrainingPattern(), and XMmiDp_WaitUs().

Referenced by XMmiDp_RunTraining().

void XMmiDp_WaitUs ( XMmiDp InstancePtr,
u32  MicroSeconds 
)

This function is the delay/sleep function for the XMmiDp driver.

  • Parameters
    InstancePtris a pointer to the XMmiDp instance.
    MicroSecondsis the number of microseconds to delay/sleep for.
    Returns
    None.
    Note
    None.

Referenced by XMmiDp_IsConnected(), XMmiDp_PhySoftReset(), XMmiDp_PhyWaitReady(), XMmiDp_SetDpcdLinkQualPattern(), XMmiDp_SetDpcdTrainingPattern(), XMmiDp_TrainingStateChannelEqualization(), and XMmiDp_TrainingStateClockRecovery().