dp12txss
Vitis Drivers API Documentation
xdptxss_intr_example.c File Reference

Overview

This file contains a design example using the XDpTxSs driver in single stream (SST) transport or multi-stream transport (MST) mode with interrupts.

Upon Hot-Plug-Detect (HPD - DisplayPort cable is plugged/unplugged or the monitor is turned on/off), DisplayPort TX Subsystem will read the capability of RX device and re-start the subsystem.

Note
This example requires an interrupt controller connected to the processor and the DisplayPort TX Subsystem HIP in the system. For this example to display output, the user need to implement initialization of the system (DpTxSs_PlatformInit) and after DisplayPort TX subsystem start (XDpTxSs_Start) is complete, implement configuration of the video stream source in order to provide the DisplayPort TX Subsystem HIP input. The functions DpTxSs_PlatformInit and DpTxSs_StreamSrc are declared and are left up to the user implement.
MODIFICATION HISTORY:
Ver  Who Date     Changes


1.00 sha 07/01/15 Initial release. 2.00 sha 09/28/15 Added HDCP, Timer Counter interrupt handier registration. Added set MSA callback. 4.1 ms 01/23/17 Modified xil_printf statement in main function to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028.

 

Functions

u32 DpTxSs_IntrExample (u16 DeviceId)
 This function is the main entry point for the interrupt example using the XDpTxSs driver. More...
 
u32 DpTxSs_PlatformInit (void)
 This function initialize required platform-specifc peripherals. More...
 
u32 DpTxSs_StreamSrc (u8 VerticalSplit)
 This function setup stream source to input DisplayPort TX Subsystem. More...
 
u32 DpTxSs_SetupIntrSystem (void)
 This function sets up the interrupt system so interrupts can occur for the DisplayPort TX Subsystem core. More...
 
void DpTxSs_HpdEventHandler (void *InstancePtr)
 This function is called when a Hot-Plug-Detect (HPD) event is received by the DisplayPort TX Subsystem core. More...
 
void DpTxSs_HpdPulseHandler (void *InstancePtr)
 This function is called when a Hot-Plug-Detect (HPD) pulse is received by the DisplayPort TX Subsystem core. More...
 
void DpTxSs_LaneCountChangeHandler (void *InstancePtr)
 This function is called when the lane count change interrupt occurs. More...
 
void DpTxSs_LinkRateChangeHandler (void *InstancePtr)
 This function is called when the link rate change interrupt occurs. More...
 
void DpTxSs_PeVsAdjustHandler (void *InstancePtr)
 This function is called when the pre-emphasis and voltage swing adjustment interrupt occurs. More...
 
void DpTxSs_MsaHandler (void *InstancePtr)
 This callback is called when RX MSA values to be copied into TX MSA. More...
 
int main ()
 This is the main function for XDpTxSs interrupt example. More...
 

Function Documentation

void DpTxSs_HpdEventHandler ( void *  InstancePtr)

This function is called when a Hot-Plug-Detect (HPD) event is received by the DisplayPort TX Subsystem core.

Parameters
InstancePtris a pointer to the XDpTxSs instance.
Returns
None.
Note
Use the XDpTxSs_SetCallback driver function to set this function as the handler for HPD event.

References XDpTxSs::Config, XDpTxSs::DpPtr, XDpTxSs_Config::MstSupport, XDPTXSS_INTERRUPT_MASK, XDPTXSS_INTERRUPT_MASK_HPD_EVENT_MASK, XDPTXSS_INTERRUPT_MASK_HPD_PULSE_DETECTED_MASK, XDpTxSs_IsConnected(), XDpTxSs_IsMstCapable(), XDpTxSs_ReadReg, and XDpTxSs_WriteReg.

void DpTxSs_HpdPulseHandler ( void *  InstancePtr)

This function is called when a Hot-Plug-Detect (HPD) pulse is received by the DisplayPort TX Subsystem core.

Parameters
InstancePtris a pointer to the XDpTxSs instance.
Returns
None.
Note
Use the XDpTxSs_SetCallback driver function to set this function as the handler for HPD pulse.

References XDpTxSs_UsrOpt::MstSupport, and XDpTxSs::UsrOpt.

u32 DpTxSs_IntrExample ( u16  DeviceId)

This function is the main entry point for the interrupt example using the XDpTxSs driver.

This function will set up the system with interrupts and set up Hot-Plug-Event (HPD) handlers.

Parameters
DeviceIdis the unique device ID of the DisplayPort TX Subsystem core.
Returns
  • XST_FAILURE if the system setup failed.
  • XST_SUCCESS should never return since this function, if setup was successful, is blocking.
Note
If system setup was successful, this function is blocking in order to illustrate interrupt handling taking place for HPD events.

References XDpTxSs_Config::BaseAddress, DpTxSs_PlatformInit(), DpTxSs_SetupIntrSystem(), XDpTxSs_UsrOpt::MstSupport, XDpTxSs::UsrOpt, XDpTxSs_CfgInitialize(), and XDpTxSs_LookupConfig().

Referenced by main().

void DpTxSs_LaneCountChangeHandler ( void *  InstancePtr)

This function is called when the lane count change interrupt occurs.

Parameters
InstancePtris a pointer to the XDpTxSs instance.
Returns
None.
Note
Use the XDpTxSs_SetCallback driver function to set this function as the handler for lane count change.
void DpTxSs_LinkRateChangeHandler ( void *  InstancePtr)

This function is called when the link rate change interrupt occurs.

Parameters
InstancePtris a pointer to the XDpTxSs instance.
Returns
None.
Note
Use the XDpTxSs_SetCallback driver function to set this function as the handler for link rate change.
void DpTxSs_MsaHandler ( void *  InstancePtr)

This callback is called when RX MSA values to be copied into TX MSA.

Parameters
InstancePtris a pointer to the XDpTxSs instance.
Returns
None.
Note
Use the XDpTxSs_SetCallback driver function to set this function as the handler MSA copy.
void DpTxSs_PeVsAdjustHandler ( void *  InstancePtr)

This function is called when the pre-emphasis and voltage swing adjustment interrupt occurs.

Parameters
InstancePtris a pointer to the XDpTxSs instance.
Returns
None.
Note
Use the XDpTxSs_SetCallback driver function to set this function as the handler for pre-emphasis and voltage swing adjust.
u32 DpTxSs_PlatformInit ( void  )

This function initialize required platform-specifc peripherals.

Parameters
None.
Returns
  • XST_SUCCESS if required peripherals are initialized and configured successfully.
  • XST_FAILURE, otherwise.
Note
None.
u32 DpTxSs_SetupIntrSystem ( void  )

This function sets up the interrupt system so interrupts can occur for the DisplayPort TX Subsystem core.

The function is application-specific since the actual system may or may not have an interrupt controller. The DPTX Subsystem core could be directly connected to a processor without an interrupt controller. The user should modify this function to fit the application.

Parameters
None
Returns
  • XST_SUCCESS if interrupt setup was successful.
  • A specific error code defined in "xstatus.h" if an error occurs.
Note
None.

Referenced by DpTxSs_IntrExample().

u32 DpTxSs_StreamSrc ( u8  VerticalSplit)

This function setup stream source to input DisplayPort TX Subsystem.

Parameters
VerticalSplitspecifies whether to split video frame vertically into two different vertical halves.
  • 1 = Vertically split input frame
  • 0 = No vertically split input frame.
Returns
  • XST_SUCCESS if stream source is configured successfully.
  • XST_FAILURE, otherwise.
Note
None.
int main ( void  )

This is the main function for XDpTxSs interrupt example.

If the DpTxSs_IntrExample function which sets up the system succeeds, this function will wait for the interrupts. Once a connection event or pulse is detected, DpTxSs will RX device capabilities and re-start the subsystem.

Parameters
None.
Returns
  • XST_FAILURE if the interrupt example was unsuccessful.
Note
Unless setup failed, main will never return since DpTxSs_IntrExample is blocking (it is waiting on interrupts for Hot-Plug-Detect (HPD) events.

References DpTxSs_IntrExample().