Software Drivers

xdp.h File Reference

#include "xil_assert.h"
#include "xil_types.h"
#include "xdp_hw.h"
#include "xstatus.h"
#include "xvidc.h"

Classes

struct  XDp_Config
struct  XDp_TxSinkConfig
struct  XDp_TxLinkConfig
struct  XDp_TxMainStreamAttributes
struct  XDp_TxMstStream
struct  XDp_TxBoardChar
struct  XDp_TxTopologyNode
struct  XDp_TxTopology
struct  XDp_TxSbMsgLinkAddressReplyPortDetail
struct  XDp_TxSbMsgLinkAddressReplyDeviceInfo
struct  XDp_RxLinkConfig
struct  XDp_Tx
struct  XDp_Rx
struct  XDp

Defines

#define XDP_TX   0
#define XDP_RX   1
#define XDp_CfgGetCoreType(ConfigPtr)   ((ConfigPtr)->IsRx ? XDP_RX : XDP_TX)
#define XDptx_ReadReg   XDp_ReadReg
#define XDprx_ReadReg   XDp_ReadReg
#define XDptx_WriteReg   XDp_WriteReg
#define XDprx_WriteReg   XDp_WriteReg
#define XDptx_Config   XDp_Config
#define XDprx_Config   XDp_Config
#define XDptx_TimerHandler   XDp_TimerHandler
#define XDprx_TimerHandler   XDp_TimerHandler
#define XDptx_HpdEventHandler   XDp_IntrHandler
#define XDptx_HpdPulseHandler   XDp_IntrHandler
#define XDprx_IntrHandler   XDp_IntrHandler
#define XDptx_LookupConfig   XDp_LookupConfig
#define XDprx_LookupConfig   XDp_LookupConfig
#define XDptx_CfgInitialize   XDp_CfgInitialize
#define XDprx_CfgInitialize   XDp_CfgInitialize
#define XDptx_InitializeTx   XDp_Initialize
#define XDprx_InitializeRx   XDp_Initialize
#define XDptx_WaitUs   XDp_WaitUs
#define XDprx_WaitUs   XDp_WaitUs
#define XDptx_SetUserTimerHandler   XDp_SetUserTimerHandler
#define XDprx_SetUserTimerHandler   XDp_SetUserTimerHandler
#define XDptx_SelfTest   XDp_SelfTest
#define XDprx_SelfTest   XDp_SelfTest
#define XDptx_HpdInterruptHandler   XDp_InterruptHandler
#define XDprx_InterruptHandler   XDp_InterruptHandler
#define XDptx_   XDp_Tx
#define XDprx_   XDp_Rx
#define XDptx   XDp
#define XDprx   XDp
#define XDPTX_DPCD_   XDP_DPCD_
#define XDPTX_   XDP_TX_
#define XDPRX_   XDP_RX_
#define XDPTX   XDP_TX
#define XDPRX   XDP_RX

Typedefs

typedef void(*) XDp_TimerHandler (void *InstancePtr, u32 MicroSeconds)
typedef void(*) XDp_IntrHandler (void *InstancePtr)

Functions

XDp_ConfigXDp_LookupConfig (u16 DeviceId)
void XDp_CfgInitialize (XDp *InstancePtr, XDp_Config *ConfigPtr, u32 EffectiveAddr)
u32 XDp_Initialize (XDp *InstancePtr)
u32 XDp_TxGetRxCapabilities (XDp *InstancePtr)
u32 XDp_TxCfgMainLinkMax (XDp *InstancePtr)
u32 XDp_TxEstablishLink (XDp *InstancePtr)
u32 XDp_TxCheckLinkStatus (XDp *InstancePtr, u8 LaneCount)
void XDp_TxEnableTrainAdaptive (XDp *InstancePtr, u8 Enable)
void XDp_TxSetHasRedriverInPath (XDp *InstancePtr, u8 Set)
void XDp_TxCfgTxVsOffset (XDp *InstancePtr, u8 Offset)
void XDp_TxCfgTxVsLevel (XDp *InstancePtr, u8 Level, u8 TxLevel)
void XDp_TxCfgTxPeLevel (XDp *InstancePtr, u8 Level, u8 TxLevel)
u32 XDp_TxAuxRead (XDp *InstancePtr, u32 DpcdAddress, u32 BytesToRead, void *ReadData)
u32 XDp_TxAuxWrite (XDp *InstancePtr, u32 DpcdAddress, u32 BytesToWrite, void *WriteData)
u32 XDp_TxIicRead (XDp *InstancePtr, u8 IicAddress, u16 Offset, u16 BytesToRead, void *ReadData)
u32 XDp_TxIicWrite (XDp *InstancePtr, u8 IicAddress, u8 BytesToWrite, void *WriteData)
u32 XDp_TxSetDownspread (XDp *InstancePtr, u8 Enable)
u32 XDp_TxSetEnhancedFrameMode (XDp *InstancePtr, u8 Enable)
u32 XDp_TxSetLaneCount (XDp *InstancePtr, u8 LaneCount)
u32 XDp_TxSetLinkRate (XDp *InstancePtr, u8 LinkRate)
u32 XDp_TxSetScrambler (XDp *InstancePtr, u8 Enable)
void XDp_SetUserTimerHandler (XDp *InstancePtr, XDp_TimerHandler CallbackFunc, void *CallbackRef)
void XDp_WaitUs (XDp *InstancePtr, u32 MicroSeconds)
u32 XDp_TxIsConnected (XDp *InstancePtr)
void XDp_TxEnableMainLink (XDp *InstancePtr)
void XDp_TxDisableMainLink (XDp *InstancePtr)
void XDp_TxResetPhy (XDp *InstancePtr, u32 Reset)
u32 XDp_RxCheckLinkStatus (XDp *InstancePtr)
void XDp_RxDtgEn (XDp *InstancePtr)
void XDp_RxDtgDis (XDp *InstancePtr)
void XDp_RxSetLinkRate (XDp *InstancePtr, u8 LinkRate)
void XDp_RxSetLaneCount (XDp *InstancePtr, u8 LaneCount)
u32 XDp_TxGetEdid (XDp *InstancePtr, u8 *Edid)
u32 XDp_TxGetRemoteEdid (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u8 *Edid)
u32 XDp_TxGetEdidBlock (XDp *InstancePtr, u8 *Data, u8 BlockNum)
u32 XDp_TxGetRemoteEdidBlock (XDp *InstancePtr, u8 *Data, u8 BlockNum, u8 LinkCountTotal, u8 *RelativeAddress)
u32 XDp_TxGetRemoteEdidDispIdExt (XDp *InstancePtr, u8 *Data, u8 LinkCountTotal, u8 *RelativeAddress)
u32 XDp_TxGetDispIdDataBlock (u8 *DisplayIdRaw, u8 SectionTag, u8 **DataBlockPtr)
u32 XDp_TxGetRemoteTiledDisplayDb (XDp *InstancePtr, u8 *EdidExt, u8 LinkCountTotal, u8 *RelativeAddress, u8 **DataBlockPtr)
void XDp_InterruptHandler (XDp *InstancePtr)
void XDp_TxSetHpdEventHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_TxSetHpdPulseHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxGenerateHpdInterrupt (XDp *InstancePtr, u16 DurationUs)
void XDp_RxInterruptEnable (XDp *InstancePtr, u32 Mask)
void XDp_RxInterruptDisable (XDp *InstancePtr, u32 Mask)
void XDp_RxSetIntrVmChangeHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrPowerStateHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrNoVideoHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrVBlankHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrTrainingLostHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrVideoHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrTrainingDoneHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrBwChangeHandler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrTp1Handler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrTp2Handler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_RxSetIntrTp3Handler (XDp *InstancePtr, XDp_IntrHandler CallbackFunc, void *CallbackRef)
void XDp_TxMstCfgModeEnable (XDp *InstancePtr)
void XDp_TxMstCfgModeDisable (XDp *InstancePtr)
u32 XDp_TxMstCapable (XDp *InstancePtr)
u32 XDp_TxMstEnable (XDp *InstancePtr)
u32 XDp_TxMstDisable (XDp *InstancePtr)
void XDp_TxMstCfgStreamEnable (XDp *InstancePtr, u8 Stream)
void XDp_TxMstCfgStreamDisable (XDp *InstancePtr, u8 Stream)
u8 XDp_TxMstStreamIsEnabled (XDp *InstancePtr, u8 Stream)
void XDp_TxSetStreamSelectFromSinkList (XDp *InstancePtr, u8 Stream, u8 SinkNum)
void XDp_TxSetStreamSinkRad (XDp *InstancePtr, u8 Stream, u8 LinkCountTotal, u8 *RelativeAddress)
u32 XDp_TxDiscoverTopology (XDp *InstancePtr)
u32 XDp_TxFindAccessibleDpDevices (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress)
void XDp_TxTopologySwapSinks (XDp *InstancePtr, u8 Index0, u8 Index1)
void XDp_TxTopologySortSinksByTiling (XDp *InstancePtr)
u32 XDp_TxRemoteDpcdRead (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 DpcdAddress, u32 BytesToRead, u8 *ReadData)
u32 XDp_TxRemoteDpcdWrite (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 DpcdAddress, u32 BytesToWrite, u8 *WriteData)
u32 XDp_TxRemoteIicRead (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u8 IicAddress, u16 Offset, u16 BytesToRead, u8 *ReadData)
u32 XDp_TxRemoteIicWrite (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u8 IicAddress, u8 BytesToWrite, u8 *WriteData)
u32 XDp_TxAllocatePayloadStreams (XDp *InstancePtr)
u32 XDp_TxAllocatePayloadVcIdTable (XDp *InstancePtr, u8 VcId, u8 Ts)
u32 XDp_TxClearPayloadVcIdTable (XDp *InstancePtr)
u32 XDp_TxSendSbMsgRemoteDpcdWrite (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 DpcdAddress, u32 BytesToWrite, u8 *WriteData)
u32 XDp_TxSendSbMsgRemoteDpcdRead (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 DpcdAddress, u32 BytesToRead, u8 *ReadData)
u32 XDp_TxSendSbMsgRemoteIicWrite (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u8 IicDeviceId, u8 BytesToWrite, u8 *WriteData)
u32 XDp_TxSendSbMsgRemoteIicRead (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u8 IicDeviceId, u8 Offset, u8 BytesToRead, u8 *ReadData)
u32 XDp_TxSendSbMsgLinkAddress (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, XDp_TxSbMsgLinkAddressReplyDeviceInfo *DeviceInfo)
u32 XDp_TxSendSbMsgEnumPathResources (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u16 *AvailPbn, u16 *FullPbn)
u32 XDp_TxSendSbMsgAllocatePayload (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u8 VcId, u16 Pbn)
u32 XDp_TxSendSbMsgClearPayloadIdTable (XDp *InstancePtr)
void XDp_TxWriteGuid (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 Guid[4])
void XDp_TxGetGuid (XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 *Guid)
u32 XDp_SelfTest (XDp *InstancePtr)
void XDp_TxCfgMsaRecalculate (XDp *InstancePtr, u8 Stream)
void XDp_TxCfgMsaUseStandardVideoMode (XDp *InstancePtr, u8 Stream, XVidC_VideoMode VideoMode)
void XDp_TxCfgMsaUseEdidPreferredTiming (XDp *InstancePtr, u8 Stream, u8 *Edid)
void XDp_TxCfgMsaUseCustom (XDp *InstancePtr, u8 Stream, XDp_TxMainStreamAttributes *MsaConfigCustom, u8 Recalculate)
void XDp_TxCfgMsaSetBpc (XDp *InstancePtr, u8 Stream, u8 BitsPerColor)
void XDp_TxCfgMsaEnSynchClkMode (XDp *InstancePtr, u8 Stream, u8 Enable)
void XDp_TxSetVideoMode (XDp *InstancePtr, u8 Stream)
void XDp_TxClearMsaValues (XDp *InstancePtr, u8 Stream)
void XDp_TxSetMsaValues (XDp *InstancePtr, u8 Stream)
void XDp_RxSetUserPixelWidth (XDp *InstancePtr, u8 UserPixelWidth)


Define Documentation

#define XDp_CfgGetCoreType ( ConfigPtr   )     ((ConfigPtr)->IsRx ? XDP_RX : XDP_TX)

This is function determines whether the DisplayPort core that the configuration structure represents is a transmitter (TX) or a receiver (RX).

Parameters:
ConfigPtr is a pointer to the DisplayPort core's configuration structure.
Returns:
XDP_RX if the configuration structure is for a core of type RX. XDP_TX if the configuration structure is for a core of type TX.
Note:
C-style signature: u32 XDp_CfgGetCoreType(XDp_Config *ConfigPtr)

#define XDP_RX   1

#define XDP_TX   0

#define XDPRX   XDP_RX

#define XDprx   XDp

#define XDPRX_   XDP_RX_

#define XDprx_   XDp_Rx

#define XDprx_CfgInitialize   XDp_CfgInitialize

#define XDprx_Config   XDp_Config

#define XDprx_InitializeRx   XDp_Initialize

#define XDprx_InterruptHandler   XDp_InterruptHandler

#define XDprx_IntrHandler   XDp_IntrHandler

#define XDprx_LookupConfig   XDp_LookupConfig

#define XDprx_ReadReg   XDp_ReadReg

#define XDprx_SelfTest   XDp_SelfTest

#define XDprx_SetUserTimerHandler   XDp_SetUserTimerHandler

#define XDprx_TimerHandler   XDp_TimerHandler

#define XDprx_WaitUs   XDp_WaitUs

#define XDprx_WriteReg   XDp_WriteReg

#define XDPTX   XDP_TX

#define XDptx   XDp

#define XDPTX_   XDP_TX_

#define XDptx_   XDp_Tx

#define XDptx_CfgInitialize   XDp_CfgInitialize

#define XDptx_Config   XDp_Config

#define XDPTX_DPCD_   XDP_DPCD_

#define XDptx_HpdEventHandler   XDp_IntrHandler

#define XDptx_HpdInterruptHandler   XDp_InterruptHandler

#define XDptx_HpdPulseHandler   XDp_IntrHandler

#define XDptx_InitializeTx   XDp_Initialize

#define XDptx_LookupConfig   XDp_LookupConfig

#define XDptx_ReadReg   XDp_ReadReg

#define XDptx_SelfTest   XDp_SelfTest

#define XDptx_SetUserTimerHandler   XDp_SetUserTimerHandler

#define XDptx_TimerHandler   XDp_TimerHandler

#define XDptx_WaitUs   XDp_WaitUs

#define XDptx_WriteReg   XDp_WriteReg


Typedef Documentation

typedef void(*) XDp_IntrHandler(void *InstancePtr)

Callback type which represents the handler for interrupts.

Parameters:
InstancePtr is a pointer to the XDp instance.
Note:
None.

typedef void(*) XDp_TimerHandler(void *InstancePtr, u32 MicroSeconds)

Callback type which represents a custom timer wait handler. This is only used for Microblaze since it doesn't have a native sleep function. To avoid dependency on a hardware timer, the default wait functionality is implemented using loop iterations; this isn't too accurate. If a custom timer handler is used, the user may implement their own wait implementation using a hardware timer (see example/) for better accuracy.

Parameters:
InstancePtr is a pointer to the XDp instance.
MicroSeconds is the number of microseconds to be passed to the timer function.
Note:
None.


Function Documentation

void XDp_CfgInitialize ( XDp InstancePtr,
XDp_Config ConfigPtr,
u32  EffectiveAddr 
)

This function retrieves the configuration for this DisplayPort instance and fills in the InstancePtr->Config structure.

Parameters:
InstancePtr is a pointer to the XDp instance.
ConfigPtr is a pointer to the configuration structure that will be used to copy the settings from.
EffectiveAddr is the device base address in the virtual memory space. If the address translation is not used, then the physical address is passed.
Returns:
None.
Note:
Unexpected errors may occur if the address mapping is changed after this function is invoked.

u32 XDp_Initialize ( XDp InstancePtr  ) 

This function prepares the DisplayPort core for use depending on whether the core is operating in TX or RX mode.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the DisplayPort core was successfully initialized.
  • XST_FAILURE otherwise.
Note:
None.

void XDp_InterruptHandler ( XDp InstancePtr  ) 

This function is the interrupt handler for the XDp driver. When an interrupt happens, this interrupt handler will check which TX/RX mode of operation the core is running in, and will call the appropriate interrupt handler. The called interrupt handler will first detect what kind of interrupt happened, then decides which callback function to invoke.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
None.

XDp_Config* XDp_LookupConfig ( u16  DeviceId  ) 

This function looks for the device configuration based on the unique device ID. The table XDp_ConfigTable[] contains the configuration information for each device in the system.

Parameters:
DeviceId is the unique device ID of the device being looked up.
Returns:
A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found.
Note:
None.

u32 XDp_RxCheckLinkStatus ( XDp InstancePtr  ) 

This function checks if the reciever's internal registers indicate that link training has complete. That is, training has achieved channel equalization, symbol lock, and interlane alignment for all lanes currently in use.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the RX device has achieved clock recovery, channel equalization, symbol lock, and interlane alignment.
  • XST_FAILURE otherwise.
Note:
None.

void XDp_RxDtgDis ( XDp InstancePtr  ) 

This function disables the display timing generator (DTG).

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
None.

void XDp_RxDtgEn ( XDp InstancePtr  ) 

This function enables the display timing generator (DTG).

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
None.

void XDp_RxGenerateHpdInterrupt ( XDp InstancePtr,
u16  DurationUs 
)

This function generates a pulse on the hot-plug-detect (HPD) line of the specified duration.

Parameters:
InstancePtr is a pointer to the XDp instance.
DurationUs is the duration of the HPD pulse, in microseconds.
Returns:
None.
Note:
None.

void XDp_RxInterruptDisable ( XDp InstancePtr,
u32  Mask 
)

This function disables interrupts associated with the specified mask.

Parameters:
InstancePtr is a pointer to the XDp instance.
Mask specifies which interrupts should be disabled. Bits set to 1 will disable the corresponding interrupts.
Returns:
None.
Note:
None.

void XDp_RxInterruptEnable ( XDp InstancePtr,
u32  Mask 
)

This function enables interrupts associated with the specified mask.

Parameters:
InstancePtr is a pointer to the XDp instance.
Mask specifies which interrupts should be enabled. Bits set to 1 will enable the corresponding interrupts.
Returns:
None.
Note:
None.

void XDp_RxSetIntrBwChangeHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a bandwidth change interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrNoVideoHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a no video interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrPowerStateHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when the power state interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrTp1Handler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a training pattern 1 interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrTp2Handler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a training pattern 2 interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrTp3Handler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a training pattern 3 interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrTrainingDoneHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a training done interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrTrainingLostHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a training lost interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrVBlankHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a vertical blanking interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrVideoHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a valid video interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetIntrVmChangeHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a video mode change interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_RxSetLaneCount ( XDp InstancePtr,
u8  LaneCount 
)

This function sets the maximum lane count to be exposed in the RX device's DisplayPort Configuration Data (DPCD) registers.

Parameters:
InstancePtr is a pointer to the XDp instance.
LaneCount is the number of lanes to be used over the main link.
Returns:
None.
Note:
None.

void XDp_RxSetLinkRate ( XDp InstancePtr,
u8  LinkRate 
)

This function sets the maximum data rate to be exposed in the RX device's DisplayPort Configuration Data (DPCD) registers.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkRate is the link rate to be used over the main link based on one of the following selects:
  • XDP_RX_LINK_BW_SET_162GBPS = 0x06 (for a 1.62 Gbps data rate)
  • XDP_RX_LINK_BW_SET_270GBPS = 0x0A (for a 2.70 Gbps data rate)
  • XDP_RX_LINK_BW_SET_540GBPS = 0x14 (for a 5.40 Gbps data rate)
Returns:
None.
Note:
None.

void XDp_RxSetUserPixelWidth ( XDp InstancePtr,
u8  UserPixelWidth 
)

This function configures the number of pixels output through the user data interface.

Parameters:
InstancePtr is a pointer to the XDp instance.
UserPixelWidth is the user pixel width to be configured.
Returns:
None.
Note:
None.

u32 XDp_SelfTest ( XDp InstancePtr  ) 

This function runs a self-test on the XDp driver/device depending on whether the core is operating in TX or RX mode. The sanity test checks whether or not all tested registers hold their default reset values.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the self-test passed - all tested registers hold their default reset values.
  • XST_FAILURE otherwise.
Note:
None.

void XDp_SetUserTimerHandler ( XDp InstancePtr,
XDp_TimerHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a custom delay/sleep function to be used by the XDp driver.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item (microseconds to delay) that will be passed to the custom sleep/delay function when it is invoked.
Returns:
None.
Note:
None.

u32 XDp_TxAllocatePayloadStreams ( XDp InstancePtr  ) 

This function will allocate bandwidth for all enabled stream.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the payload ID tables were successfully updated with the new allocation.

Note:
None.

u32 XDp_TxAllocatePayloadVcIdTable ( XDp InstancePtr,
u8  VcId,
u8  Ts 
)

This function will allocate a bandwidth for a virtual channel in the payload ID table in both the DisplayPort TX and the downstream DisplayPort devices on the path to the target device specified by LinkCountTotal and RelativeAddress.

Parameters:
InstancePtr is a pointer to the XDp instance.
VcId is the unique virtual channel ID to allocate into the payload ID tables.
Ts is the number of timeslots to allocate in the payload ID tables.
Returns:
  • XST_SUCCESS if the payload ID tables were successfully updated with the new allocation.

Note:
None.

u32 XDp_TxAuxRead ( XDp InstancePtr,
u32  DpcdAddress,
u32  BytesToRead,
void *  ReadData 
)

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:
InstancePtr is a pointer to the XDp instance.
DpcdAddress is the starting address to read from the RX device.
BytesToRead is the number of bytes to read from the RX device.
ReadData is 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.

u32 XDp_TxAuxWrite ( XDp InstancePtr,
u32  DpcdAddress,
u32  BytesToWrite,
void *  WriteData 
)

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:
InstancePtr is a pointer to the XDp instance.
DpcdAddress is the starting address to write to the RX device.
BytesToWrite is the number of bytes to write to the RX device.
WriteData is 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.

u32 XDp_TxCfgMainLinkMax ( XDp InstancePtr  ) 

This function determines the common capabilities between the DisplayPort TX core and the RX device.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if main link settings were successfully set.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

void XDp_TxCfgMsaEnSynchClkMode ( XDp InstancePtr,
u8  Stream,
u8  Enable 
)

This function enables or disables synchronous clock mode for a video stream.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which to enable or disable synchronous clock mode.
Enable if set to 1, will enable synchronous clock mode. Otherwise, if set to 0, synchronous clock mode will be disabled.
Returns:
None.
Note:
None.

void XDp_TxCfgMsaRecalculate ( XDp InstancePtr,
u8  Stream 
)

This function calculates the following Main Stream Attributes (MSA):

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which to calculate the MSA values.
Returns:
None.
Note:
The MsaConfig structure is modified with the new, calculated values. The main stream attributes that were used to derive the calculated values are untouched in the MsaConfig structure.

void XDp_TxCfgMsaSetBpc ( XDp InstancePtr,
u8  Stream,
u8  BitsPerColor 
)

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

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which to set the color depth.
BitsPerColor is the new number of bits per color to use.
Returns:
None.
Note:
The InstancePtr->TxInstance.MsaConfig structure is modified to reflect the new main stream attributes associated with a new bits per color value.

void XDp_TxCfgMsaUseCustom ( XDp InstancePtr,
u8  Stream,
XDp_TxMainStreamAttributes MsaConfigCustom,
u8  Recalculate 
)

This function takes a the main stream attributes from MsaConfigCustom and copies them into InstancePtr->TxInstance.MsaConfig. If desired, given a base set of attributes, the rest of the attributes may be derived. The minimal required main stream attributes (MSA) that must be contained in the MsaConfigCustom structure are:

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which the MSA values will be used for.
MsaConfigCustom is the structure that will be used to copy the main stream attributes from (into InstancePtr->TxInstance.MsaConfig).
Recalculate is a boolean enable that determines whether or not the main stream attributes should be recalculated.
Returns:
None.
Note:
The InstancePtr->TxInstance.MsaConfig structure is modified with the new values.

void XDp_TxCfgMsaUseEdidPreferredTiming ( XDp InstancePtr,
u8  Stream,
u8 *  Edid 
)

This function sets the main stream attribute values in the configuration structure to match the preferred timing of the sink monitor. This Preferred Timing Mode (PTM) information is stored in the sink's Extended Display Identification Data (EDID).

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which the MSA values will be used for.
Edid is a pointer to the Edid to use for the specified stream.
Returns:
None.
Note:
The InstancePtr->TxInstance.MsaConfig structure is modified to reflect the main stream attribute values associated to the preferred timing of the sink monitor.

void XDp_TxCfgMsaUseStandardVideoMode ( XDp InstancePtr,
u8  Stream,
XVidC_VideoMode  VideoMode 
)

This function sets the Main Stream Attribute (MSA) values in the configuration structure to match one of the standard display mode timings from the XDp_TxDmtModes[] standard Display Monitor Timing (DMT) table. The XDp_TxVideoMode enumeration in xvidc.h lists the available video modes.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which the MSA values will be used for.
VideoMode is one of the enumerated standard video modes that is used to determine the MSA values to be used.
Returns:
None.
Note:
The InstancePtr->TxInstance.MsaConfig structure is modified to reflect the MSA values associated to the specified video mode.

void XDp_TxCfgTxPeLevel ( XDp InstancePtr,
u8  Level,
u8  TxLevel 
)

This function sets the pre-emphasis level value in the DisplayPort TX that will be used during link training for a given pre-emphasis training level.

Parameters:
InstancePtr is a pointer to the XDp instance.
Level is the pre-emphasis training level to set the DisplayPort TX level for.
TxLevel is the DisplayPort TX pre-emphasis level value to be used during link training.
Returns:
None.
Note:
There are 32 possible pre-emphasis levels in the DisplayPort TX core that map to 4 possible pre-emphasis training levels in the RX device.

void XDp_TxCfgTxVsLevel ( XDp InstancePtr,
u8  Level,
u8  TxLevel 
)

This function sets the voltage swing level value in the DisplayPort TX that will be used during link training for a given voltage swing training level.

Parameters:
InstancePtr is a pointer to the XDp instance.
Level is the voltage swing training level to set the DisplayPort TX level for.
TxLevel is the DisplayPort TX voltage swing level value to be used during link training.
Returns:
None.
Note:
There are 16 possible voltage swing levels in the DisplayPort TX core that map to 4 possible voltage swing training levels in the RX device.

void XDp_TxCfgTxVsOffset ( XDp InstancePtr,
u8  Offset 
)

This function sets the voltage swing offset to use during training when no redriver exists. The offset will be added to the DisplayPort TX's voltage swing level value when pre-emphasis is used (when the pre-emphasis level not equal to 0).

Parameters:
InstancePtr is a pointer to the XDp instance.
Offset is the value to set for the voltage swing offset.
Returns:
None.
Note:
None.

u32 XDp_TxCheckLinkStatus ( XDp InstancePtr,
u8  LaneCount 
)

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

Parameters:
InstancePtr is a pointer to the XDp instance.
LaneCount is 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.

void XDp_TxClearMsaValues ( XDp InstancePtr,
u8  Stream 
)

This function clears the main stream attributes registers of the DisplayPort TX core.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which to clear the MSA values.
Returns:
None.
Note:
None.

u32 XDp_TxClearPayloadVcIdTable ( XDp InstancePtr  ) 

This function will clear the virtual channel payload ID table in both the DisplayPort TX and all downstream DisplayPort devices.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the payload ID tables were successfully cleared.

Note:
None.

void XDp_TxDisableMainLink ( XDp InstancePtr  ) 

This function disables the main link.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
None.

u32 XDp_TxDiscoverTopology ( XDp InstancePtr  ) 

This function will explore the DisplayPort topology of downstream devices connected to the DisplayPort TX. It will recursively go through each branch device, obtain its information by sending a LINK_ADDRESS sideband message, and add this information to the the topology's node table. For each sink device connected to a branch's downstream port, this function will obtain the details of the sink, add it to the topology's node table, as well as add it to the topology's sink list.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the topology discovery is successful.
  • XST_FAILURE otherwise - if sending a LINK_ADDRESS sideband message to one of the branch devices in the topology failed.
Note:
The contents of the InstancePtr->TxInstance.Topology structure will be modified.

void XDp_TxEnableMainLink ( XDp InstancePtr  ) 

This function enables the main link.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
None.

void XDp_TxEnableTrainAdaptive ( XDp InstancePtr,
u8  Enable 
)

This function enables or disables downshifting during the training process.

Parameters:
InstancePtr is a pointer to the XDp instance.
Enable controls the downshift feature in the training process.
Returns:
None.
Note:
None.

u32 XDp_TxEstablishLink ( XDp InstancePtr  ) 

This function checks if the link needs training and runs the training sequence if training is required.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS was either already trained, or has been trained successfully.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

u32 XDp_TxFindAccessibleDpDevices ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress 
)

This function will explore the DisplayPort topology of downstream devices starting from the branch device specified by the LinkCountTotal and RelativeAddress parameters. It will recursively go through each branch device, obtain its information by sending a LINK_ADDRESS sideband message, and add this information to the the topology's node table. For each sink device connected to a branch's downstream port, this function will obtain the details of the sink, add it to the topology's node table, as well as add it to the topology's sink list.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the total DisplayPort links connecting the DisplayPort TX to the current downstream device in the recursion.
RelativeAddress is the relative address from the DisplayPort source to the current target DisplayPort device in the recursion.
Returns:
  • XST_SUCCESS if the topology discovery is successful.
  • XST_FAILURE otherwise - if sending a LINK_ADDRESS sideband message to one of the branch devices in the topology failed.
Note:
The contents of the InstancePtr->TxInstance.Topology structure will be modified.

u32 XDp_TxGetDispIdDataBlock ( u8 *  DisplayIdRaw,
u8  SectionTag,
u8 **  DataBlockPtr 
)

Given a section tag, search for and retrieve the appropriate section data block that is part of the specified DisplayID structure.

Parameters:
DisplayIdRaw is a pointer to the DisplayID data.
SectionTag is the tag to search for that represents the desired section data block.
DataBlockPtr will be set by this function to point to the appropriate section data block that is part of the DisplayIdRaw.
Returns:
  • XST_SUCCESS if the section data block with the specified tag was found.
  • XST_FAILURE otherwise.
Note:
The DataBlockPtr argument is modified to point to the entry in DisplayIdRaw that represents the beginning of the desired section data block.

u32 XDp_TxGetEdid ( XDp InstancePtr,
u8 *  Edid 
)

This function retrieves an immediately connected RX device's Extended Display Identification Data (EDID) structure.

Parameters:
InstancePtr is a pointer to the XDp instance.
Edid is a pointer to the Edid buffer to save to.
Returns:
  • XST_SUCCESS if the I2C transactions to read the EDID were successful.
  • XST_ERROR_COUNT_MAX if the EDID read request timed out.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

u32 XDp_TxGetEdidBlock ( XDp InstancePtr,
u8 *  Data,
u8  BlockNum 
)

Retrieve an immediately connected RX device's Extended Display Identification Data (EDID) block given the block number. A block number of 0 represents the base EDID and subsequent block numbers represent EDID extension blocks.

Parameters:
InstancePtr is a pointer to the XDp instance.
Data is a pointer to the data buffer to save the block data to.
BlockNum is 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.

void XDp_TxGetGuid ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u32 *  Guid 
)

This function will obtain the global unique identifier (GUID) for the target DisplayPort device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target device.
RelativeAddress is the relative address from the DisplayPort source to the target device.
Guid is a pointer to the GUID that will store the existing GUID of the target device.
Returns:
None.
Note:
None.

u32 XDp_TxGetRemoteEdid ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u8 *  Edid 
)

This function retrieves a remote RX device's Extended Display Identification Data (EDID) structure.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
Edid is a pointer to the Edid buffer to save to.
Returns:
  • XST_SUCCESS if the I2C transactions to read the EDID were successful.
  • XST_ERROR_COUNT_MAX if the EDID read request timed out.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

u32 XDp_TxGetRemoteEdidBlock ( XDp InstancePtr,
u8 *  Data,
u8  BlockNum,
u8  LinkCountTotal,
u8 *  RelativeAddress 
)

Retrieve a downstream DisplayPort device's Extended Display Identification Data (EDID) block given the block number. A block number of 0 represents the base EDID and subsequent block numbers represent EDID extension blocks.

Parameters:
InstancePtr is a pointer to the XDp instance.
Data is a pointer to the data buffer to save the block data to.
BlockNum is the EDID block number to retrieve.
LinkCountTotal is the total DisplayPort links connecting the DisplayPort TX to the targeted downstream device.
RelativeAddress is the relative address from the DisplayPort source to the targeted DisplayPort device.
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.

u32 XDp_TxGetRemoteEdidDispIdExt ( XDp InstancePtr,
u8 *  Data,
u8  LinkCountTotal,
u8 *  RelativeAddress 
)

Search for and retrieve a downstream DisplayPort device's Extended Display Identification Data (EDID) extension block of type DisplayID.

Parameters:
InstancePtr is a pointer to the XDp instance.
Data is a pointer to the data buffer to save the DisplayID to.
LinkCountTotal is the total DisplayPort links connecting the DisplayPort TX to the targeted downstream device.
RelativeAddress is the relative address from the DisplayPort source to the targeted DisplayPort device.
Returns:
  • XST_SUCCESS a DisplayID extension block was found.
  • XST_ERROR_COUNT_MAX if a time out occurred while attempting to read an extension block.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE if no DisplayID extension block was found or some error occurred in the search.
Note:
None.

u32 XDp_TxGetRemoteTiledDisplayDb ( XDp InstancePtr,
u8 *  EdidExt,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u8 **  DataBlockPtr 
)

Search for and retrieve a downstream DisplayPort device's Tiled Display Topology (TDT) section data block that is part of the downstream device's DisplayID structure. The DisplayID structure is part of the Extended Display Identification Data (EDID) in the form of an extension block.

Parameters:
InstancePtr is a pointer to the XDp instance.
EdidExt is a pointer to the data area that will be filled by the retrieved DisplayID extension block.
LinkCountTotal is the total DisplayPort links connecting the DisplayPort TX to the targeted downstream device.
RelativeAddress is the relative address from the DisplayPort source to the targeted DisplayPort device.
DataBlockPtr will be set by this function to point to the TDT data block that is part of the EdidExt extension block.
Returns:
  • XST_SUCCESS a DisplayID extension block was found.
  • XST_ERROR_COUNT_MAX if a time out occurred while attempting to read an extension block.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE if no DisplayID extension block was found or some error occurred in the search.
Note:
The EdidExt will be filled with the DisplayID EDID extension block and the DataBlockPtr argument is modified to point to the EdidExt entry representing the TDT section data block.

u32 XDp_TxGetRxCapabilities ( XDp InstancePtr  ) 

This function retrieves the RX device's capabilities from the RX device's DisplayPort Configuration Data (DPCD).

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the DisplayPort Configuration Data was read successfully.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

u32 XDp_TxIicRead ( XDp InstancePtr,
u8  IicAddress,
u16  Offset,
u16  BytesToRead,
void *  ReadData 
)

This function performs an I2C read over the AUX channel. The read message will be divided into multiple transactions if the requested data spans multiple segments. The segment pointer is automatically incremented and the offset is calibrated as needed. E.g. For an overall offset of:

Parameters:
InstancePtr is a pointer to the XDp instance.
IicAddress is the address on the I2C bus of the target device.
Offset is the offset at the specified address of the targeted I2C device that the read will start from.
BytesToRead is the number of bytes to read.
ReadData is a pointer to a buffer that will be filled with the I2C read data.
Returns:
  • XST_SUCCESS if the I2C read has successfully completed with no errors.
  • XST_ERROR_COUNT_MAX if the AUX request timed out.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

u32 XDp_TxIicWrite ( XDp InstancePtr,
u8  IicAddress,
u8  BytesToWrite,
void *  WriteData 
)

This function performs an I2C write over the AUX channel.

Parameters:
InstancePtr is a pointer to the XDp instance.
IicAddress is the address on the I2C bus of the target device.
BytesToWrite is the number of bytes to write.
WriteData is 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.

u32 XDp_TxIsConnected ( XDp InstancePtr  ) 

This function checks if there is a connected RX device.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • TRUE if there is a connection.
  • FALSE if there is no connection.

u32 XDp_TxMstCapable ( XDp InstancePtr  ) 

This function will check if the immediate downstream RX device is capable of multi-stream transport (MST) mode. A DisplayPort Configuration Data (DPCD) version of 1.2 or higher is required and the MST capability bit in the DPCD must be set for this function to return XST_SUCCESS.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the RX device is MST capable.
  • XST_NO_FEATURE if the RX device does not support MST.

Note:
None.

void XDp_TxMstCfgModeDisable ( XDp InstancePtr  ) 

This function will disable multi-stream transport (MST) mode for the driver.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
When disabled, the driver will behave in single-stream transport (SST) mode.

void XDp_TxMstCfgModeEnable ( XDp InstancePtr  ) 

This function will enable multi-stream transport (MST) mode for the driver.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
None.

void XDp_TxMstCfgStreamDisable ( XDp InstancePtr,
u8  Stream 
)

This function will configure the InstancePtr->TxInstance.MstStreamConfig structure to disable the specified stream.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream ID that will be disabled.
Returns:
None.
Note:
None.

void XDp_TxMstCfgStreamEnable ( XDp InstancePtr,
u8  Stream 
)

This function will configure the InstancePtr->TxInstance.MstStreamConfig structure to enable the specified stream.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream ID that will be enabled.
Returns:
None.
Note:
None.

u32 XDp_TxMstDisable ( XDp InstancePtr  ) 

This function will disable multi-stream transport (MST) mode in both the DisplayPort TX and the immediate downstream RX device.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if MST mode has been successful disabled in hardware.

Note:
None.

u32 XDp_TxMstEnable ( XDp InstancePtr  ) 

This function will enable multi-stream transport (MST) mode in both the DisplayPort TX and the immediate downstream RX device.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if MST mode has been successful enabled in hardware.
  • XST_NO_FEATURE if the immediate downstream RX device does not support MST - that is, if its DisplayPort Configuration Data (DPCD) version is less than 1.2, or if the DPCD indicates that it has no DPCD capabilities.

Note:
None.

u8 XDp_TxMstStreamIsEnabled ( XDp InstancePtr,
u8  Stream 
)

This function will check whether

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream ID to check for enable/disable status.
Returns:
  • 1 if the specified stream is enabled.
  • 0 if the specified stream is disabled.
Note:
None.

u32 XDp_TxRemoteDpcdRead ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u32  DpcdAddress,
u32  BytesToRead,
u8 *  ReadData 
)

This function performs a remote DisplayPort Configuration Data (DPCD) read by sending a sideband message. In case message is directed at the RX device connected immediately to the TX, the message is issued over the AUX channel. The read message will be divided into multiple transactions which read a maximum of 16 bytes each.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
DpcdAddress is the starting address to read from the RX device.
BytesToRead is the number of bytes to read.
ReadData is a pointer to the data buffer that will be filled with read data.
Returns:
  • XST_SUCCESS if the DPCD read has successfully completed (has been acknowledged).
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_ERROR_COUNT_MAX if either waiting for a reply, or an AUX request timed out.
  • XST_DATA_LOST if the requested number of BytesToRead does not equal that actually received.
  • XST_FAILURE otherwise - if an AUX read or write transaction failed, the header or body CRC of the sideband message did not match the calculated value, or the a reply was negative acknowledged (NACK'ed).
Note:
None.

u32 XDp_TxRemoteDpcdWrite ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u32  DpcdAddress,
u32  BytesToWrite,
u8 *  WriteData 
)

This function performs a remote DisplayPort Configuration Data (DPCD) write by sending a sideband message. In case message is directed at the RX device connected immediately to the TX, the message is issued over the AUX channel. The write message will be divided into multiple transactions which write a maximum of 16 bytes each.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
DpcdAddress is the starting address to write to the RX device.
BytesToWrite is the number of bytes to write.
WriteData is a pointer to a buffer which will be used as the data source for the write.
Returns:
  • XST_SUCCESS if the DPCD write has successfully completed (has been acknowledged).
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_ERROR_COUNT_MAX if either waiting for a reply, or an AUX request timed out.
  • XST_DATA_LOST if the requested number of BytesToWrite does not equal that actually received.
  • XST_FAILURE otherwise - if an AUX read or write transaction failed, the header or body CRC of the sideband message did not match the calculated value, or the a reply was negative acknowledged (NACK'ed).
Note:
None.

u32 XDp_TxRemoteIicRead ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u8  IicAddress,
u16  Offset,
u16  BytesToRead,
u8 *  ReadData 
)

This function performs a remote I2C read by sending a sideband message. In case message is directed at the RX device connected immediately to the TX, the message is sent over the AUX channel. The read message will be divided into multiple transactions which read a maximum of 16 bytes each. The segment pointer is automatically incremented and the offset is calibrated as needed. E.g. For an overall offset of:

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
IicAddress is the address on the I2C bus of the target device.
Offset is the offset at the specified address of the targeted I2C device that the read will start from.
BytesToRead is the number of bytes to read.
ReadData is a pointer to a buffer that will be filled with the I2C read data.
Returns:
  • XST_SUCCESS if the I2C read has successfully completed with no errors.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_ERROR_COUNT_MAX if either waiting for a reply, or an AUX request timed out.
  • XST_DATA_LOST if the requested number of BytesToRead does not equal that actually received.
  • XST_FAILURE otherwise - if an AUX read or write transaction failed, the header or body CRC of the sideband message did not match the calculated value, or the a reply was negative acknowledged (NACK'ed).
Note:
None.

u32 XDp_TxRemoteIicWrite ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u8  IicAddress,
u8  BytesToWrite,
u8 *  WriteData 
)

This function performs a remote I2C write by sending a sideband message. In case message is directed at the RX device connected immediately to the TX, the message is sent over the AUX channel.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
IicAddress is the address on the I2C bus of the target device.
BytesToWrite is the number of bytes to write.
WriteData is 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 either waiting for a reply, or an AUX request timed out.
  • XST_DATA_LOST if the requested number of BytesToWrite does not equal that actually received.
  • XST_FAILURE otherwise - if an AUX read or write transaction failed, the header or body CRC of the sideband message did not match the calculated value, or the a reply was negative acknowledged (NACK'ed).
Note:
None.

void XDp_TxResetPhy ( XDp InstancePtr,
u32  Reset 
)

This function does a PHY reset.

Parameters:
InstancePtr is a pointer to the XDp instance.
Reset is the type of reset to assert.
Returns:
None.
Note:
None.

u32 XDp_TxSendSbMsgAllocatePayload ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u8  VcId,
u16  Pbn 
)

This function will send an ALLOCATE_PAYLOAD sideband message which will allocate bandwidth for a virtual channel in the payload ID tables of the downstream devices connecting the DisplayPort TX to the target device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
VcId is the unique virtual channel ID to allocate into the payload ID tables.
Pbn is the payload bandwidth number that determines how much bandwidth will be allocated for the virtual channel.
Returns:
  • XST_SUCCESS if the reply to the sideband message was successfully obtained and it indicates an acknowledge.

Note:
ALLOCATE_PAYLOAD is a path message that will be serviced by all downstream DisplayPort devices connecting the DisplayPort TX and the target device.

u32 XDp_TxSendSbMsgClearPayloadIdTable ( XDp InstancePtr  ) 

This function will send a CLEAR_PAYLOAD_ID_TABLE sideband message which will de-allocate all virtual channel payload ID tables.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
  • XST_SUCCESS if the reply to the sideband message was successfully obtained and it indicates an acknowledge.

Note:
CLEAR_PAYLOAD_ID_TABLE is a broadcast message sent to all downstream devices.

u32 XDp_TxSendSbMsgEnumPathResources ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u16 *  AvailPbn,
u16 *  FullPbn 
)

This function will send an ENUM_PATH_RESOURCES sideband message which will determine the available payload bandwidth number (PBN) for a path to a target device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
AvailPbn is a pointer to the available PBN of the path whose value will be filled in by this function.
FullPbn is a pointer to the total PBN of the path whose value will be filled in by this function.
Returns:
  • XST_SUCCESS if the reply to the sideband message was successfully obtained and it indicates an acknowledge.

Note:
ENUM_PATH_RESOURCES is a path message that will be serviced by all downstream DisplayPort devices connecting the DisplayPort TX and the target device.

AvailPbn will be modified with the available PBN from the reply.

FullPbn will be modified with the total PBN of the path from the reply.

u32 XDp_TxSendSbMsgLinkAddress ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
XDp_TxSbMsgLinkAddressReplyDeviceInfo DeviceInfo 
)

This function will send a LINK_ADDRESS sideband message to a target DisplayPort branch device. It is used to determine the resources available for that device and some device information for each of the ports connected to the branch device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort branch device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort branch device.
DeviceInfo is a pointer to the device information structure whose contents will be filled in with the information obtained by the LINK_ADDRESS sideband message.
Returns:
  • XST_SUCCESS if the reply to the sideband message was successfully obtained and it indicates an acknowledge.

Note:
The contents of the DeviceInfo structure will be modified with the information obtained from the LINK_ADDRESS sideband message reply.

u32 XDp_TxSendSbMsgRemoteDpcdRead ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u32  DpcdAddress,
u32  BytesToRead,
u8 *  ReadData 
)

This function will send a REMOTE_DPCD_READ sideband message which will read from the specified DisplayPort Configuration Data (DPCD) address of a downstream DisplayPort device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
DpcdAddress is the DPCD address of the target device that data will be read from.
BytesToRead is the number of bytes to read from the specified DPCD address.
ReadData is a pointer to a buffer that will be filled with the DPCD read data.
Returns:
  • XST_SUCCESS if the reply to the sideband message was successfully obtained and it indicates an acknowledge.

Note:
None.

u32 XDp_TxSendSbMsgRemoteDpcdWrite ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u32  DpcdAddress,
u32  BytesToWrite,
u8 *  WriteData 
)

This function will send a REMOTE_DPCD_WRITE sideband message which will write some data to the specified DisplayPort Configuration Data (DPCD) address of a downstream DisplayPort device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
DpcdAddress is the DPCD address of the target device that data will be written to.
BytesToWrite is the number of bytes to write to the specified DPCD address.
WriteData is a pointer to a buffer that stores the data to write to the DPCD location.
Returns:
  • XST_SUCCESS if the reply to the sideband message was successfully obtained and it indicates an acknowledge.

Note:
None.

u32 XDp_TxSendSbMsgRemoteIicRead ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u8  IicDeviceId,
u8  Offset,
u8  BytesToRead,
u8 *  ReadData 
)

This function will send a REMOTE_I2C_READ sideband message which will read from the specified I2C address of a downstream DisplayPort device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target DisplayPort device.
RelativeAddress is the relative address from the DisplayPort source to the target DisplayPort device.
IicDeviceId is the address on the I2C bus of the target device.
Offset is the offset at the specified address of the targeted I2C device that the read will start from.
BytesToRead is the number of bytes to read from the I2C address.
ReadData is a pointer to a buffer that will be filled with the I2C read data.
Returns:
  • XST_SUCCESS if the reply to the sideband message was successfully obtained and it indicates an acknowledge.

Note:
None.

u32 XDp_TxSendSbMsgRemoteIicWrite ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u8  IicDeviceId,
u8  BytesToWrite,
u8 *  WriteData 
)

u32 XDp_TxSetDownspread ( XDp InstancePtr,
u8  Enable 
)

This function enables or disables 0.5% spreading of the clock for both the DisplayPort and the RX device.

Parameters:
InstancePtr is a pointer to the XDp instance.
Enable will downspread the main link signal if set to 1 and disable downspreading if set to 0.
Returns:
  • XST_SUCCESS if setting the downspread control enable was successful.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

u32 XDp_TxSetEnhancedFrameMode ( XDp InstancePtr,
u8  Enable 
)

This function enables or disables the enhanced framing symbol sequence for both the DisplayPort TX core and the RX device.

Parameters:
InstancePtr is a pointer to the XDp instance.
Enable will enable enhanced frame mode if set to 1 and disable it if set to 0.
Returns:
  • XST_SUCCESS if setting the enhanced frame mode enable was successful.
  • XST_DEVICE_NOT_FOUND if no RX is connected.
  • XST_FAILURE otherwise.
Note:
None.

void XDp_TxSetHasRedriverInPath ( XDp InstancePtr,
u8  Set 
)

This function sets a software switch that signifies whether or not a redriver exists on the DisplayPort output path. XDp_TxSetVswingPreemp uses this switch to determine which set of voltage swing and pre-emphasis values to use in the TX core.

Parameters:
InstancePtr is a pointer to the XDp instance.
Set establishes that a redriver exists in the DisplayPort output path.
Returns:
None.
Note:
None.

void XDp_TxSetHpdEventHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a hot-plug-detect event interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

void XDp_TxSetHpdPulseHandler ( XDp InstancePtr,
XDp_IntrHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a callback function for when a hot-plug-detect pulse interrupt occurs.

Parameters:
InstancePtr is a pointer to the XDp instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item that will be passed to the callback function when it is invoked.
Returns:
None.
Note:
None.

u32 XDp_TxSetLaneCount ( XDp InstancePtr,
u8  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:
InstancePtr is a pointer to the XDp instance.
LaneCount is the number of lanes to be used over the main link.
Returns:
  • XST_SUCCESS if setting the new lane count was successful.
  • XST_DEVICE_NOT_FOUND if no RX is connected.
  • XST_FAILURE otherwise.
Note:
None.

u32 XDp_TxSetLinkRate ( XDp InstancePtr,
u8  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:
InstancePtr is a pointer to the XDp instance.
LinkRate is the link rate to be used over the main link based on one of the following selects:
  • XDP_TX_LINK_BW_SET_162GBPS = 0x06 (for a 1.62 Gbps data rate)
  • XDP_TX_LINK_BW_SET_270GBPS = 0x0A (for a 2.70 Gbps data rate)
  • XDP_TX_LINK_BW_SET_540GBPS = 0x14 (for a 5.40 Gbps data rate)
Returns:
  • XST_SUCCESS if setting the new link rate was successful.
  • XST_DEVICE_NOT_FOUND if no RX device is connected.
  • XST_FAILURE otherwise.
Note:
None.

void XDp_TxSetMsaValues ( XDp InstancePtr,
u8  Stream 
)

This function sets the main stream attributes registers of the DisplayPort TX core with the values specified in the main stream attributes configuration structure.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which to set the MSA values for.
Returns:
None.
Note:
None.

u32 XDp_TxSetScrambler ( XDp InstancePtr,
u8  Enable 
)

This function enables or disables scrambling of symbols for both the DisplayPort and the RX device.

Parameters:
InstancePtr is a pointer to the XDp instance.
Enable will enable or disable scrambling.
Returns:
  • XST_SUCCESS if setting the scrambling enable was successful.
  • XST_FAILURE otherwise.
Note:
None.

void XDp_TxSetStreamSelectFromSinkList ( XDp InstancePtr,
u8  Stream,
u8  SinkNum 
)

This function will map a stream to a downstream DisplayPort TX device that is associated with a sink from the InstancePtr->TxInstance.Topology.SinkList.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream ID that will be mapped to a DisplayPort device.
SinkNum is the sink ID in the sink list that will be mapped to the stream.
Returns:
None.
Note:
The contents of the InstancePtr->TxInstance. MstStreamConfig[Stream] will be modified.

The topology will need to be determined prior to calling this function using the XDp_TxFindAccessibleDpDevices.

void XDp_TxSetStreamSinkRad ( XDp InstancePtr,
u8  Stream,
u8  LinkCountTotal,
u8 *  RelativeAddress 
)

This function will map a stream to a downstream DisplayPort TX device determined by the relative address.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number that will be mapped to a DisplayPort device.
LinkCountTotal is the total DisplayPort links connecting the DisplayPort TX to the targeted downstream device.
RelativeAddress is the relative address from the DisplayPort source to the targeted DisplayPort device.
Returns:
None.
Note:
The contents of the InstancePtr->TxInstance. MstStreamConfig[Stream] will be modified.

void XDp_TxSetVideoMode ( XDp InstancePtr,
u8  Stream 
)

This function clears the main stream attributes registers of the DisplayPort TX core and sets them to the values specified in the main stream attributes configuration structure.

Parameters:
InstancePtr is a pointer to the XDp instance.
Stream is the stream number for which to set the MSA values for.
Returns:
None.
Note:
None.

void XDp_TxTopologySortSinksByTiling ( XDp InstancePtr  ) 

Order the sink list with all sinks of the same tiled display being sorted by 'tile order'. Refer to the XDp_TxGetDispIdTdtTileOrder macro on how to determine the 'tile order'. Sinks of a tiled display will have an index in the sink list that is lower than all indices of other sinks within that same tiled display that have a greater 'tile order'. When operations are done on the sink list, this ordering will ensure that sinks within the same tiled display will be acted upon in a consistent manner - with an incrementing sink list index, sinks with a lower 'tile order' will be acted upon first relative to the other sinks in the same tiled display. Multiple tiled displays may exist in the sink list.

Parameters:
InstancePtr is a pointer to the XDp instance.
Returns:
None.
Note:
None.

void XDp_TxTopologySwapSinks ( XDp InstancePtr,
u8  Index0,
u8  Index1 
)

Swap the ordering of the sinks in the topology's sink list. All sink information is preserved in the node table - the swapping takes place only on the pointers to the sinks in the node table. The reason this swapping is done is so that functions that use the sink list will act on the sinks in a different order.

Parameters:
InstancePtr is a pointer to the XDp instance.
Index0 is the sink list's index of one of the sink pointers to be swapped.
Index1 is the sink list's index of the other sink pointer to be swapped.
Returns:
None.
Note:
None.

void XDp_TxWriteGuid ( XDp InstancePtr,
u8  LinkCountTotal,
u8 *  RelativeAddress,
u32  Guid[4] 
)

This function will write a global unique identifier (GUID) to the target DisplayPort device.

Parameters:
InstancePtr is a pointer to the XDp instance.
LinkCountTotal is the number of DisplayPort links from the DisplayPort source to the target device.
RelativeAddress is the relative address from the DisplayPort source to the target device.
Guid is a the GUID to write to the target device.
Returns:
None.
Note:
None.

void XDp_WaitUs ( XDp InstancePtr,
u32  MicroSeconds 
)

This function is the delay/sleep function for the XDp driver. For the Zynq family, there exists native sleep functionality. For MicroBlaze however, there does not exist such functionality. In the MicroBlaze case, the default method for delaying is to use a predetermined amount of loop iterations. This method is prone to inaccuracy and dependent on system configuration; for greater accuracy, the user may supply their own delay/sleep handler, pointed to by InstancePtr->UserTimerWaitUs, which may have better accuracy if a hardware timer is used.

Parameters:
InstancePtr is a pointer to the XDp instance.
MicroSeconds is the number of microseconds to delay/sleep for.
Returns:
None.
Note:
None.

Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.