| dpdma Vitis Drivers API Documentation

- Overview
- APIs
- File List

Functions
xdpdma_video_example.h File Reference

## Overview

This file contains a design example using the DPDMA driver (XDpDma) This example demonstrates the use of DPDMA for displaying a Graphics Overlay.

Note

None.

     MODIFICATION HISTORY:

     Ver   Who Date     Changes

     1.0    aad 10/19/17    Initial Release

## Functions
int | DpdmaVideoExample (Run_Config *RunCfgPtr)
| The purpose of this function is to illustrate how to use the XDpDma device driver in Graphics overlay mode. More...
void | InitRunConfig (Run_Config *RunCfgPtr)
| The purpose of this function is to initialize the application configuration. More...
int | InitDpDmaSubsystem (Run_Config *RunCfgPtr)
| The purpose of this function is to initialize the DP Subsystem (XDpDma, XAVBuf, XDpPsu) More...
void | SetupInterrupts (Run_Config *RunCfgPtr)
| The purpose of this function is to setup call back functions for the DP controller interrupts. More...
u8 * | GraphicsOverlay (u8 *Frame, Run_Config *RunCfgPtr)
| The purpose of this function is to generate a Graphics frame of the format RGBA8888 which generates an overlay on 1/2 of the bottom of the screen. More...
void | DpPsu_SetupVideoStream (Run_Config *RunCfgPtr)
| This function is called to setup the VideoStream with its video and MSA attributes. More...
void | DpPsu_Run (Run_Config *RunCfgPtr)
| This function will configure and establish a link with the receiver device, afterwards, a video stream will start to be sent over the main link. More...
void | DpPsu_IsrHpdEvent (void *ref)
| This function is called when a Hot-Plug-Detect (HPD) event is received by the DisplayPort TX core. More...
void | DpPsu_IsrHpdPulse (void *ref)
| This function is called when a Hot-Plug-Detect (HPD) pulse is received by the DisplayPort TX core. More...

## Function Documentation

int DpdmaVideoExample | ( | Run_Config * | RunCfgPtr | ) |

The purpose of this function is to illustrate how to use the XDpDma device driver in Graphics overlay mode.

Parameters

  RunCfgPtr | is a pointer to the application configuration structure.

Returns
  XST_SUCCESS if successful, else XST_FAILURE.

Note
  None.

References GraphicsOverlay(), InitDpDmaSubsystem(), InitRunConfig(), and SetupInterrupts().

Referenced by main().

void DpPsu_IsrHpdEvent | ( | void * | ref | ) |

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

The XDPPSU_INTERRUPT_STATUS_HPD_EVENT_MASK bit of the core's XDPPSU_INTERRUPT_STATUS register indicates that an HPD event has occurred.

Parameters

  InstancePtr | is a pointer to the XDpPsu instance.

Returns
  None.

Note
  Use the XDpPsu_SetHpdEventHandler driver function to set this function as the handler for HPD pulses.

References DpPsu_Run().

Referenced by SetupInterrupts().

void DpPsu_IsrHpdPulse | ( | void * | ref | ) |

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

The XDPPSU_INTERRUPT_STATUS_HPD_PULSE_DETECTED_MASK bit of the core's XDPPSU_INTERRUPT_STATUS register indicates that an HPD event has occurred.

Parameters

  InstancePtr | is a pointer to the XDpPsu instance.

Returns
  None.

Note
  Use the XDpPsu_SetHpdPulseHandler driver function to set this function as the handler for HPD pulses.

References DpPsu_SetupVideoStream().

Referenced by SetupInterrupts().

void DpPsu_Run | ( | Run_Config * | RunCfgPtr | ) |

This function will configure and establish a link with the receiver device, afterwards, a video stream will start to be sent over the main link.

Parameters

  RunCfgPtr | is a pointer to the application configuration structure.

Returns
  - XST_SUCCESS if main link was successfully established.
  - XST_FAILURE otherwise.

Note
  None.

References DpPsu_SetupVideoStream(), InitDpDmaSubsystem(), XDpDma_DisplayGfxFrameBuffer(), and XDpDma_SetChannelState().

Referenced by DpPsu_IsrHpdEvent().

void DpPsu_SetupVideoStream | ( | Run_Config * | RunCfgPtr | ) |

This function is called to setup the VideoStream with its video and MSA attributes.

Parameters

  RunCfgPtr | is a pointer to the application configuration structure.

Returns
  None.

Note
  Use the XDpPsu_SetHpdEventHandler driver function to set this function as the handler for HPD pulses.

Referenced by DpPsu_IsrHpdPulse(), and DpPsu_Run().

u8* GraphicsOverlay | ( | u8 * | Frame,
|  | Run_Config * | RunCfgPtr
| ) |  |

The purpose of this function is to generate a Graphics frame of the format RGBA8888 which generates an overlay on 1/2 of the bottom of the screen.

This is just to illustrate the functionality of the graphics overlay.

Parameters

  RunCfgPtr | is a pointer to the application configuration structure.
  Frame | is a pointer to a buffer which is going to be populated with rendered frame

Returns
  Returns a pointer to the frame.

Note
  None.

Referenced by DpdmaVideoExample().

int InitDpDmaSubsystem | ( | Run_Config * | RunCfgPtr | ) |

The purpose of this function is to initialize the DP Subsystem (XDpDma, XAVBuf, XDpPsu)

Parameters

  RunCfgPtr | is a pointer to the application configuration structure.

Returns
  None.

Note
  None.

References XDpDma_CfgInitialize(), XDpDma_LookupConfig(), XDpDma_SetGraphicsFormat(), and XDpDma_SetQOS().

Referenced by DpdmaVideoExample(), and DpPsu_Run().

void InitRunConfig | ( | Run_Config * | RunCfgPtr | ) |

The purpose of this function is to initialize the application configuration.

Parameters

  RunCfgPtr | is a pointer to the application configuration structure.

Returns
  None.

Note
  None.

Referenced by DpdmaVideoExample().

void SetupInterrupts | ( | Run_Config * | RunCfgPtr | ) |

The purpose of this function is to setup call back functions for the DP controller interrupts.

Parameters

  RunCfgPtr | is a pointer to the application configuration structure.

Returns
  None.

Note
  None.

References DpPsu_IsrHpdEvent(), DpPsu_IsrHpdPulse(), XDpDma_InterruptEnable(), and XDpDma_InterruptHandler().

Referenced by DpdmaVideoExample().