dsitxss: xdsitxss_video_test_example.c File Reference

| dsitxss Xilinx SDK Drivers API Documentation

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

Functions
xdsitxss_video_test_example.c File Reference

## Overview

This file contains a design example using the XDsiTxSs driver.

It performs a video test on the MIPI DSI Tx Subsystem. It tests DSI TX functionality with following sequence. Presently the application is supporting only RGB888 format. 3 bytes per pixel BRAM – (MM2S)–VDMA (MM2S)–DSI TX– CSI RX – (S2MM)VDMA(S2MM)–BRAM This function will read input from BRAM0, provide BRAM input to VDMA MM2S, VDMA feeds MM2S input to DSI TX controller, the output of DSI will be connected to CSI RX controller. The output of CSI given to S2MM of VDMA. VDMA writes S2MM data on BRAM1. Finally compare BRAM0 and BRAM1 data User has to provide all necessary inputs as per desired resolution

Note
  None.

    MODIFICATION HISTORY:

    Ver Who Date    Changes

    1.0 ram 11/2/16 Initial Release for MIPI DSI TX subsystem
    1.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 | DsiTxSs_VideoTestExample (u32 DeviceId)
| This function is the main entry point for the video test example using the XDsiTxSs driver. More...
s32 | WaitForCompletion (s32 VdmaChannel, u32 *VdmaBaseAddr)
| This function wait until the DMA channel halts. More...
void | ResetVDMA ()
| This function ResetVDMA. More...
void | ConfigureChannel (u32 VdmaChannel)
| This function to setup Horizontal size and stride. More...
void | SetupVdmaCR (s32 VdmaChannel, s32 FrameCount)
| This function to setup the VDMA Control Register. More...
void | StartChannel (s32 VdmaChannel, s32 VerticalSize)
| This function to start mm2s or s2mm VdmaChannel - write the vertical size. More...
s32 | main ()
| This is the main function for XDsiTxSs self test example. More...

## Function Documentation

void ConfigureChannel | ( | u32 | VdmaChannel | ) |

This function to setup Horizontal size and stride.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM

Returns
  None

Note
  None.

Referenced by DsiTxSs_VideoTestExample().

u32 DsiTxSs_VideoTestExample | ( | u32 | DeviceId | ) |

This function is the main entry point for the video test example using the XDsiTxSs driver.

Parameters

  DeviceId | is the unique device ID of the MIPI DSI RX Subsystem core.

Returns
  - XST_FAILURE if any of MIPI DSI RX Subsystem sub-core self test failed.
  - XST_SUCCESS, if all of MIPI DSI RX Subsystem sub-core self test passed.

Note
  None.

References XDsiTxSs_Config::BaseAddr, ConfigureChannel(), ResetVDMA(), SetupVdmaCR(), StartChannel(), WaitForCompletion(), XDsiTxSs_Activate(), XDsiTxSs_CfgInitialize(), XDsiTxSs_LookupConfig(), XDsiTxSs_Reset(), XDsiTxSs_SelfTest(), and XDsiTxSs_SetCustomVideoInterfaceTiming().

Referenced by main().

s32 main | ( |  | ) |

This is the main function for XDsiTxSs self test example.

Parameters

  None. |

Returns
  - XST_SUCCESS if the self test example passed.
  - XST_FAILURE if the self test example was unsuccessful.

Note
  None.

References DsiTxSs_VideoTestExample().

void ResetVDMA | ( |  | ) |

This function ResetVDMA.

Parameters

  None |

Returns
  None

Note
  None.

Referenced by DsiTxSs_VideoTestExample().

void SetupVdmaCR | ( | s32 | VdmaChannel,
|  | s32 | FrameCount
| ) |  |

This function to setup the VDMA Control Register.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM
  FrameCount | specifies number of frames to transfer

Returns
  None

Note
  None.

Referenced by DsiTxSs_VideoTestExample().

void StartChannel | ( | s32 | VdmaChannel,
|  | s32 | VerticalSize
| ) |  |

This function to start mm2s or s2mm VdmaChannel - write the vertical size.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM
  VerticalSize | specifes No of lines

Returns
  None

Note
  None.

Referenced by DsiTxSs_VideoTestExample().

s32 WaitForCompletion | ( | s32 | VdmaChannel,
|  | u32 * | VdmaBaseAddr
| ) |  |

This function wait until the DMA channel halts.

Parameters

  VdmaChannel | specifes VdmaChannel is MM2S or S2MM .
  VdmaBaseAddr | VDMA base address

Returns
  MM2S_HALT_SUCCESS, S2MM_HALT_SUCCESS in success MM2S_HALT_FAILURE, S2MM_HALT_FAILURE on failure

Note
  None.

Referenced by DsiTxSs_VideoTestExample().