Software Drivers

xdptx.h File Reference

#include "xdptx_hw.h"
#include "xil_assert.h"
#include "xil_types.h"

Classes

struct  XDptx_DmtMode
struct  XDptx_Config
struct  XDptx_SinkConfig
struct  XDptx_LinkConfig
struct  XDptx_MainStreamAttributes
struct  XDptx

Defines

#define XDptx_IsConnected(InstancePtr)

Typedefs

typedef void(*) XDptx_TimerHandler (void *InstancePtr, u32 MicroSeconds)
typedef void(*) XDptx_HpdEventHandler (void *InstancePtr)
typedef void(*) XDptx_HpdPulseHandler (void *InstancePtr)

Enumerations

enum  XDptx_VideoMode {
  XDPTX_VM_640x480_60_P, XDPTX_VM_800x600_60_P, XDPTX_VM_848x480_60_P, XDPTX_VM_1024x768_60_P,
  XDPTX_VM_1280x768_60_P_RB, XDPTX_VM_1280x768_60_P, XDPTX_VM_1280x800_60_P_RB, XDPTX_VM_1280x800_60_P,
  XDPTX_VM_1280x960_60_P, XDPTX_VM_1280x1024_60_P, XDPTX_VM_1360x768_60_P, XDPTX_VM_1400x1050_60_P_RB,
  XDPTX_VM_1400x1050_60_P, XDPTX_VM_1440x900_60_P_RB, XDPTX_VM_1440x900_60_P, XDPTX_VM_1600x1200_60_P,
  XDPTX_VM_1680x1050_60_P_RB, XDPTX_VM_1680x1050_60_P, XDPTX_VM_1792x1344_60_P, XDPTX_VM_1856x1392_60_P,
  XDPTX_VM_1920x1200_60_P_RB, XDPTX_VM_1920x1200_60_P, XDPTX_VM_1920x1440_60_P, XDPTX_VM_2560x1600_60_P_RB,
  XDPTX_VM_2560x1600_60_P, XDPTX_VM_800x600_56_P, XDPTX_VM_1600x1200_65_P, XDPTX_VM_1600x1200_70_P,
  XDPTX_VM_1024x768_70_P, XDPTX_VM_640x480_72_P, XDPTX_VM_800x600_72_P, XDPTX_VM_640x480_75_P,
  XDPTX_VM_800x600_75_P, XDPTX_VM_1024x768_75_P, XDPTX_VM_1152x864_75_P, XDPTX_VM_1280x768_75_P,
  XDPTX_VM_1280x800_75_P, XDPTX_VM_1280x1024_75_P, XDPTX_VM_1400x1050_75_P, XDPTX_VM_1440x900_75_P,
  XDPTX_VM_1600x1200_75_P, XDPTX_VM_1680x1050_75_P, XDPTX_VM_1792x1344_75_P, XDPTX_VM_1856x1392_75_P,
  XDPTX_VM_1920x1200_75_P, XDPTX_VM_1920x1440_75_P, XDPTX_VM_2560x1600_75_P, XDPTX_VM_640x350_85_P,
  XDPTX_VM_640x400_85_P, XDPTX_VM_720x400_85_P, XDPTX_VM_640x480_85_P, XDPTX_VM_800x600_85_P,
  XDPTX_VM_1024x768_85_P, XDPTX_VM_1280x768_85_P, XDPTX_VM_1280x800_85_P, XDPTX_VM_1280x960_85_P,
  XDPTX_VM_1280x1024_85_P, XDPTX_VM_1400x1050_85_P, XDPTX_VM_1440x900_85_P, XDPTX_VM_1600x1200_85_P,
  XDPTX_VM_1680x1050_85_P, XDPTX_VM_1920x1200_85_P, XDPTX_VM_2560x1600_85_P, XDPTX_VM_800x600_120_P_RB,
  XDPTX_VM_1024x768_120_P_RB, XDPTX_VM_1280x768_120_P_RB, XDPTX_VM_1280x800_120_P_RB, XDPTX_VM_1280x960_120_P_RB,
  XDPTX_VM_1280x1024_120_P_RB, XDPTX_VM_1360x768_120_P_RB, XDPTX_VM_1400x1050_120_P_RB, XDPTX_VM_1440x900_120_P_RB,
  XDPTX_VM_1600x1200_120_P_RB, XDPTX_VM_1680x1050_120_P_RB, XDPTX_VM_1792x1344_120_P_RB, XDPTX_VM_1856x1392_120_P_RB,
  XDPTX_VM_1920x1200_120_P_RB, XDPTX_VM_1920x1440_120_P_RB, XDPTX_VM_2560x1600_120_P_RB, XDPTX_VM_1366x768_60_P,
  XDPTX_VM_1920x1080_60_P, XDPTX_VM_UHD_30_P, XDPTX_VM_720_60_P, XDPTX_VM_480_60_P,
  XDPTX_VM_UHD2_60_P, XDPTX_VM_UHD_60, XDPTX_VM_USE_EDID_PREFERRED, XDPTX_VM_LAST = XDPTX_VM_USE_EDID_PREFERRED
}

Functions

u32 XDptx_InitializeTx (XDptx *InstancePtr)
void XDptx_CfgInitialize (XDptx *InstancePtr, XDptx_Config *ConfigPtr, u32 EffectiveAddr)
u32 XDptx_GetRxCapabilities (XDptx *InstancePtr)
u32 XDptx_GetEdid (XDptx *InstancePtr)
u32 XDptx_CfgMainLinkMax (XDptx *InstancePtr)
u32 XDptx_EstablishLink (XDptx *InstancePtr)
u32 XDptx_CheckLinkStatus (XDptx *InstancePtr, u8 LaneCount)
void XDptx_EnableTrainAdaptive (XDptx *InstancePtr, u8 Enable)
void XDptx_SetHasRedriverInPath (XDptx *InstancePtr, u8 Set)
u32 XDptx_AuxRead (XDptx *InstancePtr, u32 Address, u32 NumBytes, void *Data)
u32 XDptx_AuxWrite (XDptx *InstancePtr, u32 Address, u32 NumBytes, void *Data)
u32 XDptx_IicRead (XDptx *InstancePtr, u8 IicAddress, u8 RegStartAddress, u8 NumBytes, void *Data)
u32 XDptx_IicWrite (XDptx *InstancePtr, u8 IicAddress, u8 RegStartAddress, u8 NumBytes, void *Data)
u32 XDptx_SetDownspread (XDptx *InstancePtr, u8 Enable)
u32 XDptx_SetEnhancedFrameMode (XDptx *InstancePtr, u8 Enable)
u32 XDptx_SetLaneCount (XDptx *InstancePtr, u8 LaneCount)
u32 XDptx_SetLinkRate (XDptx *InstancePtr, u8 LinkRate)
u32 XDptx_SetScrambler (XDptx *InstancePtr, u8 Enable)
void XDptx_EnableMainLink (XDptx *InstancePtr)
void XDptx_DisableMainLink (XDptx *InstancePtr)
void XDptx_ResetPhy (XDptx *InstancePtr, u32 Reset)
void XDptx_WaitUs (XDptx *InstancePtr, u32 MicroSeconds)
void XDptx_SetUserTimerHandler (XDptx *InstancePtr, XDptx_TimerHandler CallbackFunc, void *CallbackRef)
void XDptx_CfgMsaRecalculate (XDptx *InstancePtr)
void XDptx_CfgMsaUseStandardVideoMode (XDptx *InstancePtr, XDptx_VideoMode VideoMode)
void XDptx_CfgMsaUseEdidPreferredTiming (XDptx *InstancePtr)
void XDptx_CfgMsaUseCustom (XDptx *InstancePtr, XDptx_MainStreamAttributes *MsaConfigCustom, u8 Recalculate)
void XDptx_CfgMsaSetBpc (XDptx *InstancePtr, u8 BitsPerColor)
void XDptx_SetVideoMode (XDptx *InstancePtr)
void XDptx_SetHpdEventHandler (XDptx *InstancePtr, XDptx_HpdEventHandler CallbackFunc, void *CallbackRef)
void XDptx_SetHpdPulseHandler (XDptx *InstancePtr, XDptx_HpdPulseHandler CallbackFunc, void *CallbackRef)
void XDptx_HpdInterruptHandler (XDptx *InstancePtr)
u32 XDptx_SelfTest (XDptx *InstancePtr)
XDptx_ConfigXDptx_LookupConfig (u16 DeviceId)

Variables

XDptx_DmtMode XDptx_DmtModes []


Define Documentation

#define XDptx_IsConnected ( InstancePtr   ) 

Value:

This macro checks if there is a connected RX device.

Parameters:
InstancePtr is a pointer to the XDptx instance.
Returns:
  • TRUE if there is a connection.
  • FALSE if there is no connection.
Note:
C-style signature: void XDptx_IsConnected(XDptx *InstancePtr)


Typedef Documentation

typedef void(*) XDptx_HpdEventHandler(void *InstancePtr)

Callback type which represents the handler for a Hot-Plug-Detect (HPD) event interrupt.

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

typedef void(*) XDptx_HpdPulseHandler(void *InstancePtr)

Callback type which represents the handler for a Hot-Plug-Detect (HPD) pulse interrupt.

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

typedef void(*) XDptx_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 XDptx instance.
MicroSeconds is the number of microseconds to be passed to the timer function.
Note:
None.


Enumeration Type Documentation

enum XDptx_VideoMode

This typedef enumerates the list of available standard display monitor timings as specified in the mode_table.c file. The naming format is:

XDPTX_VM_<RESOLUTION>_<REFRESH RATE (HZ)>_<P|RB>

Where RB stands for reduced blanking.

Enumerator:
XDPTX_VM_640x480_60_P 
XDPTX_VM_800x600_60_P 
XDPTX_VM_848x480_60_P 
XDPTX_VM_1024x768_60_P 
XDPTX_VM_1280x768_60_P_RB 
XDPTX_VM_1280x768_60_P 
XDPTX_VM_1280x800_60_P_RB 
XDPTX_VM_1280x800_60_P 
XDPTX_VM_1280x960_60_P 
XDPTX_VM_1280x1024_60_P 
XDPTX_VM_1360x768_60_P 
XDPTX_VM_1400x1050_60_P_RB 
XDPTX_VM_1400x1050_60_P 
XDPTX_VM_1440x900_60_P_RB 
XDPTX_VM_1440x900_60_P 
XDPTX_VM_1600x1200_60_P 
XDPTX_VM_1680x1050_60_P_RB 
XDPTX_VM_1680x1050_60_P 
XDPTX_VM_1792x1344_60_P 
XDPTX_VM_1856x1392_60_P 
XDPTX_VM_1920x1200_60_P_RB 
XDPTX_VM_1920x1200_60_P 
XDPTX_VM_1920x1440_60_P 
XDPTX_VM_2560x1600_60_P_RB 
XDPTX_VM_2560x1600_60_P 
XDPTX_VM_800x600_56_P 
XDPTX_VM_1600x1200_65_P 
XDPTX_VM_1600x1200_70_P 
XDPTX_VM_1024x768_70_P 
XDPTX_VM_640x480_72_P 
XDPTX_VM_800x600_72_P 
XDPTX_VM_640x480_75_P 
XDPTX_VM_800x600_75_P 
XDPTX_VM_1024x768_75_P 
XDPTX_VM_1152x864_75_P 
XDPTX_VM_1280x768_75_P 
XDPTX_VM_1280x800_75_P 
XDPTX_VM_1280x1024_75_P 
XDPTX_VM_1400x1050_75_P 
XDPTX_VM_1440x900_75_P 
XDPTX_VM_1600x1200_75_P 
XDPTX_VM_1680x1050_75_P 
XDPTX_VM_1792x1344_75_P 
XDPTX_VM_1856x1392_75_P 
XDPTX_VM_1920x1200_75_P 
XDPTX_VM_1920x1440_75_P 
XDPTX_VM_2560x1600_75_P 
XDPTX_VM_640x350_85_P 
XDPTX_VM_640x400_85_P 
XDPTX_VM_720x400_85_P 
XDPTX_VM_640x480_85_P 
XDPTX_VM_800x600_85_P 
XDPTX_VM_1024x768_85_P 
XDPTX_VM_1280x768_85_P 
XDPTX_VM_1280x800_85_P 
XDPTX_VM_1280x960_85_P 
XDPTX_VM_1280x1024_85_P 
XDPTX_VM_1400x1050_85_P 
XDPTX_VM_1440x900_85_P 
XDPTX_VM_1600x1200_85_P 
XDPTX_VM_1680x1050_85_P 
XDPTX_VM_1920x1200_85_P 
XDPTX_VM_2560x1600_85_P 
XDPTX_VM_800x600_120_P_RB 
XDPTX_VM_1024x768_120_P_RB 
XDPTX_VM_1280x768_120_P_RB 
XDPTX_VM_1280x800_120_P_RB 
XDPTX_VM_1280x960_120_P_RB 
XDPTX_VM_1280x1024_120_P_RB 
XDPTX_VM_1360x768_120_P_RB 
XDPTX_VM_1400x1050_120_P_RB 
XDPTX_VM_1440x900_120_P_RB 
XDPTX_VM_1600x1200_120_P_RB 
XDPTX_VM_1680x1050_120_P_RB 
XDPTX_VM_1792x1344_120_P_RB 
XDPTX_VM_1856x1392_120_P_RB 
XDPTX_VM_1920x1200_120_P_RB 
XDPTX_VM_1920x1440_120_P_RB 
XDPTX_VM_2560x1600_120_P_RB 
XDPTX_VM_1366x768_60_P 
XDPTX_VM_1920x1080_60_P 
XDPTX_VM_UHD_30_P 
XDPTX_VM_720_60_P 
XDPTX_VM_480_60_P 
XDPTX_VM_UHD2_60_P 
XDPTX_VM_UHD_60 
XDPTX_VM_USE_EDID_PREFERRED 
XDPTX_VM_LAST 


Function Documentation

u32 XDptx_AuxRead ( XDptx InstancePtr,
u32  Address,
u32  NumBytes,
void *  Data 
)

This function issues a read request over the AUX channel.

Parameters:
InstancePtr is a pointer to the XDptx instance.
Address is the starting address to read from the RX device.
NumBytes is the number of bytes to read from the RX device.
Data 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 XDptx_AuxWrite ( XDptx InstancePtr,
u32  Address,
u32  NumBytes,
void *  Data 
)

This function issues a write request over the AUX channel.

Parameters:
InstancePtr is a pointer to the XDptx instance.
Address is the starting address to write to the RX device.
NumBytes is the number of bytes to write to the RX device.
Data is a pointer to the data buffer that contains the data to be written to the RX device.
Returns:
  • XST_SUCCESS if 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.

void XDptx_CfgInitialize ( XDptx InstancePtr,
XDptx_Config ConfigPtr,
u32  EffectiveAddr 
)

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

Parameters:
InstancePtr is a pointer to the XDptx 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 XDptx_CfgMainLinkMax ( XDptx InstancePtr  ) 

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

Parameters:
InstancePtr is a pointer to the XDptx 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 XDptx_CfgMsaRecalculate ( XDptx InstancePtr  ) 

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

Parameters:
InstancePtr is a pointer to the XDptx instance.
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 XDptx_CfgMsaSetBpc ( XDptx InstancePtr,
u8  BitsPerColor 
)

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

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

void XDptx_CfgMsaUseCustom ( XDptx InstancePtr,
XDptx_MainStreamAttributes MsaConfigCustom,
u8  Recalculate 
)

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

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

void XDptx_CfgMsaUseEdidPreferredTiming ( XDptx InstancePtr  ) 

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 XDptx instance
Returns:
None.
Note:
The InstancePtr->MsaConfig structure is modified to reflect the main stream attribute values associated to the preferred timing of the sink monitor.

void XDptx_CfgMsaUseStandardVideoMode ( XDptx InstancePtr,
XDptx_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 XDptx_DmtModes[] standard Display Monitor Timing (DMT) table. The XDptx_VideoMode enumeration in xdptx.h lists the available video modes.

Parameters:
InstancePtr is a pointer to the XDptx instance.
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->MsaConfig structure is modified to reflect the MSA values associated to the specified video mode.

u32 XDptx_CheckLinkStatus ( XDptx 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 XDptx 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 XDptx_DisableMainLink ( XDptx InstancePtr  ) 

This function disables the main link.

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

void XDptx_EnableMainLink ( XDptx InstancePtr  ) 

This function enables the main link.

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

void XDptx_EnableTrainAdaptive ( XDptx InstancePtr,
u8  Enable 
)

This function enables or disables downshifting during the training process.

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

u32 XDptx_EstablishLink ( XDptx 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 XDptx 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 XDptx_GetEdid ( XDptx InstancePtr  ) 

This function retrieves the RX device's Extended Display Identification Data (EDID).

Parameters:
InstancePtr is a pointer to the XDptx instance.
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 XDptx_GetRxCapabilities ( XDptx 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 XDptx 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.

void XDptx_HpdInterruptHandler ( XDptx InstancePtr  ) 

This function is the interrupt handler for the XDptx driver.

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

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

u32 XDptx_IicRead ( XDptx InstancePtr,
u8  IicAddress,
u8  RegStartAddress,
u8  NumBytes,
void *  Data 
)

This function performs an I2C read over the AUX channel.

Parameters:
InstancePtr is a pointer to the XDptx instance.
IicAddress is the address on the I2C bus of the target device.
RegStartAddress is the subaddress of the targeted I2C device that the read will start from.
NumBytes is the number of bytes to read.
Data 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 XDptx_IicWrite ( XDptx InstancePtr,
u8  IicAddress,
u8  RegStartAddress,
u8  NumBytes,
void *  Data 
)

This function performs an I2C write over the AUX channel.

Parameters:
InstancePtr is a pointer to the XDptx instance.
IicAddress is the address on the I2C bus of the target device.
RegStartAddress is the sub-address of the targeted I2C device that the write will start at.
NumBytes is the number of bytes to write.
Data 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 XDptx_InitializeTx ( XDptx InstancePtr  ) 

This function prepares the DisplayPort TX core for use.

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

XDptx_Config* XDptx_LookupConfig ( u16  DeviceId  ) 

This function looks for the device configuration based on the unique device ID. The table XDptx_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.

void XDptx_ResetPhy ( XDptx InstancePtr,
u32  Reset 
)

This function does a PHY reset.

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

u32 XDptx_SelfTest ( XDptx InstancePtr  ) 

This function runs a self-test on the XDptx driver/device. The sanity test checks whether or not all tested registers hold their default reset values.

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

u32 XDptx_SetDownspread ( XDptx 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 XDptx 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 XDptx_SetEnhancedFrameMode ( XDptx 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 XDptx 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 XDptx_SetHasRedriverInPath ( XDptx InstancePtr,
u8  Set 
)

This function sets a software switch that signifies whether or not a redriver exists on the DisplayPort output path. XDptx_SetVswingPreemp 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 XDptx instance.
Set establishes that a redriver exists in the DisplayPort output path.
Returns:
None.
Note:
None.

void XDptx_SetHpdEventHandler ( XDptx InstancePtr,
XDptx_HpdEventHandler  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 XDptx 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 XDptx_SetHpdPulseHandler ( XDptx InstancePtr,
XDptx_HpdPulseHandler  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 XDptx 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 XDptx_SetLaneCount ( XDptx 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 XDptx 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 XDptx_SetLinkRate ( XDptx 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 XDptx instance.
LinkRate is the link rate to be used over the main link based on one of the following selects:
  • XDPTX_LINK_BW_SET_162GBPS = 0x06 (for a 1.62 Gbps data rate)
  • XDPTX_LINK_BW_SET_270GBPS = 0x0A (for a 2.70 Gbps data rate)
  • XDPTX_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.

u32 XDptx_SetScrambler ( XDptx 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 XDptx instance.
Enable will enable or disable scrambling.
Returns:
  • XST_SUCCESS if setting the scrambling enable was successful.
  • XST_FAILURE otherwise.
Note:
None.

void XDptx_SetUserTimerHandler ( XDptx InstancePtr,
XDptx_TimerHandler  CallbackFunc,
void *  CallbackRef 
)

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

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

void XDptx_SetVideoMode ( XDptx InstancePtr  ) 

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 XDptx instance
Returns:
None.
Note:
None.

void XDptx_WaitUs ( XDptx InstancePtr,
u32  MicroSeconds 
)

This function is the delay/sleep function for the XDptx 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 XDptx instance.
MicroSeconds is the number of microseconds to delay/sleep for.
Returns:
None.
Note:
None.


Variable Documentation

XDptx_DmtMode XDptx_DmtModes[]

This table contains the main stream attributes for various standard resolutions. Each entry is of the format: 1) XDPTX_VM_<HRES>x<VRES>_<REFRESH (HZ)>_P(_RB = Reduced Blanking) 2) Display Monitor Timing (DMT) ID 3) Horizontal resolution (pixels) 4) Vertical resolution (lines) 5) Pixel clock (KHz) 6) Scan (0=non-interlaced|1=interlaced) 7) Horizontal sync polarity (0=positive|1=negative) 8) Vertical sync polarity (0=positive|1=negative) 9) Horizontal front porch (pixels) 10) Horizontal sync time (pixels) 11) Horizontal back porch (pixels) 12) Vertical front porch (lines) 13) Vertical sync time (lines) 14) Vertical back porch (lines)

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