| dp12rxss Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
xdprxss_intr_example.c File Reference

## Overview

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

Upon unplug event (DisplayPort cable is unplugged/plugged), DisplayPort RX Subsystem will program DP159 disconnect sequence or DP159 training pattern 1, 2, 3 sequences respectively.

Note
  This example requires an interrupt controller connected to the processor and the DisplayPort RX Subsystem HIP is in the system. For this example to display output, the user need to implement initialization of the system (DpRxSs_PlatformInit), Video Phy (DpRxSs_VideoPhyInit), start DisplayPort RX subsystem (XDpRxSs_Start) and DisplayPort RX Subsystem setup (DpRxSs_Setup). The input to the Subsystem is from RX (GT). The functions DpRxSs_PlatformInit, DpRxSs_VideoPhyInit and DpRxSs_Setup are declared and are left up to the user to implement.

    MODIFICATION HISTORY:

    Ver  Who Date     Changes

    1.00 sha 07/29/15 Initial release.
    2.00 sha 10/05/15 Changed DpTxSs_Setup –> DpRxSs_Setup.
                      Removed HDCP callbacks registration and callbacks.
                      Added HDCP and Timer Counter interrupt handler setup.
    4.00 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 | DpRxSs_IntrExample (u16 DeviceId)
| This function is the main entry point for the interrupt example using the XDpRxSs driver. More...
u32 | DpRxSs_PlatformInit (void)
| This function initialize required platform specific peripherals. More...
u32 | DpRxSs_VideoPhyInit (void)
| This function configures Video Phy. More...
u32 | DpRxSs_Setup (void)
| This function configures DisplayPort RX Subsystem. 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_VideoModeHandler (void *InstancePtr)
| This function is the callback function for when a video mode change interrupt occurs. 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 when an info packet interrupt occurs. More...
void | DpRxSs_ExtPacketHandler (void *InstancePtr)
| This function is the callback function for when arrival of external (audio) packet interrupt occurs. More...
void | DpRxSs_TrainingDoneHandler (void *InstancePtr)
| This function is the callback function for when the training done interrupt occurs. More...
void | DpRxSs_BandwidthChangeHandler (void *InstancePtr)
| This function is the callback function for when a bandwidth change interrupt occurs. More...
void | DpRxSs_DownReqestHandler (void *InstancePtr)
| This function is the callback function for when a down request interrupt occurs. More...
void | DpRxSs_DownReplyHandler (void *InstancePtr)
| This function is the callback function for when a down reply interrupt occurs. More...
void | DpRxSs_AudioOverflowHandler (void *InstancePtr)
| This function is the callback function for when an audio overflow interrupt occurs. More...
void | DpRxSs_PayloadAllocationHandler (void *InstancePtr)
| This function is the callback function for when a payload allocation interrupt occurs. More...
void | DpRxSs_ActRxHandler (void *InstancePtr)
| This function is the callback function for when an ACT sequence interrupt occurs. More...
void | DpRxSs_CrcTestHandler (void *InstancePtr)
| This function is the callback function for when a CRC test start 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...
int | main ()
| This is the main function for XDpRxSs interrupt example. More...

## Function Documentation

void DpRxSs_ActRxHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when an ACT sequence interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_AudioOverflowHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when an audio overflow interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_BandwidthChangeHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a bandwidth change interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_CrcTestHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a CRC test start interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_DownReplyHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a down reply interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_DownReqestHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a down request interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

References XDpRxSs_HandleDownReq().

void DpRxSs_ExtPacketHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when arrival of external (audio) packet interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_InfoPacketHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when an info packet interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

u32 DpRxSs_IntrExample | ( | u16 | DeviceId | ) |

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

This function will setup the system with interrupts handlers.

Parameters

  DeviceId | is the unique device ID of the DisplayPort RX 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 different types interrupts. Refer xdprxss.h file for more info.

References XDpRxSs_Config::BaseAddress, DpRxSs_PlatformInit(), DpRxSs_Setup(), DpRxSs_SetupIntrSystem(), DpRxSs_VideoPhyInit(), XDpRxSs_UsrOpt::MstSupport, XDpRxSs::UsrOpt, XDpRxSs_CfgInitialize(), XDpRxSs_LookupConfig(), XDpRxSs_SetLaneCount(), XDpRxSs_SetLinkRate(), and XDpRxSs_Start().

Referenced by main().

void DpRxSs_LinkBandwidthHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when the link bandwidth change occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_NoVideoHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a no video interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_PayloadAllocationHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a payload allocation interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

u32 DpRxSs_PlatformInit | ( | void |  | ) |

This function initialize required platform specific peripherals.

Parameters

  None. |

Returns
  - XST_SUCCESS if required peripherals are initialized and configured successfully.
  - XST_FAILURE, otherwise.

Note
  None.

void DpRxSs_PllResetHandler | ( | void * | InstancePtr | ) |

This function is the callback function for PLL reset request.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_PowerChangeHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when the power state interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

u32 DpRxSs_Setup | ( | void |  | ) |

This function configures DisplayPort RX Subsystem.

Parameters

  None. |

Returns
  - XST_SUCCESS if DP RX Subsystem configured successfully.
  - XST_FAILURE, otherwise.

Note
  None.

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.

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 DpRxSs_IntrExample(), and DpRxSs_MstExample().

void DpRxSs_TrainingDoneHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when the training done interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_TrainingLostHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a training lost interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_UnplugHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when the unplug event occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_VerticalBlankHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a vertical blank interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_VideoHandler | ( | void * | InstancePtr | ) |

This function is the callback function for when a valid video interrupt occurs.

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

void DpRxSs_VideoModeHandler | ( | void * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XDpRxSs instance.

Returns
  None.

Note
  None.

u32 DpRxSs_VideoPhyInit | ( | void |  | ) |

This function configures Video Phy.

Parameters

  None. |

Returns
  - XST_SUCCESS if Video Phy configured successfully.
  - XST_FAILURE, otherwise.

Note
  None.

int main | ( | void |  | ) |

This is the main function for XDpRxSs interrupt example.

If the DpRxSs_IntrExample function which setup the system succeeds, this function will wait for the interrupts.

Parameters

  None. |

Returns
  - XST_FAILURE if the interrupt example was unsuccessful.

Note
  Unless setup failed, main will never return since DpRxSs_IntrExample is blocking (it is waiting on interrupts).

References DpRxSs_IntrExample().