dp14txss
Xilinx Vitis Drivers API Documentation
xdptxss_kcu105_dp14.c File Reference

Overview

MODIFICATION HISTORY:

Ver Who Date Changes


1.0 KI 12/09/17 Initial release. 1.1 ND 2/14/19 mcdp related function call now need dprxss instance address instead of base address as first parameter

Functions

int DpPt_SetupIntrSystem ()
 This function is sets up Interrupt system and start it.
 
void hpd_con ()
 This function is called when a Hot-Plug-Detect (HPD) event is received by the DisplayPort TX Subsystem core.
 
void DpPt_HpdEventHandler (void *InstancePtr)
 This function takes care HPD event.
 
void hpd_pulse_con ()
 This function is called when a Hot-Plug-Detect (HPD) pulse is received by the DisplayPort TX Subsystem core.
 
void DpPt_HpdPulseHandler (void *InstancePtr)
 This function takes care HPD pulse interrupt.
 
void DpPt_LinkrateChgHandler (void *InstancePtr)
 This function sets link line rate.
 
void DpPt_CustomWaitUs (void *InstancePtr, u32 MicroSeconds)
 This function is called when DisplayPort TX Subsystem core requires delay or sleep.
 
void reconfig_clkwiz (u32 clk_reg0, u32 clk_reg1, u32 clk_reg2)
 sets the default drp values into the mmcm this ensures that mmcm is back to original state
 
void reset_clkwiz ()
 This function will reset Tx side MMCM.
 
void clk_wiz_locked ()
 This function will check MMCM lock status This MMCM output will be used for Tx side video CLK.
 
void start_tx (u8 line_rate, u8 lane_count, XVidC_VideoMode res_table, u8 bpc, u8 pat, u8 pat_update)
 This is for Tx only mode This function will start outputing internal video patern image Setup GT, DP, patern and generator.
 
int VideoFMC_Init (void)
 This function will detect video resolution/frequency change Many GPUs won't re-train when only video res/freq change.
 
void video_change_detect (u32 *count_track, u32 *rxMsamisc0_track, u32 *bpc_track, u32 *recv_clk_freq_track, float *recv_frame_clk_track, u32 *recv_frame_clk_int_track, int *track_count)
 This function will detect video resolution/frequency change Many GPUs won't re-train when only video res/freq change.
 
void detect_rx_video_and_startTx (int *track_count1)
 This function detects incoming video and find out video parameters Based on the parameters, set up Tx and VDMA, then start Tx output.
 
void switch_to_Tx_only (int *track_switch, u8 *pwr_dwn_x)
 This function will be used when no incoming video at pass-through mode If no video, switching to internal patern generator.
 
void sink_power_cycle (u32 power_down_time)
 This function will send power down and power up command over AUX.
 
void update_edid ()
 This function will update and overwrite EDID color depth 10BPC will be changed to 8BPC due to design limitation.
 
void resetIp ()
 This function toggles HW reset line for all IP's.
 
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.
 
void remap_start (struct dma_chan_parms *dma_struct)
 This function starts remap IP.
 
void DpRxSs_InfoPacketHandler (void *InstancePtr)
 This function is the callback function for Info Packet Handling.
 
void DpRxSs_ExtPacketHandler (void *InstancePtr)
 This function is the callback function for Generic Packet Handling of 32-Bytes payload.
 
void Print_InfoPkt ()
 This function is the callback function for Info Packet Handling.
 
void Print_ExtPkt ()
 This function is the callback function for Ext Packet Handling.
 
void DpRxSs_AccessLinkQualHandler (void *InstancePtr)
 This function is the callback function for Access link qual request.
 
void DpRxSs_AccessErrorCounterHandler (void *InstancePtr)
 This function is the callback function for Access prbs error count.
 
void DpRxSs_CRCTestEventHandler (void *InstancePtr)
 This function is the callback function for Test CRC Event request.
 
u8 get_LineRate (void)
 This function returns current line rate.
 

Variables

volatile u8 hpd_pulse_con_event
 
lane_link_rate_struct lane_link_table []
 

Function Documentation

void clk_wiz_locked ( void  )

This function will check MMCM lock status This MMCM output will be used for Tx side video CLK.

This function to check MMCM lock status.

Returns
None
void detect_rx_video_and_startTx ( int *  track_count1)

This function detects incoming video and find out video parameters Based on the parameters, set up Tx and VDMA, then start Tx output.

Returns
None

References XDpTxSs::DpPtr, XDpTxSs_Reset(), and XDpTxSs_Stop().

void DpPt_CustomWaitUs ( void *  InstancePtr,
u32  MicroSeconds 
)

This function is called when DisplayPort TX Subsystem core requires delay or sleep.

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

It provides timer with predefined amount of loop iterations.

Parameters
InstancePtris a pointer to the XDp instance.
Returns
None.
Note
Use the XDpTxSs_SetUserTimerHandler driver function to set this function as the handler custom delay/sleep.
void DpPt_HpdEventHandler ( void *  InstancePtr)

This function takes care HPD event.

Returns
None.
Note
None.

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

void DpPt_HpdPulseHandler ( void *  InstancePtr)

This function takes care HPD pulse interrupt.

Returns
None.
Note
None.

References XDpTxSs::DpPtr, and hpd_pulse_con_event.

void DpPt_LinkrateChgHandler ( void *  InstancePtr)

This function sets link line rate.

Parameters
@returnNone.
Note
None.

References PHY_Configuration_Tx().

int DpPt_SetupIntrSystem ( )

This function is sets up Interrupt system and start it.

Returns
None.

References XDpTxSs_DpIntrHandler().

void DpRxSs_AccessErrorCounterHandler ( void *  InstancePtr)

This function is the callback function for Access prbs error count.

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.
void DpRxSs_AccessLinkQualHandler ( void *  InstancePtr)

This function is the callback function for Access link qual request.

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.

References I2C_MCDP6000_ADDR.

void DpRxSs_CRCTestEventHandler ( void *  InstancePtr)

This function is the callback function for Test CRC Event request.

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.
void DpRxSs_ExtPacketHandler ( void *  InstancePtr)

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

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.
void DpRxSs_InfoPacketHandler ( void *  InstancePtr)

This function is the callback function for Info Packet Handling.

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.
u8 get_LineRate ( void  )

This function returns current line rate.

Parameters
None.
Returns
None.
Note
None.

References XDpTxSs::DpPtr.

void hpd_con ( )

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

Parameters
InstancePtris 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.

References XDpTxSs::DpPtr, update_edid(), XDpTxSs_SetLaneCount(), and XDpTxSs_SetLinkRate().

void hpd_pulse_con ( )

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

Parameters
InstancePtris a pointer to the XDpTxSs instance.
Returns
None.
Note
Use the XDpTxSs_SetCallback driver function to set this function as the handler for HPD pulse.

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

void Print_ExtPkt ( )

This function is the callback function for Ext Packet Handling.

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.
void Print_InfoPkt ( )

This function is the callback function for Info Packet Handling.

Parameters
InstancePtris a pointer to the XDpRxSs instance.
Returns
None.
Note
None.
void reconfig_clkwiz ( u32  clk_reg0,
u32  clk_reg1,
u32  clk_reg2 
)

sets the default drp values into the mmcm this ensures that mmcm is back to original state

Returns
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

Referenced by remap_start().

void remap_start ( struct dma_chan_parms *  dma_struct)

This function starts remap IP.

Returns
None

References remap_set().

void reset_clkwiz ( )

This function will reset Tx side MMCM.

Returns
None
void resetIp ( )

This function toggles HW reset line for all IP's.

Returns
None
void sink_power_cycle ( u32  power_down_time)

This function will send power down and power up command over AUX.

Returns
None

References XDpTxSs::DpPtr.

Referenced by DpPt_HpdEventHandler(), hpd_pulse_con(), start_tx(), and switch_to_Tx_only().

void start_tx ( u8  line_rate,
u8  lane_count,
XVidC_VideoMode  res_table,
u8  bpc,
u8  pat,
u8  pat_update 
)

This is for Tx only mode This function will start outputing internal video patern image Setup GT, DP, patern and generator.

Returns
None

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

Referenced by switch_to_Tx_only().

void switch_to_Tx_only ( int *  track_switch,
u8 *  pwr_dwn_x 
)

This function will be used when no incoming video at pass-through mode If no video, switching to internal patern generator.

Returns
None

References XDpTxSs::DpPtr, PHY_Configuration_Tx(), sink_power_cycle(), start_tx(), XDpTxSs_Reset(), and XDpTxSs_Stop().

void update_edid ( )

This function will update and overwrite EDID color depth 10BPC will be changed to 8BPC due to design limitation.

Returns
None

Referenced by hpd_con().

void video_change_detect ( u32 *  count_track,
u32 *  rxMsamisc0_track,
u32 *  bpc_track,
u32 *  recv_clk_freq_track,
float *  recv_frame_clk_track,
u32 *  recv_frame_clk_int_track,
int *  track_count 
)

This function will detect video resolution/frequency change Many GPUs won't re-train when only video res/freq change.

Application needs to know if it changed and need to detect new parameter. Based on the parameter, re-set and re-start VDAM and Tx

Returns
None

References XDpTxSs::DpPtr, and XDpTxSs_Stop().

int VideoFMC_Init ( void  )

This function will detect video resolution/frequency change Many GPUs won't re-train when only video res/freq change.

Application needs to know if it changed and need to detect new parameter. Based on the parameter, re-set and re-start VDAM and Tx

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

Variable Documentation

volatile u8 hpd_pulse_con_event
MODIFICATION HISTORY:
Ver  Who      Date      Changes
-— —      -----—  -----------------------------------------------—.
1.00 Nishant  19/12/19 Added support for vck190, VCU118
                         DpTxSs_VideoPhyInit() renamed to DpTxSs_PhyInit()
                         set_vphy() renamed to config_phy() and has two
                         parameters for linerate and lanecount.
                         The application files are common for ZCU102, VCU118
                         and VCK190 TX Only design
 

Referenced by DpPt_HpdPulseHandler().

lane_link_rate_struct lane_link_table[]
Initial value:
=
{
{XDP_RX_OVER_LANE_COUNT_SET_1, XDP_RX_OVER_LINK_BW_SET_162GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_2, XDP_RX_OVER_LINK_BW_SET_162GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_4, XDP_RX_OVER_LINK_BW_SET_162GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_1, XDP_RX_OVER_LINK_BW_SET_270GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_2, XDP_RX_OVER_LINK_BW_SET_270GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_4, XDP_RX_OVER_LINK_BW_SET_270GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_1, XDP_RX_OVER_LINK_BW_SET_540GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_2, XDP_RX_OVER_LINK_BW_SET_540GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_4, XDP_RX_OVER_LINK_BW_SET_540GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_1, XDP_RX_OVER_LINK_BW_SET_810GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_2, XDP_RX_OVER_LINK_BW_SET_810GBPS},
{XDP_RX_OVER_LANE_COUNT_SET_4, XDP_RX_OVER_LINK_BW_SET_810GBPS},
}
MODIFICATION HISTORY:
Ver  Who Date     Changes


1.00 KI 07/13/17 Initial release.