dppsu
Vitis Drivers API Documentation
|
The Xilinx DisplayPort transmitter (DPTX_PS) driver.
This driver supports the Xilinx DisplayPort PS core in TX mode. This driver follows the DisplayPort 1.2a specification.
The Xilinx DisplayPort soft IP supports the following features:
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 aad 05/17/14 Initial release.
Data Structures | |
struct | XDpPsu_Config |
This typedef contains configuration information for the DisplayPort TX core. More... | |
struct | XDpPsu_SinkConfig |
This typedef contains configuration information about the RX device. More... | |
struct | XDpPsu_LinkConfig |
This typedef contains configuration information about the main link settings. More... | |
struct | XDpPsu_MainStreamAttributes |
This typedef contains the main stream attributes which determine how the video will be displayed. More... | |
struct | XDpPsu_BoardChar |
This typedef describes some board characteristics information that affects link training. More... | |
struct | XDpPsu |
The XDpPsu driver instance data. More... | |
Typedefs | |
typedef void(* | XDpPsu_HpdEventHandler )(void *InstancePtr) |
Callback type which represents the handler for a Hot-Plug-Detect (HPD) event interrupt. More... | |
typedef void(* | XDpPsu_HpdPulseHandler )(void *InstancePtr) |
Callback type which represents the handler for a Hot-Plug-Detect (HPD) pulse interrupt. More... | |
Enumerations | |
enum | XDpPsu_ColorEncoding { XDPPSU_CENC_RGB = 0, XDPPSU_CENC_XVYCC_422_BT601, XDPPSU_CENC_XVYCC_422_BT709, XDPPSU_CENC_XVYCC_444_BT601, XDPPSU_CENC_XVYCC_444_BT709, XDPPSU_CENC_YCBCR_422_BT601, XDPPSU_CENC_YCBCR_422_BT709, XDPPSU_CENC_YCBCR_444_BT601, XDPPSU_CENC_YCBCR_444_BT709, XDPPSU_CENC_YONLY } |
This typedef contains the color encoding schemes that are supported. More... | |
Functions | |
u32 | XDpPsu_InitializeTx (XDpPsu *InstancePtr) |
This function prepares the DisplayPort TX core for use. More... | |
void | XDpPsu_CfgInitialize (XDpPsu *InstancePtr, XDpPsu_Config *ConfigPtr, u32 EffectiveAddr) |
This function retrieves the configuration for this DisplayPort TX instance and fills in the InstancePtr->Config structure. More... | |
u32 | XDpPsu_GetRxCapabilities (XDpPsu *InstancePtr) |
This function retrieves the RX device's capabilities from the RX device's DisplayPort Configuration Data (DPCD). More... | |
u32 | XDpPsu_CfgMainLinkMax (XDpPsu *InstancePtr) |
This function determines the common capabilities between the DisplayPort TX core and the RX device. More... | |
u32 | XDpPsu_EstablishLink (XDpPsu *InstancePtr) |
This function checks if the link needs training and runs the training sequence if training is required. More... | |
u32 | XDpPsu_CheckLinkStatus (XDpPsu *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. More... | |
u32 | XDpPsu_AuxRead (XDpPsu *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. More... | |
u32 | XDpPsu_AuxWrite (XDpPsu *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. More... | |
u32 | XDpPsu_IicRead (XDpPsu *InstancePtr, u8 IicAddress, u16 Offset, u16 BytesToRead, void *ReadData) |
This function performs an I2C read over the AUX channel. More... | |
u32 | XDpPsu_IicWrite (XDpPsu *InstancePtr, u8 IicAddress, u8 BytesToWrite, void *WriteData) |
This function performs an I2C write over the AUX channel. More... | |
u32 | XDpPsu_SetDownspread (XDpPsu *InstancePtr, u8 Enable) |
This function enables or disables 0.5% spreading of the clock for both the DisplayPort and the RX device. More... | |
u32 | XDpPsu_SetEnhancedFrameMode (XDpPsu *InstancePtr, u8 Enable) |
This function enables or disables the enhanced framing symbol sequence for both the DisplayPort TX core and the RX device. More... | |
u32 | XDpPsu_SetLaneCount (XDpPsu *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. More... | |
u32 | XDpPsu_SetLinkRate (XDpPsu *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. More... | |
u32 | XDpPsu_SetScrambler (XDpPsu *InstancePtr, u8 Enable) |
This function enables or disables scrambling of symbols for both the DisplayPort and the RX device. More... | |
u32 | XDpPsu_IsConnected (XDpPsu *InstancePtr) |
This function checks if there is a connected RX device. More... | |
void | XDpPsu_EnableMainLink (XDpPsu *InstancePtr, u8 Enable) |
This function enables the main link. More... | |
void | XDpPsu_ResetPhy (XDpPsu *InstancePtr, u32 Reset) |
This function does a PHY reset. More... | |
void | XDpPsu_CfgMsaRecalculate (XDpPsu *InstancePtr) |
This function calculates the following Main Stream Attributes (MSA): More... | |
void | XDpPsu_CfgMsaUseStandardVideoMode (XDpPsu *InstancePtr, 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 XDpPsu_DmtModes[] standard Display Monitor Timing (DMT) table. More... | |
void | XDpPsu_CfgMsaUseEdidPreferredTiming (XDpPsu *InstancePtr, u8 *Edid) |
This function sets the main stream attribute values in the configuration structure to match the preferred timing of the sink monitor. More... | |
void | XDpPsu_CfgMsaUseCustom (XDpPsu *InstancePtr, XDpPsu_MainStreamAttributes *MsaConfigCustom, u8 Recalculate) |
This function takes a the main stream attributes from MsaConfigCustom and copies them into InstancePtr->MsaConfig. More... | |
void | XDpPsu_CfgMsaSetBpc (XDpPsu *InstancePtr, u8 BitsPerColor) |
This function sets the bits per color value of the video stream. More... | |
void | XDpPsu_CfgMsaEnSynchClkMode (XDpPsu *InstancePtr, u8 Enable) |
This function enables or disables synchronous clock mode for a video stream. More... | |
void | XDpPsu_SetVideoMode (XDpPsu *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. More... | |
void | XDpPsu_SetMsaValues (XDpPsu *InstancePtr) |
This function sets the main stream attributes registers of the DisplayPort TX core with the values specified in the main stream attributes configuration structure. More... | |
void | XDpPsu_SetHpdEventHandler (XDpPsu *InstancePtr, XDpPsu_HpdEventHandler CallbackFunc, void *CallbackRef) |
This function installs a callback function for when a hot-plug-detect event interrupt occurs. More... | |
void | XDpPsu_SetHpdPulseHandler (XDpPsu *InstancePtr, XDpPsu_HpdPulseHandler CallbackFunc, void *CallbackRef) |
This function installs a callback function for when a hot-plug-detect pulse interrupt occurs. More... | |
void | XDpPsu_HpdInterruptHandler (XDpPsu *InstancePtr) |
This function is the interrupt handler for the XDpPsu driver. More... | |
u32 | XDpPsu_SelfTest (XDpPsu *InstancePtr) |
This function runs a self-test on the XDpPsu driver/device. More... | |
XDpPsu_Config * | XDpPsu_LookupConfig (u16 DeviceId) |
This function looks for the device configuration based on the unique device ID. More... | |
u32 | XDpPsu_GetEdid (XDpPsu *InstancePtr, u8 *Edid) |
This function retrieves an immediately connected RX device's Extended Display Identification Data (EDID) structure. More... | |
u32 | XDpPsu_GetEdidBlock (XDpPsu *InstancePtr, u8 *Data, u8 BlockNum) |
Retrieve an immediately connected RX device's Extended Display Identification Data (EDID) block given the block number. More... | |
u32 | XDpPsu_GetDispIdDataBlock (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. More... | |
void | XDpPsu_SetColorEncode (XDpPsu *InstancePtr, XDpPsu_ColorEncoding ColorEncode) |
This function sets the output Video format for the DP core. More... | |
typedef void(* XDpPsu_HpdEventHandler)(void *InstancePtr) |
Callback type which represents the handler for a Hot-Plug-Detect (HPD) event interrupt.
InstancePtr | is a pointer to the XDpPsu instance. |
typedef void(* XDpPsu_HpdPulseHandler)(void *InstancePtr) |
Callback type which represents the handler for a Hot-Plug-Detect (HPD) pulse interrupt.
InstancePtr | is a pointer to the XDpPsu instance. |
enum XDpPsu_ColorEncoding |
This typedef contains the color encoding schemes that are supported.
u32 XDpPsu_AuxRead | ( | XDpPsu * | 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.
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu::IsReady, and XDPPSU_AUX_CMD_READ.
Referenced by XDpPsu_GetRxCapabilities(), XDpPsu_SetDownspread(), XDpPsu_SetEnhancedFrameMode(), XDpPsu_SetLaneCount(), and XDpPsu_SetScrambler().
u32 XDpPsu_AuxWrite | ( | XDpPsu * | 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.
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu::IsReady, and XDPPSU_AUX_CMD_WRITE.
Referenced by XDpPsu_SetDownspread(), XDpPsu_SetEnhancedFrameMode(), XDpPsu_SetLaneCount(), XDpPsu_SetLinkRate(), and XDpPsu_SetScrambler().
void XDpPsu_CfgInitialize | ( | XDpPsu * | InstancePtr, |
XDpPsu_Config * | ConfigPtr, | ||
u32 | EffectiveAddr | ||
) |
This function retrieves the configuration for this DisplayPort TX instance and fills in the InstancePtr->Config structure.
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu_Config::DeviceId, XDpPsu::IsReady, and XDpPsu::SAxiClkHz.
Referenced by DpPsu_SelfTestExample(), and DpPsu_SetupExample().
u32 XDpPsu_CfgMainLinkMax | ( | XDpPsu * | InstancePtr | ) |
This function determines the common capabilities between the DisplayPort TX core and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::MaxLaneCount, XDpPsu_LinkConfig::MaxLinkRate, XDpPsu_SetLaneCount(), and XDpPsu_SetLinkRate().
Referenced by DpPsu_StartLink().
void XDpPsu_CfgMsaEnSynchClkMode | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables synchronous clock mode for a video stream.
InstancePtr | is a pointer to the XDpPsu instance |
Enable | if set to 1, will enable synchronous clock mode. Otherwise, if set to 0, synchronous clock mode will be disabled. |
References XDpPsu_MainStreamAttributes::Misc0, XDpPsu::MsaConfig, XDpPsu_MainStreamAttributes::SynchronousClockMode, and XDPPSU_MAIN_STREAM_MISC0_COMPONENT_FORMAT_SHIFT.
void XDpPsu_CfgMsaRecalculate | ( | XDpPsu * | InstancePtr | ) |
This function calculates the following Main Stream Attributes (MSA):
- Transfer unit size - User pixel width - Horizontal start - Vertical start - Horizontal total clock - Vertical total clock - Misc0 - Misc1 - Data per lane - Average number of bytes per transfer unit - Number of initial wait cycles
These values are derived from:
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_MainStreamAttributes::AvgBytesPerTU, XDpPsu_MainStreamAttributes::BitsPerColor, XDpPsu_MainStreamAttributes::ComponentFormat, XDpPsu_MainStreamAttributes::DataPerLane, XDpPsu_MainStreamAttributes::DynamicRange, XDpPsu_MainStreamAttributes::HStart, XDpPsu_MainStreamAttributes::InitWait, XDpPsu_LinkConfig::LaneCount, XDpPsu::LinkConfig, XDpPsu_LinkConfig::LinkRate, XDpPsu_MainStreamAttributes::Misc0, XDpPsu_MainStreamAttributes::Misc1, XDpPsu::MsaConfig, XDpPsu_MainStreamAttributes::NVid, XDpPsu_MainStreamAttributes::PixelClockHz, XDpPsu_MainStreamAttributes::SynchronousClockMode, XDpPsu_MainStreamAttributes::TransferUnitSize, XDpPsu_MainStreamAttributes::UserPixelWidth, XDpPsu_MainStreamAttributes::VStart, XDpPsu_MainStreamAttributes::Vtm, XDPPSU_LANE_COUNT_SET_1, XDPPSU_LANE_COUNT_SET_2, XDPPSU_LINK_BW_SET_162GBPS, XDPPSU_LINK_BW_SET_270GBPS, XDPPSU_LINK_BW_SET_540GBPS, XDPPSU_MAIN_STREAM_MISC0_BDC_10BPC, XDPPSU_MAIN_STREAM_MISC0_BDC_12BPC, XDPPSU_MAIN_STREAM_MISC0_BDC_16BPC, XDPPSU_MAIN_STREAM_MISC0_BDC_6BPC, XDPPSU_MAIN_STREAM_MISC0_BDC_8BPC, XDPPSU_MAIN_STREAM_MISC0_BDC_SHIFT, XDPPSU_MAIN_STREAM_MISC0_COMPONENT_FORMAT_SHIFT, XDPPSU_MAIN_STREAM_MISC0_COMPONENT_FORMAT_YCBCR422, XDPPSU_MAIN_STREAM_MISC0_DYNAMIC_RANGE_SHIFT, XDPPSU_MAIN_STREAM_MISC0_YCBCR_COLORIMETRY_SHIFT, XDPPSU_MAIN_STREAM_MISC1_Y_ONLY_EN_MASK, and XDpPsu_MainStreamAttributes::YCbCrColorimetry.
Referenced by XDpPsu_CfgMsaSetBpc(), XDpPsu_CfgMsaUseCustom(), XDpPsu_CfgMsaUseEdidPreferredTiming(), and XDpPsu_CfgMsaUseStandardVideoMode().
void XDpPsu_CfgMsaSetBpc | ( | XDpPsu * | InstancePtr, |
u8 | BitsPerColor | ||
) |
This function sets the bits per color value of the video stream.
InstancePtr | is a pointer to the XDpPsu instance |
BitsPerColor | is the new number of bits per color to use. |
References XDpPsu_MainStreamAttributes::BitsPerColor, XDpPsu::MsaConfig, and XDpPsu_CfgMsaRecalculate().
void XDpPsu_CfgMsaUseCustom | ( | XDpPsu * | InstancePtr, |
XDpPsu_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 (MSA) that must be contained in the MsaConfigCustom structure are:
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu_MainStreamAttributes::AvgBytesPerTU, XDpPsu_MainStreamAttributes::DataPerLane, XDpPsu_MainStreamAttributes::HStart, XDpPsu_MainStreamAttributes::InitWait, XDpPsu_MainStreamAttributes::Misc0, XDpPsu_MainStreamAttributes::Misc1, XDpPsu::MsaConfig, XDpPsu_MainStreamAttributes::NVid, XDpPsu_MainStreamAttributes::PixelClockHz, XDpPsu_MainStreamAttributes::TransferUnitSize, XDpPsu_MainStreamAttributes::UserPixelWidth, XDpPsu_MainStreamAttributes::VStart, XDpPsu_MainStreamAttributes::Vtm, and XDpPsu_CfgMsaRecalculate().
void XDpPsu_CfgMsaUseEdidPreferredTiming | ( | XDpPsu * | InstancePtr, |
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).
InstancePtr | is a pointer to the XDpPsu instance |
Edid | is a pointer to the Edid to use for the specified stream. |
References XDpPsu::MsaConfig, XDpPsu_MainStreamAttributes::PixelClockHz, XDpPsu_MainStreamAttributes::Vtm, and XDpPsu_CfgMsaRecalculate().
void XDpPsu_CfgMsaUseStandardVideoMode | ( | XDpPsu * | InstancePtr, |
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 XDpPsu_DmtModes[] standard Display Monitor Timing (DMT) table.
The XDpPsu_VideoMode enumeration in xdppsu.h lists the available video modes.
InstancePtr | is a pointer to the XDpPsu instance. |
VideoMode | is one of the enumerated standard video modes that is used to determine the MSA values to be used. |
References XDpPsu::MsaConfig, XDpPsu_MainStreamAttributes::PixelClockHz, XDpPsu_MainStreamAttributes::Vtm, and XDpPsu_CfgMsaRecalculate().
u32 XDpPsu_CheckLinkStatus | ( | XDpPsu * | 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.
InstancePtr | is a pointer to the XDpPsu instance. |
LaneCount | is the number of lanes to check. |
References XDpPsu::IsReady, XDPPSU_LANE_COUNT_SET_1, and XDPPSU_LANE_COUNT_SET_2.
Referenced by DpPsu_StartLink(), and XDpPsu_EstablishLink().
void XDpPsu_EnableMainLink | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables the main link.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | is a control flag to enable or disable main link |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDPPSU_ENABLE_MAIN_STREAM, XDPPSU_FORCE_SCRAMBLER_RESET, and XDpPsu_WriteReg.
Referenced by XDpPsu_EstablishLink().
u32 XDpPsu_EstablishLink | ( | XDpPsu * | InstancePtr | ) |
This function checks if the link needs training and runs the training sequence if training is required.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu_LinkConfig::LaneCount, XDpPsu::LinkConfig, XDpPsu_LinkConfig::LinkRate, XDpPsu_CheckLinkStatus(), XDPPSU_ENABLE_MAIN_STREAM, XDpPsu_EnableMainLink(), XDPPSU_LANE_COUNT_SET_1, XDPPSU_LANE_COUNT_SET_2, XDPPSU_LINK_BW_SET_162GBPS, XDPPSU_LINK_BW_SET_270GBPS, XDPPSU_LINK_BW_SET_540GBPS, XDPPSU_PHY_CONFIG_PHY_RESET_MASK, XDPPSU_PHY_CONFIG_TX_PHY_8B10BEN_MASK, XDpPsu_ReadReg, XDpPsu_ResetPhy(), and XDPPSU_TRAINING_PATTERN_SET_OFF.
Referenced by DpPsu_StartLink().
u32 XDpPsu_GetDispIdDataBlock | ( | 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.
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. |
u32 XDpPsu_GetEdid | ( | XDpPsu * | InstancePtr, |
u8 * | Edid | ||
) |
This function retrieves an immediately connected RX device's Extended Display Identification Data (EDID) structure.
InstancePtr | is a pointer to the XDpPsu instance. |
Edid | is a pointer to the Edid buffer to save to. |
References XDpPsu::IsReady, and XDpPsu_GetEdidBlock().
u32 XDpPsu_GetEdidBlock | ( | XDpPsu * | 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.
InstancePtr | is a pointer to the XDpPsu instance. |
Data | is a pointer to the data buffer to save the block data to. |
BlockNum | is the EDID block number to retrieve. |
References XDpPsu_IicRead().
Referenced by XDpPsu_GetEdid().
u32 XDpPsu_GetRxCapabilities | ( | XDpPsu * | InstancePtr | ) |
This function retrieves the RX device's capabilities from the RX device's DisplayPort Configuration Data (DPCD).
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu::Config, XDpPsu_SinkConfig::DpcdRxCapsField, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::MaxLaneCount, XDpPsu_LinkConfig::MaxLinkRate, XDpPsu::RxConfig, XDpPsu_LinkConfig::SupportDownspreadControl, XDpPsu_LinkConfig::SupportEnhancedFramingMode, and XDpPsu_AuxRead().
Referenced by DpPsu_StartLink().
void XDpPsu_HpdInterruptHandler | ( | XDpPsu * | InstancePtr | ) |
This function is the interrupt handler for the XDpPsu driver.
When an interrupt happens, it first detects what kind of interrupt happened, then decides which callback function to invoke.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::HpdEventCallbackRef, XDpPsu::HpdEventHandler, XDpPsu::HpdPulseCallbackRef, XDpPsu::HpdPulseHandler, XDPPSU_HPD_DURATION, XDPPSU_INTR_HPD_EVENT_MASK, XDPPSU_INTR_HPD_PULSE_DETECTED_MASK, XDPPSU_INTR_STATUS, XDpPsu_IsConnected(), XDpPsu_ReadReg, and XDpPsu_WriteReg.
u32 XDpPsu_IicRead | ( | XDpPsu * | 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:
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDPPSU_AUX_CMD_I2C_READ, XDPPSU_AUX_CMD_I2C_WRITE_MOT, XDpPsu_IicWrite(), XDPPSU_INTR_HPD_EVENT_MASK, XDPPSU_INTR_STATUS, and XDpPsu_ReadReg.
Referenced by XDpPsu_GetEdidBlock().
u32 XDpPsu_IicWrite | ( | XDpPsu * | InstancePtr, |
u8 | IicAddress, | ||
u8 | BytesToWrite, | ||
void * | WriteData | ||
) |
This function performs an I2C write over the AUX channel.
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu::IsReady, and XDPPSU_AUX_CMD_I2C_WRITE.
Referenced by XDpPsu_IicRead().
u32 XDpPsu_InitializeTx | ( | XDpPsu * | InstancePtr | ) |
This function prepares the DisplayPort TX core for use.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu::SAxiClkHz, XDPPSU_AUX_CLK_DIVIDER, XDPPSU_AUX_CLK_DIVIDER_VAL_MASK, XDPPSU_DP_DISABLE, XDPPSU_DP_ENABLE, XDPPSU_ENABLE, XDPPSU_INTR_HPD_EVENT_MASK, XDPPSU_INTR_HPD_IRQ_MASK, XDPPSU_INTR_HPD_PULSE_DETECTED_MASK, XDPPSU_INTR_MASK, XDPPSU_PHY_CLOCK_SELECT, XDPPSU_PHY_CLOCK_SELECT_540GBPS, XDPPSU_PHY_CONFIG, XDPPSU_PHY_CONFIG_GT_ALL_RESET_MASK, XDpPsu_ReadReg, XDPPSU_SOFT_RESET, XDPPSU_SOFT_RESET_EN, and XDpPsu_WriteReg.
Referenced by DpPsu_SetupExample().
u32 XDpPsu_IsConnected | ( | XDpPsu * | InstancePtr | ) |
This function checks if there is a connected RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDPPSU_INTERRUPT_SIG_STATE, XDPPSU_INTERRUPT_SIG_STATE_HPD_STATE_MASK, and XDpPsu_ReadReg.
Referenced by XDpPsu_HpdInterruptHandler().
XDpPsu_Config* XDpPsu_LookupConfig | ( | u16 | DeviceId | ) |
This function looks for the device configuration based on the unique device ID.
The table XDpPsu_ConfigTable[] contains the configuration information for each device in the system.
DeviceId | is the unique device ID of the device being looked up. |
Referenced by DpPsu_SelfTestExample(), and DpPsu_SetupExample().
void XDpPsu_ResetPhy | ( | XDpPsu * | InstancePtr, |
u32 | Reset | ||
) |
This function does a PHY reset.
InstancePtr | is a pointer to the XDpPsu instance. |
Reset | is the type of reset to assert. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDPPSU_ENABLE, XDPPSU_PHY_CONFIG, XDpPsu_ReadReg, and XDpPsu_WriteReg.
Referenced by XDpPsu_EstablishLink().
u32 XDpPsu_SelfTest | ( | XDpPsu * | InstancePtr | ) |
This function runs a self-test on the XDpPsu driver/device.
The sanity test checks whether or not all tested registers hold their default reset values.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, ResetValues, ResetValuesMsa, and XDpPsu_ReadReg.
Referenced by DpPsu_SelfTestExample().
void XDpPsu_SetColorEncode | ( | XDpPsu * | InstancePtr, |
XDpPsu_ColorEncoding | ColorEncode | ||
) |
This function sets the output Video format for the DP core.
InstancePtr | is a pointer to the XDpPsu instance. |
ColorEncode | is an enumarator for output color encoding schemes |
References XDpPsu_MainStreamAttributes::ComponentFormat, XDpPsu_MainStreamAttributes::DynamicRange, XDpPsu_MainStreamAttributes::Misc0, XDpPsu_MainStreamAttributes::Misc1, XDpPsu::MsaConfig, XDPPSU_CENC_RGB, XDPPSU_CENC_XVYCC_422_BT601, XDPPSU_CENC_XVYCC_422_BT709, XDPPSU_CENC_XVYCC_444_BT601, XDPPSU_CENC_XVYCC_444_BT709, XDPPSU_CENC_YCBCR_422_BT601, XDPPSU_CENC_YCBCR_422_BT709, XDPPSU_CENC_YCBCR_444_BT601, XDPPSU_CENC_YCBCR_444_BT709, XDPPSU_CENC_YONLY, XDPPSU_MAIN_STREAM_MISC0_COMPONENT_FORMAT_RGB, XDPPSU_MAIN_STREAM_MISC0_COMPONENT_FORMAT_YCBCR422, XDPPSU_MAIN_STREAM_MISC0_COMPONENT_FORMAT_YCBCR444, XDPPSU_MAIN_STREAM_MISC1_Y_ONLY_EN_MASK, and XDpPsu_MainStreamAttributes::YCbCrColorimetry.
u32 XDpPsu_SetDownspread | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables 0.5% spreading of the clock for both the DisplayPort and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | will downspread the main link signal if set to 1 and disable downspreading if set to 0. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu_LinkConfig::DownspreadControl, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_DOWNSPREAD_CTRL, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink().
u32 XDpPsu_SetEnhancedFrameMode | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables the enhanced framing symbol sequence for both the DisplayPort TX core and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | will enable enhanced frame mode if set to 1 and disable it if set to 0. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu_LinkConfig::EnhancedFramingMode, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_ENHANCED_FRAME_EN, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink().
void XDpPsu_SetHpdEventHandler | ( | XDpPsu * | InstancePtr, |
XDpPsu_HpdEventHandler | CallbackFunc, | ||
void * | CallbackRef | ||
) |
This function installs a callback function for when a hot-plug-detect event interrupt occurs.
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu::HpdEventCallbackRef, and XDpPsu::HpdEventHandler.
void XDpPsu_SetHpdPulseHandler | ( | XDpPsu * | InstancePtr, |
XDpPsu_HpdPulseHandler | CallbackFunc, | ||
void * | CallbackRef | ||
) |
This function installs a callback function for when a hot-plug-detect pulse interrupt occurs.
InstancePtr | is a pointer to the XDpPsu 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. |
References XDpPsu::HpdPulseCallbackRef, and XDpPsu::HpdPulseHandler.
u32 XDpPsu_SetLaneCount | ( | XDpPsu * | 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.
InstancePtr | is a pointer to the XDpPsu instance. |
LaneCount | is the number of lanes to be used over the main link. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu_LinkConfig::LaneCount, XDpPsu::LinkConfig, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_LANE_COUNT_SET, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink(), and XDpPsu_CfgMainLinkMax().
u32 XDpPsu_SetLinkRate | ( | XDpPsu * | 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.
InstancePtr | is a pointer to the XDpPsu instance. |
LinkRate | is the link rate to be used over the main link based on one of the following selects:
|
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::LinkRate, XDpPsu_AuxWrite(), XDPPSU_LINK_BW_SET, XDPPSU_LINK_BW_SET_162GBPS, XDPPSU_LINK_BW_SET_270GBPS, XDPPSU_LINK_BW_SET_540GBPS, XDPPSU_PHY_CLOCK_SELECT_162GBPS, XDPPSU_PHY_CLOCK_SELECT_270GBPS, XDPPSU_PHY_CLOCK_SELECT_540GBPS, and XDpPsu_WriteReg.
Referenced by DpPsu_StartLink(), and XDpPsu_CfgMainLinkMax().
void XDpPsu_SetMsaValues | ( | XDpPsu * | InstancePtr | ) |
This function sets the main stream attributes registers of the DisplayPort TX core with the values specified in the main stream attributes configuration structure.
InstancePtr | is a pointer to the XDpPsu instance. |
References XDpPsu_MainStreamAttributes::AvgBytesPerTU, XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu_MainStreamAttributes::DataPerLane, XDpPsu_MainStreamAttributes::HStart, XDpPsu_MainStreamAttributes::InitWait, XDpPsu::IsReady, XDpPsu_MainStreamAttributes::Misc0, XDpPsu_MainStreamAttributes::Misc1, XDpPsu::MsaConfig, XDpPsu_MainStreamAttributes::NVid, XDpPsu_MainStreamAttributes::PixelClockHz, XDpPsu_MainStreamAttributes::TransferUnitSize, XDpPsu_MainStreamAttributes::UserPixelWidth, XDpPsu_MainStreamAttributes::VStart, XDpPsu_MainStreamAttributes::Vtm, XDPPSU_FRAC_BYTES_PER_TU, XDPPSU_INIT_WAIT, XDPPSU_M_VID, XDPPSU_MAIN_STREAM_HRES, XDPPSU_MAIN_STREAM_HSTART, XDPPSU_MAIN_STREAM_HSWIDTH, XDPPSU_MAIN_STREAM_HTOTAL, XDPPSU_MAIN_STREAM_MISC0, XDPPSU_MAIN_STREAM_MISC1, XDPPSU_MAIN_STREAM_POLARITY, XDPPSU_MAIN_STREAM_POLARITY_VSYNC_POL_SHIFT, XDPPSU_MAIN_STREAM_VRES, XDPPSU_MAIN_STREAM_VSTART, XDPPSU_MAIN_STREAM_VSWIDTH, XDPPSU_MAIN_STREAM_VTOTAL, XDPPSU_MIN_BYTES_PER_TU, XDPPSU_N_VID, XDPPSU_TU_SIZE, XDPPSU_USER_DATA_COUNT_PER_LANE, XDPPSU_USER_PIXEL_WIDTH, and XDpPsu_WriteReg.
Referenced by XDpPsu_SetVideoMode().
u32 XDpPsu_SetScrambler | ( | XDpPsu * | InstancePtr, |
u8 | Enable | ||
) |
This function enables or disables scrambling of symbols for both the DisplayPort and the RX device.
InstancePtr | is a pointer to the XDpPsu instance. |
Enable | will enable or disable scrambling. |
References XDpPsu_Config::BaseAddr, XDpPsu::Config, XDpPsu::IsReady, XDpPsu::LinkConfig, XDpPsu_LinkConfig::ScramblerEn, XDpPsu_AuxRead(), XDpPsu_AuxWrite(), XDPPSU_SCRAMBLING_DISABLE, and XDpPsu_WriteReg.
void XDpPsu_SetVideoMode | ( | XDpPsu * | 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.
InstancePtr | is a pointer to the XDpPsu instance |
References XDpPsu::IsReady, and XDpPsu_SetMsaValues().