dp14rxss
Vitis Drivers API Documentation
|
This file contains a design example using the XDpRxSs driver in single stream (SST) transport mode.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 nd 2/14/19 Common rx only application for zcu102 and vcu118 1.1 ku 8/14/20 CRC Calculator configured for 4 PPC 1.2 nd 1/12/21 Added Support for VSC 1.3 ND 04/02/21 Moved all global variables declaration from .h to .c files due to gcc compiler compilation error. 1.4 ND 07/21/22 Updated LMK03318 address. 1.5 ND 08/26/22 Added DELAY macro to increase delay in IDT_8T49N24x_SetClock() if encountering iic race condition.
Functions | |
u32 | DpRxSs_Main (u16 DeviceId) |
This function is the main entry point for the design example using the XDpRxSs driver. More... | |
u32 | DpRxSs_PlatformInit (void) |
This function initialize required platform specific peripherals. More... | |
u32 | DpRxSs_VideoPhyInit (u16 DeviceId) |
This function configures Video Phy. More... | |
u32 | DpRxSs_Setup (void) |
This function configures DisplayPort RX Subsystem. More... | |
void | PHY_Two_byte_set (XVphy *InstancePtr, u8 Rx_to_two_byte) |
This function sets GT in 16-bits (2-Byte) or 32-bits (4-Byte) mode. More... | |
void | PLLRefClkSel (XVphy *InstancePtr, u8 link_rate) |
This function sets proper ref clk frequency and line rate. More... | |
void | AppHelp () |
This function prints Menu. More... | |
void | ReportVideoCRC () |
This function reports CRC values of Video components. More... | |
void | CalculateCRC (void) |
This function Calculates CRC values of Video components. More... | |
void | LoadEDID (void) |
This function load EDID content into EDID Memory. More... | |
char | XUartPs_RecvByte_NonBlocking () |
This function is a non-blocking UART return byte. More... | |
void | CustomWaitUs (void *InstancePtr, u32 MicroSeconds) |
This function is called when DisplayPort Subsystem core requires delay or sleep. More... | |
char | xil_getc (u32 timeout_ms) |
This function to get uart input from user. More... | |
u32 | DpRxSs_SetupIntrSystem (void) |
This function sets up the interrupt system so interrupts can occur for the DisplayPort RX Subsystem core. More... | |
void | DpRxSs_PowerChangeHandler (void *InstancePtr) |
This function is the callback function for when the power state interrupt occurs. More... | |
void | DpRxSs_NoVideoHandler (void *InstancePtr) |
This function is the callback function for when a no video interrupt occurs. More... | |
void | DpRxSs_VerticalBlankHandler (void *InstancePtr) |
This function is the callback function for when a vertical blank interrupt occurs. More... | |
void | DpRxSs_TrainingLostHandler (void *InstancePtr) |
This function is the callback function for when a training lost interrupt occurs. More... | |
void | DpRxSs_VideoHandler (void *InstancePtr) |
This function is the callback function for when a valid video interrupt occurs. More... | |
void | DpRxSs_InfoPacketHandler (void *InstancePtr) |
This function is the callback function for Info Packet Handling. More... | |
void | DpRxSs_ExtPacketHandler (void *InstancePtr) |
This function is the callback function for Generic Packet Handling of 32-Bytes payload. More... | |
void | DpRxSs_TrainingDoneHandler (void *InstancePtr) |
This function is the callback function for when the training done interrupt occurs. More... | |
void | DpRxSs_UnplugHandler (void *InstancePtr) |
This function is the callback function for when the unplug event occurs. More... | |
void | DpRxSs_LinkBandwidthHandler (void *InstancePtr) |
This function is the callback function for when the link bandwidth change occurs. More... | |
void | DpRxSs_PllResetHandler (void *InstancePtr) |
This function is the callback function for PLL reset request. More... | |
void | DpRxSs_BWChangeHandler (void *InstancePtr) |
This function is the callback function for PLL reset request. More... | |
void | DpRxSs_AccessLaneSetHandler (void *InstancePtr) |
This function is the callback function for Access lane set request. More... | |
void | DpRxSs_AccessLinkQualHandler (void *InstancePtr) |
This function is the callback function for Access link qual request. More... | |
void | DpRxSs_AccessErrorCounterHandler (void *InstancePtr) |
This function is the callback function for Access prbs error count. More... | |
void | DpRxSs_CRCTestEventHandler (void *InstancePtr) |
This function is the callback function for Test CRC Event request. More... | |
int | VideoFMC_Init (void) |
This function initializes VFMC. More... | |
void | Print_InfoPkt () |
This function is the callback function for Info Packet Handling. More... | |
void | Print_ExtPkt () |
This function is the callback function for Ext Packet Handling. More... | |
int | main () |
This is the main function for XDpRxSs interrupt example. More... | |
void | I2C_Scan (u32 BaseAddress) |
This function scans VFMC- IIC. More... | |
u8 | i2c_read_dp141 (u32 I2CBaseAddress, u8 I2CSlaveAddress, u16 RegisterAddress) |
This function reads DP141 VFMC- IIC. More... | |
void AppHelp | ( | ) |
void CalculateCRC | ( | void | ) |
This function Calculates CRC values of Video components.
None. |
References CustomWaitUs(), XDpRxSs::DpPtr, XDpRxSs_UsrOpt::LaneCount, and XDpRxSs::UsrOpt.
Referenced by DpRxSs_Main().
void CustomWaitUs | ( | void * | InstancePtr, |
u32 | MicroSeconds | ||
) |
This function is called when DisplayPort Subsystem core requires delay or sleep.
It provides timer with predefined amount of loop iterations.
InstancePtr | is a pointer to the XDp instance. |
Referenced by CalculateCRC(), and DpRxSs_SetupIntrSystem().
void DpRxSs_AccessErrorCounterHandler | ( | void * | InstancePtr | ) |
This function is the callback function for Access prbs error count.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr, I2C_MCDP6000_ADDR, XDpRxSs_MCDP6000_GetRegister(), and XDpRxSs_MCDP6000_Read_ErrorCounters().
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_AccessLaneSetHandler | ( | void * | InstancePtr | ) |
This function is the callback function for Access lane set request.
InstancePtr | is a pointer to the XDpRxSs instance. |
void DpRxSs_AccessLinkQualHandler | ( | void * | InstancePtr | ) |
This function is the callback function for Access link qual request.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr, I2C_MCDP6000_ADDR, XDpRxSs_MCDP6000_ClearCounter(), XDpRxSs_MCDP6000_DisablePrbs7_Rx(), and XDpRxSs_MCDP6000_EnablePrbs7_Rx().
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_BWChangeHandler | ( | void * | InstancePtr | ) |
This function is the callback function for PLL reset request.
InstancePtr | is a pointer to the XDpRxSs instance. |
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_CRCTestEventHandler | ( | void * | InstancePtr | ) |
This function is the callback function for Test CRC Event request.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs_Config::BaseAddress, XDpRxSs::Config, and XDpRxSs::DpPtr.
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_ExtPacketHandler | ( | void * | InstancePtr | ) |
This function is the callback function for Generic Packet Handling of 32-Bytes payload.
This function is the callback function for when arrival of external (audio) packet interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr.
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_InfoPacketHandler | ( | void * | InstancePtr | ) |
This function is the callback function for Info Packet Handling.
This function is the callback function for when an info packet interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr.
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_LinkBandwidthHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when the link bandwidth change occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs_UsrOpt::LinkRate, PLLRefClkSel(), and XDpRxSs::UsrOpt.
Referenced by DpRxSs_SetupIntrSystem().
u32 DpRxSs_Main | ( | u16 | DeviceId | ) |
This function is the main entry point for the design example using the XDpRxSs driver.
This function will setup the system with interrupts handlers.
DeviceId | is the unique device ID of the DisplayPort RX Subsystem core. |
References AppHelp(), XDpRxSs_Config::BaseAddress, CalculateCRC(), XDpRxSs::DpPtr, DpRxSs_PlatformInit(), DpRxSs_Setup(), DpRxSs_SetupIntrSystem(), DpRxSs_VideoPhyInit(), I2C_MCDP6000_ADDR, XDpRxSs_UsrOpt::LaneCount, XDpRxSs_UsrOpt::LinkRate, XDpRxSs_UsrOpt::MstSupport, Print_ExtPkt(), Print_InfoPkt(), ReportVideoCRC(), XDpRxSs::UsrOpt, XDpRxSs::VBlankCount, XDpRxSs_AudioDisable, XDpRxSs_AudioEnable, XDpRxSs_CfgInitialize(), XDpRxSs_LookupConfig(), XDpRxSs_MCDP6000_GetRegister(), XDpRxSs_McDp6000_init(), XDpRxSs_MCDP6000_Read_ErrorCounters(), XDpRxSs_ReportCoreInfo(), XDpRxSs_ReportLinkInfo(), XDpRxSs_ReportMsaInfo(), XDpRxSs_SetLaneCount(), XDpRxSs_SetLinkRate(), XDpRxSs_Start(), and xil_getc().
Referenced by main().
void DpRxSs_NoVideoHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when a no video interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr, and XDpRxSs::VBlankCount.
Referenced by DpRxSs_SetupIntrSystem().
u32 DpRxSs_PlatformInit | ( | void | ) |
This function initialize required platform specific peripherals.
None. |
References I2C_IDT8N49_ADDR, IDT_8T49N24x_SetClock(), and VideoFMC_Init().
Referenced by DpRxSs_DebugExample(), DpRxSs_HdcpExample(), DpRxSs_IntrExample(), DpRxSs_Main(), and DpRxSs_MstExample().
void DpRxSs_PllResetHandler | ( | void * | InstancePtr | ) |
This function is the callback function for PLL reset request.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr.
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_PowerChangeHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when the power state interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
Referenced by DpRxSs_SetupIntrSystem().
u32 DpRxSs_Setup | ( | void | ) |
This function configures DisplayPort RX Subsystem.
None. |
None. |
References XDpRxSs::DpPtr, and LoadEDID().
Referenced by DpRxSs_DebugExample(), DpRxSs_HdcpExample(), DpRxSs_IntrExample(), DpRxSs_Main(), and DpRxSs_MstExample().
u32 DpRxSs_SetupIntrSystem | ( | void | ) |
This function sets up the interrupt system so interrupts can occur for the DisplayPort RX Subsystem core.
The function is application-specific since the actual system may or may not have an interrupt controller. The DPRX Subsystem core could be directly connected to a processor without an interrupt controller. The user should modify this function to fit the application.
None |
References CustomWaitUs(), DpRxSs_AccessErrorCounterHandler(), DpRxSs_AccessLinkQualHandler(), DpRxSs_BWChangeHandler(), DpRxSs_CRCTestEventHandler(), DpRxSs_ExtPacketHandler(), DpRxSs_InfoPacketHandler(), DpRxSs_LinkBandwidthHandler(), DpRxSs_NoVideoHandler(), DpRxSs_PllResetHandler(), DpRxSs_PowerChangeHandler(), DpRxSs_TrainingDoneHandler(), DpRxSs_TrainingLostHandler(), DpRxSs_UnplugHandler(), DpRxSs_VerticalBlankHandler(), DpRxSs_VideoHandler(), XDpRxSs_DpIntrHandler(), XDPRXSS_HANDLER_ACCESS_ERROR_COUNTER_EVENT, XDPRXSS_HANDLER_ACCESS_LINK_QUAL_EVENT, XDPRXSS_HANDLER_DP_BW_CHG_EVENT, XDPRXSS_HANDLER_DP_CRC_TEST_EVENT, XDPRXSS_HANDLER_DP_EXT_PKT_EVENT, XDPRXSS_HANDLER_DP_INFO_PKT_EVENT, XDPRXSS_HANDLER_DP_NO_VID_EVENT, XDPRXSS_HANDLER_DP_PWR_CHG_EVENT, XDPRXSS_HANDLER_DP_TDONE_EVENT, XDPRXSS_HANDLER_DP_TLOST_EVENT, XDPRXSS_HANDLER_DP_VBLANK_EVENT, XDPRXSS_HANDLER_DP_VID_EVENT, XDPRXSS_HANDLER_LINKBW_EVENT, XDPRXSS_HANDLER_PLL_RESET_EVENT, XDPRXSS_HANDLER_UNPLUG_EVENT, XDpRxSs_SetCallBack(), and XDpRxSs_SetUserTimerHandler().
Referenced by DpRxSs_IntrExample(), DpRxSs_Main(), and DpRxSs_MstExample().
void DpRxSs_TrainingDoneHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when the training done interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_TrainingLostHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when a training lost interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr, and XDpRxSs_AudioDisable.
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_UnplugHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when the unplug event occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::DpPtr, and XDpRxSs_AudioDisable.
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_VerticalBlankHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when a vertical blank interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
References XDpRxSs::VBlankCount.
Referenced by DpRxSs_SetupIntrSystem().
void DpRxSs_VideoHandler | ( | void * | InstancePtr | ) |
This function is the callback function for when a valid video interrupt occurs.
InstancePtr | is a pointer to the XDpRxSs instance. |
Referenced by DpRxSs_SetupIntrSystem().
u32 DpRxSs_VideoPhyInit | ( | u16 | DeviceId | ) |
This function configures Video Phy.
None. |
References PHY_Two_byte_set(), and PLLRefClkSel().
Referenced by DpRxSs_DebugExample(), DpRxSs_HdcpExample(), DpRxSs_IntrExample(), DpRxSs_Main(), and DpRxSs_MstExample().
u8 i2c_read_dp141 | ( | u32 | I2CBaseAddress, |
u8 | I2CSlaveAddress, | ||
u16 | RegisterAddress | ||
) |
This function reads DP141 VFMC- IIC.
None. |
void I2C_Scan | ( | u32 | BaseAddress | ) |
This function scans VFMC- IIC.
None. |
void LoadEDID | ( | void | ) |
This function load EDID content into EDID Memory.
User can change as per their requirement.
None. |
Referenced by DpRxSs_Setup().
int main | ( | ) |
This is the main function for XDpRxSs interrupt example.
If the DpRxSs_Main function which setup the system succeeds, this function will wait for the interrupts.
None. |
References DpRxSs_Main().
void PHY_Two_byte_set | ( | XVphy * | InstancePtr, |
u8 | Rx_to_two_byte | ||
) |
This function sets GT in 16-bits (2-Byte) or 32-bits (4-Byte) mode.
InstancePtr | is a pointer to the Video PHY instance. |
Referenced by DpRxSs_VideoPhyInit().
void PLLRefClkSel | ( | XVphy * | InstancePtr, |
u8 | link_rate | ||
) |
This function sets proper ref clk frequency and line rate.
InstancePtr | is a pointer to the Video PHY instance. |
Referenced by DpRxSs_LinkBandwidthHandler(), and DpRxSs_VideoPhyInit().
void Print_ExtPkt | ( | ) |
This function is the callback function for Ext Packet Handling.
InstancePtr | is a pointer to the XDpRxSs instance. |
Referenced by DpRxSs_Main().
void Print_InfoPkt | ( | ) |
This function is the callback function for Info Packet Handling.
InstancePtr | is a pointer to the XDpRxSs instance. |
Referenced by DpRxSs_Main().
void ReportVideoCRC | ( | void | ) |
This function reports CRC values of Video components.
None. |
Referenced by DpRxSs_Main().
int VideoFMC_Init | ( | void | ) |
This function initializes VFMC.
None. |
References I2C_IDT8N49_ADDR, I2C_LMK03318_ADDR, I2C_MUX_ADDR, I2C_VFMCEXP_0_ADDR, I2C_VFMCEXP_1_ADDR, IDT_8T49N24x_Init(), and TI_LMK03318_PowerDown().
Referenced by DpRxSs_PlatformInit().
char xil_getc | ( | u32 | timeout_ms | ) |
This function to get uart input from user.
timeout_ms |
References XUartPs_RecvByte_NonBlocking().
Referenced by DpRxSs_Main().
char XUartPs_RecvByte_NonBlocking | ( | ) |
This function is a non-blocking UART return byte.
None. |
Referenced by xil_getc().