dp14rxss
Xilinx SDK Drivers API Documentation
xdprxss_zcu102_pt_dp14.c File Reference

Overview

This file contains a design example using the XDpSs driver in single stream (SST) transport mode to demonstrate Pass-through design.

MODIFICATION HISTORY:
Ver  Who Date     Changes


1.00 KI 04/01/18 Initial release.

Functions

int I2cMux_Ps (u8 mux)
 This function is the main entry point for the design example using the XDpRxSs driver. More...
 
u32 DpSs_VideoPhyInit (u16 DeviceId)
 This function configures Video Phy. More...
 
u32 CalcStride (XVidC_ColorFormat Cfmt, u16 AXIMMDataWidth, XVidC_VideoStream *StreamPtr)
 This function calculates the stride. More...
 
int VideoFMC_Init (void)
 This function initializes VFMC. More...
 
int main ()
 This is the main function for XDpRxSs interrupt example. More...
 
void PHY_Two_byte_set (XVphy *InstancePtr, u8 Rx_to_two_byte, u8 Tx_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...
 
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...
 
void CalculateCRC (void)
 This function Calculates CRC values of Video components. 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...
 
u32 DpSs_PlatformInit (void)
 This function initialize required platform specific peripherals. More...
 
u32 DpSs_SetupIntrSystem (void)
 This function sets up the interrupt system so interrupts can occur for the DisplayPort TX Subsystem core. More...
 
int TI_LMK03318_PowerDown (u32 I2CBaseAddress, u8 I2CSlaveAddress)
 This function puts the TI LMK03318 into sleep. More...
 
int TI_LMK03318_SetRegister (u32 I2CBaseAddress, u8 I2CSlaveAddress, u8 RegisterAddress, u8 Value)
 This function send a single byte to the TI LMK03318. More...
 
int ConfigFrmbuf_wr (u32 StrideInBytes, XVidC_ColorFormat Cfmt, XVidC_VideoStream *StreamPtr)
 This function configures Frame BufferWr for defined mode. More...
 
int ConfigFrmbuf_rd (u32 StrideInBytes, XVidC_ColorFormat Cfmt, XVidC_VideoStream *StreamPtr)
 This function configures Frame Buffer for defined mode. More...
 
void remap_set (XV_axi4s_remap *remap, u8 in_ppc, u8 out_ppc, u16 width, u16 height, u8 color_format)
 This function sets parameters for remap IP. More...
 

Variables

u32 offset_rd = 0
 This function configures Frame Buffer for defined mode. More...
 
u32 appx_fs_dup = 0
 This function is the callback function for when a training lost interrupt occurs. More...
 

Function Documentation

u32 CalcStride ( XVidC_ColorFormat  Cfmt,
u16  AXIMMDataWidth,
XVidC_VideoStream *  StreamPtr 
)

This function calculates the stride.

Returns
stride in bytes
void CalculateCRC ( void  )

This function Calculates CRC values of Video components.

Parameters
None.
Returns
None.
Note
None.

References CustomWaitUs(), XDpRxSs::DpPtr, XDpRxSs_UsrOpt::LaneCount, and XDpRxSs::UsrOpt.

int ConfigFrmbuf_rd ( u32  StrideInBytes,
XVidC_ColorFormat  Cfmt,
XVidC_VideoStream *  StreamPtr 
)

This function configures Frame Buffer for defined mode.

Returns
XST_SUCCESS if init is OK else XST_FAILURE
int ConfigFrmbuf_wr ( u32  StrideInBytes,
XVidC_ColorFormat  Cfmt,
XVidC_VideoStream *  StreamPtr 
)

This function configures Frame BufferWr for defined mode.

Returns
XST_SUCCESS if init is OK else XST_FAILURE
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.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
None.

Referenced by CalculateCRC(), and DpRxSs_SetupIntrSystem().

u32 DpSs_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.

References I2C_IDT8N49_ADDR, and VideoFMC_Init().

u32 DpSs_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.

References DpRxSs_SetupIntrSystem(), and XDpRxSs_DpIntrHandler().

u32 DpSs_VideoPhyInit ( u16  DeviceId)

This function configures Video Phy.

Parameters
None.
Returns
  • XST_SUCCESS if Video Phy configured successfully.
  • XST_FAILURE, otherwise.
Note
None.

References PHY_Two_byte_set(), and PLLRefClkSel().

u8 i2c_read_dp141 ( u32  I2CBaseAddress,
u8  I2CSlaveAddress,
u16  RegisterAddress 
)

This function reads DP141 VFMC- IIC.

Parameters
None.
Returns
None.
Note
None.
void I2C_Scan ( u32  BaseAddress)

This function scans VFMC- IIC.

Parameters
None.
Returns
None.
Note
None.
int I2cMux_Ps ( u8  mux)

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

This function will setup the system with interrupts handlers.

Parameters
DeviceIdis 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 I2C_MUX_ADDR.

int main ( void  )

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.

Parameters
None.
Returns
  • XST_FAILURE if the interrupt example was unsuccessful.
Note
Unless setup failed, main will never return since DpRxSs_Main is blocking (it is waiting on interrupts).
void PHY_Two_byte_set ( XVphy *  InstancePtr,
u8  Rx_to_two_byte,
u8  Tx_to_two_byte 
)

This function sets GT in 16-bits (2-Byte) or 32-bits (4-Byte) mode.

Parameters
InstancePtris a pointer to the Video PHY instance.
Returns
None.
Note
None.

Referenced by DpSs_VideoPhyInit(), and DpTxSs_VideoPhyInit().

void PLLRefClkSel ( XVphy *  InstancePtr,
u8  link_rate 
)

This function sets proper ref clk frequency and line rate.

Parameters
InstancePtris a pointer to the Video PHY instance.
Returns
None.
Note
None.
void remap_set ( XV_axi4s_remap *  remap,
u8  in_ppc,
u8  out_ppc,
u16  width,
u16  height,
u8  color_format 
)

This function sets parameters for remap IP.

Returns
None
int TI_LMK03318_SetRegister ( u32  I2CBaseAddress,
u8  I2CSlaveAddress,
u8  RegisterAddress,
u8  Value 
)

This function send a single byte to the TI LMK03318.

Parameters
I2CBaseAddressis the baseaddress of the I2C core.
I2CSlaveAddressis the 7-bit I2C slave address.
Returns
  • XST_SUCCESS Initialization was successful.
  • XST_FAILURE I2C write error.
Note
None.

Referenced by TI_LMK03318_Init(), and TI_LMK03318_PowerDown().

int VideoFMC_Init ( void  )

This function initializes VFMC.

Parameters
None.
Returns
None.
Note
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().

char XUartPs_RecvByte_NonBlocking ( void  )

This function is a non-blocking UART return byte.

Parameters
None.
Returns
None.
Note
None.

Referenced by xil_getc().

Variable Documentation

u32 appx_fs_dup = 0

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

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.
u32 offset_rd = 0

This function configures Frame Buffer for defined mode.

Returns
XST_SUCCESS if init is OK else XST_FAILURE