| dp21txss Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Functions
tx.h File Reference

## Overview

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

## Functions
void | DpPt_HpdEventHandler (void *InstancePtr)
| This function takes care HPD event. More...
void | DpPt_HpdPulseHandler (void *InstancePtr)
| This function takes care HPD pulse interrupt. More...
void | DpPt_LinkrateChgHandler (void *InstancePtr)
| This function sets link line rate. More...
void | DpTxSs_ExtPacketHandler (void *InstancePtr)
| This function is the callback function for Generic Packet Handling of 32-Bytes payload. More...
void | DpPt_CustomWaitUs (void *InstancePtr, u32 MicroSeconds)
| This function use h/w timer to count specific Microseconds. More...
void | hpd_con (XDpTxSs *InstancePtr, u8 Edid_org[128], u8 Edid1_org[128], u16 res_update)
| This function is called when a Hot-Plug-Detect (HPD) event is received by the DisplayPort TX Subsystem core. More...
void | hpd_pulse_con (XDpTxSs *InstancePtr, XDpTxSs_MainStreamAttributes Msa[4])
| This function is the main hpd pulse process. More...
char | xil_getc (u32 timeout_ms)
| This function to get uart input from user. More...
void | Vpg_Audio_start (void)
| This function starts audio pattern generator. More...
void | Vpg_Audio_stop (void)
| This function stops audio pattern generator. More...
u32 | start_tx (u8 line_rate, u8 lane_count, user_config_struct user_config, XDpTxSs_MainStreamAttributes Msa[4])
| This function starts tx process. More...
u32 | config_phy (int LineRate_init_tx)
| This function sets VPHY based on the linerate. More...
void | Vpg_VidgenSetUserPattern (XDp *InstancePtr, u8 Pattern)
| This function sets user pattern. More...
void | sink_power_down (void)
| This function powers down sink. More...
void | sink_power_up (void)
| This function powers down sink. More...
u8 | get_LineRate (void)
| This function returns current line rate. More...
u8 | get_Lanecounts (void)
| This function returns current lane counts. More...
void | sink_power_cycle (void)
| This function power cycle the sink. More...
int | IDT_8T49N24x_SetClock (u32 I2CBaseAddress, u8 I2CSlaveAddress, int FIn, int FOut, u8 FreeRun)
| This function calculates and sets the IDT 8TN49N24x device with the given clock configuration. More...
int | IDT_8T49N24x_Init (u32 I2CBaseAddress, u8 I2CSlaveAddress)
| This function initializes the IDT 8TN49N24x with default values for use with the Video FMC. More...
int | TI_LMK03318_PowerDown (u32 I2CBaseAddress, u8 I2CSlaveAddress)
| This function puts the TI LMK03318 into sleep. More...
void | DpTxSs_Setup (u8 *LineRate_init, u8 *LaneCount_init, u8 Edid_org[128], u8 Edid1_org[128])
| This function sets up DPTxSubsystem. More...
u32 | DpTxSs_SetupIntrSystem (void)
| This function sets up the interrupt system so interrupts can occur for the DisplayPort TX Subsystem core. More...

## Function Documentation

u32 config_phy | ( | int | LineRate_init_tx | ) |

This function sets VPHY based on the linerate.

Parameters

  user_config_struct. |

Returns
  Status.

Note
  None.

Parameters

  LineRate_init_tx | - Linerate LaneCount_init_tx - Lanecount

Returns
  Status.

Note
  None.

Referenced by DpPt_LinkrateChgHandler().

void DpPt_CustomWaitUs | ( | void * | InstancePtr,
|  | u32 | MicroSeconds
| ) |  |

This function use h/w timer to count specific Microseconds.

Parameters

  pointer | to timer
  MicroSeconds | to wait

Returns
  None.

Note
  None.

References TmrCtr.

Referenced by DpTxSs_SetupIntrSystem().

void DpPt_HpdEventHandler | ( | void * | InstancePtr | ) |

This function takes care HPD event.

Returns
  None.

Note
  None.

References XDpTxSs::DpPtr, sink_power_up(), and XDpTxSs_IsConnected().

Referenced by DpTxSs_SetupIntrSystem().

void DpPt_HpdPulseHandler | ( | void * | InstancePtr | ) |

This function takes care HPD pulse interrupt.

Returns
  None.

Note
  None.

References XDpTxSs::DpPtr.

Referenced by DpTxSs_SetupIntrSystem().

void DpPt_LinkrateChgHandler | ( | void * | InstancePtr | ) |

This function sets link line rate.

Parameters

  @return | None.

Note
  None.

References config_phy(), and get_LineRate().

Referenced by DpTxSs_SetupIntrSystem().

void DpTxSs_ExtPacketHandler | ( | void * | InstancePtr | ) |

This function is the callback function for Generic Packet Handling of 32-Bytes payload.

Parameters

  InstancePtr | is a pointer to the XDpTxSs instance.

Returns
  None.

Note
  None.

Referenced by DpTxSs_SetupIntrSystem().

void DpTxSs_Setup | ( | u8 * | LineRate_init,
|  | u8 * | LaneCount_init,
|  | u8 | Edid_org[128],
|  | u8 | Edid1_org[128]
| ) |  |

This function sets up DPTxSubsystem.

Parameters

  LineRate |
  LaneCount |
  edid | 1st block
  edid | 2nd block

Returns
  None.

Note
  None.

References XDpTxSs::DpPtr, sink_power_cycle(), and XDpTxSs_IsConnected().

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.

References DpPt_CustomWaitUs(), DpPt_HpdEventHandler(), DpPt_HpdPulseHandler(), DpPt_LinkrateChgHandler(), DpTxSs_ExtPacketHandler(), TmrCtr, XDPTXSS_HANDLER_DP_EXT_PKT_EVENT, XDPTXSS_HANDLER_DP_FFE_PRESET_ADJUST, XDPTXSS_HANDLER_DP_HPD_EVENT, XDPTXSS_HANDLER_DP_HPD_PULSE, XDPTXSS_HANDLER_DP_LINK_RATE_CHG, XDPTXSS_HANDLER_DP_PE_VS_ADJUST, XDPTXSS_HANDLER_DP_VSYNC, XDpTxSs_SetCallBack(), and XDpTxSs_SetUserTimerHandler().

u8 get_Lanecounts | ( | void |  | ) |

This function returns current lane counts.

Parameters

  None. |

Returns
  None.

Note
  None.

References XDpTxSs::DpPtr.

u8 get_LineRate | ( | void |  | ) |

This function returns current line rate.

Parameters

  None. |

Returns
  None.

Note
  None.

References XDpTxSs_GetLinkRate().

Referenced by DpPt_LinkrateChgHandler().

void hpd_con | ( | XDpTxSs * | InstancePtr,
|  | u8 | Edid_org[128],
|  | u8 | Edid1_org[128],
|  | u16 | res_update
| ) |  |

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

Parameters

  InstancePtr | is 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.

void hpd_pulse_con | ( | XDpTxSs * | InstancePtr,
|  | XDpTxSs_MainStreamAttributes | Msa[4]
| ) |  |

This function is the main hpd pulse process.

Returns
  None.

Note
  None.

References XDpTxSs::DpPtr, XDpTxSs::UsrHpdEventData, XDpTxSs::UsrHpdPulseData, XDpTxSs_SetLaneCount(), and XDpTxSs_SetLinkRate().

void sink_power_cycle | ( | void |  | ) |

This function power cycle the sink.

Parameters

  user_config_struct. |

Returns
  Status.

Note
  None.

References sink_power_up().

Referenced by DpTxSs_Setup(), and start_tx().

void sink_power_down | ( | void |  | ) |

This function powers down sink.

Parameters

  None. |

Returns
  None.

Note
  None.

References XDpTxSs::DpPtr.

void sink_power_up | ( | void |  | ) |

This function powers down sink.

Parameters

  None. |

Returns
  None.

Note
  None.

References XDpTxSs::DpPtr.

Referenced by DpPt_HpdEventHandler(), and sink_power_cycle().

u32 start_tx | ( | u8 | line_rate,
|  | u8 | lane_count,
|  | user_config_struct | user_config,
|  | XDpTxSs_MainStreamAttributes | Msa_test[4]
| ) |  |

This function starts tx process.

Parameters

  line | rate
  lane | counts
  pointer | to resolution table
  bit | per components
  video | pattern to output

Returns
  - XST_SUCCESS if interrupt setup was successful.
  - A specific error code defined in "xstatus.h" if an error occurs.

Note
  None.

References XDpTxSs::DpPtr, sink_power_cycle(), XDpTxSs::UsrOpt, XDpTxSs_UsrOpt::VtcAdjustBs, XDpTxSs::VtcPtr, XDpTxSs_CheckLinkStatus(), XDpTxSs_SetBpc(), XDpTxSs_SetLaneCount(), XDpTxSs_SetLinkRate(), XDpTxSs_SetVidMode(), and XDpTxSs_VtcSetup().

void Vpg_Audio_start | ( | void |  | ) |

This function starts audio pattern generator.

Returns
  None.

Note
  None.

void Vpg_Audio_stop | ( | void |  | ) |

This function stops audio pattern generator.

Returns
  None.

Note
  None.

void Vpg_VidgenSetUserPattern | ( | XDp * | InstancePtr,
|  | u8 | Pattern
| ) |  |

This function sets user pattern.

Parameters

  InstancePtr | is a pointer to the XDp instance.
  Pattern | number to set with

Returns
  None.

Note
  None.

char xil_getc | ( | u32 | timeout_ms | ) |

This function to get uart input from user.

Parameters

  timeout_ms |

Returns
  - received charactor

Note
  None.

References TmrCtr.