![]() |
v_hdmitxss1
Vitis Drivers API Documentation
|
This file demonstrates how to use Xilinx HDMI TX Subsystem, HDMI RX Subsystem and Video PHY Controller drivers.
MODIFICATION HISTORY:
Ver Who Date Changes
dd/mm/yy
1.00 YB 11/05/19 Initial release.
1.01 KU 07/07/20 Support for FrameBuffer
Can use FRL on RX and TMDS on TX
Video will be clipped if RX resolution in more than
4K
Support Revision 2 (Pass 4) of OnSemi retimer
Menu option updated for EDID and Training based on
MaxRate configuration
Added support for 16 BPC
1.02 KU 30/11/20 AVI InfoFrame Version set to 3 for resolutions
VIC > 127
Onsemi redriver tweaked for TMDS mode in TX
1.03 ssh 03/17/21 Added EdidHdmi20_t, PsIic0 and PsIic1 declarations
1.04 ssh 04/20/21 Added support for Dynamic HDR and Versal
1.05 ssh 07/14/21 Added support for Native Video
1.06 KU 30/08/21 RX FRL settings updated for VCU118
1.07 ssh 01/28/22 Updated GT Swing settings for VCK190
1.08 ssh 02/01/22 Updated Enable CTS Conversion Function
1.09 ssh 02/04/22 Added param to support Tx to train at the same rate as Rx
1.10 ssh 03/02/22 Added LCPLL and RPLL config for VCK190 Exdes
1.11 ssh 01/25/23 Added support for VEK280
1.12 ssh 09/14/23 Added Tx compliance values for UltrascalePlus
1.13 ssh 04/07/25 Added support for VEK385
Functions | |
| int | I2cClk (u32 InFreq, u32 OutFreq) |
| This function setup SI5324 clock generator either in free or locked mode. More... | |
| void | Info (void) |
| This function outputs the video timing , Audio, Link Status, HDMI RX state of HDMI RX core. More... | |
| void | DetailedInfo (void) |
| This function prints additional details of the system for debug purpose. More... | |
| void | Hdmiphy1ErrorCallback (void *CallbackRef) |
| This function is called whenever an error condition in VPHY occurs. More... | |
| void | Hdmiphy1ProcessError (void) |
| This function is called in the application to process the pending VPHY errors. More... | |
| u32 | Exdes_SysTmrInitialize (XHdmi_Exdes *InstancePtr, u32 TmrId, u32 TmrIntrId) |
| This function is used to initialize the system timer that is used to count and generate given periodic interrupts. More... | |
| u32 | Exdes_UsToTicks (u32 TimeInUs, u32 TmrCtrClkFreq) |
| This function time specified in Us to ticks for a specified timer frequency. More... | |
| void | Exdes_StartSysTmr (XHdmi_Exdes *InstancePtr, u32 IntervalInMs) |
| This function is used to start a the timer to generate periodic pulses of tmrctr interrupt. More... | |
| void | Exdes_SysTmrCallback (void *CallbackRef, u8 TmrCtrNumber) |
| This function is set as the callback handler from the timer counter interrupt handler. More... | |
| void | Exdes_SysTimerIntrHandler (void *CallbackRef) |
| This function is set as the callback handler from the interrupt controller for the system timer interrupts. More... | |
| void | Exdes_SetDebugPrintf (Exdes_Debug_Printf PrintFunc) |
| This function is used to enable and additional debugging prints in the applicaiton. More... | |
| void | Exdes_SetAuxFifoDebugPrintf (Exdes_Debug_Printf PrintFunc) |
| This function is used to enable and additional debugging prints for the Aux Fifo operations in the applicaiton. More... | |
| void | Exdes_SetHdcpDebugPrintf (Exdes_Debug_Printf PrintFunc) |
| This function is used to enable and additional debugging prints for the HDCP operations in the applicaiton. More... | |
| void | Exdes_InitController (XHdmi_Exdes *InstancePtr) |
| This function is used to initialize the example desing controller data strucuture that is used to track the presence and instances of the hdmi 2.1 receiver and transmitter. More... | |
| void | Exdes_UpdateAuxFifo () |
| This function updates the global array for AUX fifo with the AUX data from the hdmi receiver. More... | |
| void | Exdes_ReadVRRTimingChange () |
| This function updates the Reads the VRR Video Timing Values from HDMI RX Receiver. More... | |
| void | Exdes_ProcessVRRTimingChange () |
| This function updates the Reads the VRR Video Timing Values from HDMI RX Receiver and updates to HDMI TX when VRR Manual Mode is enabled. More... | |
| void | Exdes_ReadVTEMPacket () |
| This function updates the Reads the VRR VTEM Packet from HDMI RX Receiver. More... | |
| void | Exdes_ProcessVTEMPacket () |
| This function updates the R Reads the VRR VTEM Packet from HDMI RX Receiver and updates to HDMI TX. More... | |
| u32 | Exdes_CheckforResChange () |
| This function checks if there has been a change in resolution on the incoming rx stream. More... | |
| int | I2cMuxSel (void *IicPtr, XOnBoard_IicDev Dev) |
| This function setup sets up the On Board IIC MUX to select device. More... | |
| void | Xil_AssertCallbackRoutine (u8 *File, s32 Line) |
| This is the callback for assertion error. More... | |
| u32 | Exdes_SetupClkSrc (u32 ps_iic0_deviceid, u32 ps_iic1_deviceid) |
| This function updates the FrameRate for the current video stream. More... | |
| int | SetupInterruptSystem (void) |
| This function setups the interrupt system so interrupts can occur for the HDMI cores. More... | |
| int | main () |
| Main function to call example with HDMI TX, HDMI RX and HDMI GT drivers. More... | |
| void DetailedInfo | ( | void | ) |
This function prints additional details of the system for debug purpose.
| None. |
References XV_HdmiTxSs1::HdmiTx1Ptr, XV_HdmiTxSs1_DebugInfo(), XV_HdmiTxSs1_ReportCoreInfo(), and XV_HdmiTxSs1_ReportSubcoreVersion().
| u32 Exdes_CheckforResChange | ( | ) |
This function checks if there has been a change in resolution on the incoming rx stream.
| None. |
References XHdmi_Exdes::TxStartTransmit.
| void Exdes_InitController | ( | XHdmi_Exdes * | InstancePtr | ) |
This function is used to initialize the example desing controller data strucuture that is used to track the presence and instances of the hdmi 2.1 receiver and transmitter.
| InstancePtr | is the instance of the example design handle data structure. |
References Exdes_SetAuxFifoDebugPrintf(), Exdes_SetDebugPrintf(), Exdes_SetHdcpDebugPrintf(), XHdmi_Exdes::IsRxPresent, XHdmi_Exdes::IsTxPresent, XHdmi_Exdes::SystemEvent, and XHdmi_Exdes::TxStartTransmit.
Referenced by main().
| void Exdes_ProcessVRRTimingChange | ( | ) |
This function updates the Reads the VRR Video Timing Values from HDMI RX Receiver and updates to HDMI TX when VRR Manual Mode is enabled.
| None. |
References XV_HdmiTxSS1_SetVrrVfpStretch().
Referenced by Exdes_ProcessVTEMPacket(), and main().
| void Exdes_ProcessVTEMPacket | ( | ) |
This function updates the R Reads the VRR VTEM Packet from HDMI RX Receiver and updates to HDMI TX.
| None. |
References Exdes_ProcessVRRTimingChange(), XV_HdmiTxSs1_FSyncControl(), XV_HdmiTxSs1_SetVrrIf(), and XV_HdmiTxSs1_VrrControl().
| void Exdes_ReadVRRTimingChange | ( | ) |
This function updates the Reads the VRR Video Timing Values from HDMI RX Receiver.
| None. |
| void Exdes_ReadVTEMPacket | ( | ) |
This function updates the Reads the VRR VTEM Packet from HDMI RX Receiver.
| None. |
| void Exdes_SetAuxFifoDebugPrintf | ( | Exdes_Debug_Printf | PrintFunc | ) |
This function is used to enable and additional debugging prints for the Aux Fifo operations in the applicaiton.
| Printfunc | is the function to enable printing. |
Referenced by Exdes_InitController().
| void Exdes_SetDebugPrintf | ( | Exdes_Debug_Printf | PrintFunc | ) |
This function is used to enable and additional debugging prints in the applicaiton.
| Printfunc | is the function to enable printing. |
Referenced by Exdes_InitController().
| void Exdes_SetHdcpDebugPrintf | ( | Exdes_Debug_Printf | PrintFunc | ) |
This function is used to enable and additional debugging prints for the HDCP operations in the applicaiton.
| Printfunc | is the function to enable printing. |
Referenced by Exdes_InitController().
| u32 Exdes_SetupClkSrc | ( | u32 | ps_iic0_deviceid, |
| u32 | ps_iic1_deviceid | ||
| ) |
This function updates the FrameRate for the current video stream.
| ps_iic0_deviceid | is the device id of the ps iic device. |
| ps_iic1_deviceid | is the device id of the ps iic device. |
References I2cMuxSel(), RC21008A_ADDR, and Si570_SetFreq().
Referenced by main().
| void Exdes_StartSysTmr | ( | XHdmi_Exdes * | InstancePtr, |
| u32 | IntervalInMs | ||
| ) |
This function is used to start a the timer to generate periodic pulses of tmrctr interrupt.
| InstancePtr | is a pointer to the example design handler. |
| IntervalInMs | is the user specified period for the timer pulses. |
References Exdes_SysTmrCallback(), Exdes_UsToTicks(), XHdmi_Exdes::SysTmrInst, and XHdmi_Exdes::SysTmrPulseIntervalinMs.
Referenced by main().
| void Exdes_SysTimerIntrHandler | ( | void * | CallbackRef | ) |
This function is set as the callback handler from the interrupt controller for the system timer interrupts.
| InstancePtr | is the callback reference. |
References XHdmi_Exdes::SysTmrInst.
Referenced by Exdes_SysTmrInitialize().
| void Exdes_SysTmrCallback | ( | void * | CallbackRef, |
| u8 | TmrCtrNumber | ||
| ) |
This function is set as the callback handler from the timer counter interrupt handler.
The counters that are used in the application for timer based control and exclusion are be handled in the this function.
The user needs to modify this callback to set the counters and exclusion flags based on the pulse counts in the pulse train generated by the system timer.
| CallbackRef | is the function callback reference. |
| TmrCtrNumber | is the timer counter number. |
Referenced by Exdes_StartSysTmr().
| u32 Exdes_SysTmrInitialize | ( | XHdmi_Exdes * | InstancePtr, |
| u32 | TmrId, | ||
| u32 | TmrIntrId | ||
| ) |
This function is used to initialize the system timer that is used to count and generate given periodic interrupts.
| InstancePtr | is a pointer to the example design handler |
| TmrId | is the device id of the system timer |
| TmrIntrId | is the interrupt vector id of the system timer |
References Exdes_SysTimerIntrHandler(), and XHdmi_Exdes::SysTmrInst.
Referenced by main().
| void Exdes_UpdateAuxFifo | ( | ) |
This function updates the global array for AUX fifo with the AUX data from the hdmi receiver.
| None. |
| u32 Exdes_UsToTicks | ( | u32 | TimeInUs, |
| u32 | TmrCtrClkFreq | ||
| ) |
This function time specified in Us to ticks for a specified timer frequency.
| TimeInUs | is the time in microseconds. |
| TmrCtrClkFreq | is the frequency of the clock to be used for counting the ticks. |
Referenced by Exdes_StartSysTmr().
| void Hdmiphy1ErrorCallback | ( | void * | CallbackRef | ) |
This function is called whenever an error condition in VPHY occurs.
This will fill the FIFO of VPHY error events which will be processed outside the ISR.
| CallbackRef | is the VPHY instance pointer |
| ErrIrqType | is the VPHY error type |
Referenced by main().
| void Hdmiphy1ProcessError | ( | void | ) |
This function is called in the application to process the pending VPHY errors.
| None. |
Referenced by main().
| int I2cClk | ( | u32 | InFreq, |
| u32 | OutFreq | ||
| ) |
This function setup SI5324 clock generator either in free or locked mode.
| Index | specifies an index for selecting mode frequency. |
| Mode | specifies either free or locked mode. |
References I2C_CLK_ADDR, I2C_CLK_ADDR1, and IDT_8T49N24x_I2cClk().
Referenced by main().
| int I2cMuxSel | ( | void * | IicPtr, |
| XOnBoard_IicDev | Dev | ||
| ) |
This function setup sets up the On Board IIC MUX to select device.
| None. |
Referenced by Exdes_SetupClkSrc().
| void Info | ( | void | ) |
This function outputs the video timing , Audio, Link Status, HDMI RX state of HDMI RX core.
In addition, it also prints information about HDMI TX, and HDMI GT cores.
| None. |
References XV_HdmiTxSs1::EnableHDCPLogging, XV_HdmiTxSs1_ReportAudio(), XV_HdmiTxSs1_ReportDRMInfo(), and XV_HdmiTxSs1_ReportTiming().
| int main | ( | ) |
Main function to call example with HDMI TX, HDMI RX and HDMI GT drivers.
| None. |
Setup IIC devices and clock sources.
Load the HDCP keys.
Initialize the Audio Generator.
Initialize the Interrupt Controller.
Initialize the HDMI Video Transmitter "state machine" functionality and the downstream HDCP device.
Initialize the HDMI Video Receiver "state machine" functionality and the downstream HDCP device.
Set the Video Phy Error callbacks.
Initialize the controller for the example design mode.
Initialize the TPG and associated GPIO to reset the TPG.
References XV_HdmiTxSs1::Config, Exdes_InitController(), Exdes_ProcessVRRTimingChange(), Exdes_SetupClkSrc(), Exdes_StartSysTmr(), Exdes_SysTmrInitialize(), XHdmi_Exdes::ForceIndependent, Hdmiphy1ErrorCallback(), Hdmiphy1ProcessError(), I2cClk(), XVfmc::IicPtr, XHdmi_Exdes::IsRxPresent, XV_HdmiTxSs1::IsStreamUp, XHdmi_Exdes::IsTxPresent, XVfmc::Loc, SetupInterruptSystem(), XHdmi_Exdes::SystemEvent, XHdmi_Exdes::TxBusy, XHdmi_Exdes::TxStartTransmit, XHdmi_MenuInitialize(), XHdmi_MenuProcess(), Xil_AssertCallbackRoutine(), XV_HdmiTxSs1_FSyncControl(), XV_HdmiTxSs1_GetVideoStream(), XV_HDMITXSS1_HANDLER_ERROR, XV_HdmiTxSs1_SetCallback(), XV_HdmiTxSs1_SetFfeLevels(), XV_HdmiTxSs1_SetFrlMaxFrlRate(), XV_HdmiTxSs1_SetVrrIf(), XV_HdmiTxSS1_SetVrrVfpStretch(), XV_HdmiTxSs1_Start(), and XV_HdmiTxSs1_VrrControl().
| int SetupInterruptSystem | ( | void | ) |
This function setups the interrupt system so interrupts can occur for the HDMI cores.
The function is application-specific since the actual system may or may not have an interrupt controller. The HDMI cores could be directly connected to a processor without an interrupt controller. The user should modify this function to fit the application.
| None. |
Referenced by main().
| void Xil_AssertCallbackRoutine | ( | u8 * | File, |
| s32 | Line | ||
| ) |
This is the callback for assertion error.
| File | is string name of the file where the assertion failure occured. |
| LIne | is the line wheer the assertion failure occured. |
Referenced by main().