mipicsiss
Vitis Drivers API Documentation
|
This file demonstrates the Xilinx MIPI CSI2 Rx Subsystem and MIPI DSI2 Tx Subsystem.
The video pipeline is created by connecting an IMX274 Camera sensor to the MIPI CSI2 Rx Subsystem. The sensor is programmed to generate RAW10 type de bayered data as per the pipeline configuration. The raw pixels are fed to Xilinx Demosaic, Gamma lut and v_proc_ss IPs to convert pixel to RGB format. The RGB pixels are then sent across to a data Video Test Pattern Generator. In a pass through mode, the camera data is passed to an AXI Stream broadcaster. This sends across video stream to along HDMI Tx Subsystem and a Video Processing Subsystem configured as Scalar. The output of the scalar is connected to the DSI2 Tx Subsystem. The DSI2 output is connected to AUO Asus Display panel with 1920x1200 fixed resolution
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 pg 12/07/17 Initial release.
Macros | |
#define | I2C_MUX_ADDR 0x74 |
I2C Mux Address. More... | |
#define | I2C_CLK_ADDR 0x68 |
I2C Clk Address. More... | |
Functions | |
int | I2cMux (void) |
This function setup SI5324 clock generator over IIC. More... | |
int | I2cClk (u32 InFreq, u32 OutFreq) |
This function setup SI5324 clock generator either in free or locked mode. More... | |
void | EnableColorBar (XVphy *VphyPtr, XV_HdmiTxSs *HdmiTxSsPtr, XVidC_VideoMode VideoMode, XVidC_ColorFormat ColorFormat, XVidC_ColorDepth Bpc) |
This function enables the ColorBar. More... | |
u32 | InitStreamMuxGpio (void) |
This function initializes GPIO IP for Stream Switch selection and gets config parameters. More... | |
void | Info (void) |
This function outputs the video timing , Audio, Link Status, HDMI RX state of HDMI RX core. More... | |
void | CloneTxEdid (void) |
This function clones the EDID of the connected sink device to the HDMI RX. More... | |
void | XV_ConfigTpg (XV_tpg *InstancePtr) |
This function generates video pattern. More... | |
void | ResetTpg (void) |
This function resets TPG IP. More... | |
void | EnableDSI () |
This function enables MIPI DSI SS. More... | |
void | SelectDSIOutput (void) |
This function programs GPIO to 1 to select MIPI DSI SS Stream Path in AXI- Stream switch. More... | |
void | SelectHDMIOutput (void) |
This function programs GPIO to '0' to select HDMI Stream path in AXI-Stream switch. More... | |
void | config_csi_cap_path () |
Main function to initialize the video pipleline and process user input. More... | |
void | ReportStreamMode (XV_HdmiTxSs *HdmiTxSsPtr, u8 IsPassThrough) |
This function reports the stream mode. More... | |
void | TxConnectCallback (void *CallbackRef) |
This function is called when a TX connect event has occurred. More... | |
void | VphyHdmiTxInitCallback (void *CallbackRef) |
This function is called when the GT TX reference input clock has changed. More... | |
void | VphyHdmiTxReadyCallback (void *CallbackRef) |
This function is called when the GT TX has been initialized. More... | |
void | TxVsCallback (void *CallbackRef) |
This function is called when a TX vsync has occurred. More... | |
void | TxStreamUpCallback (void *CallbackRef) |
This function is called when the TX stream is up. More... | |
void | TxStreamDownCallback (void *CallbackRef) |
This function is called when the TX stream is down. More... | |
void | StartTxAfterRx (void) |
This function is called to start the TX stream after the RX stream was up and running. More... | |
int | SetupInterruptSystem (void) |
This function setups the interrupt system. More... | |
void | Xil_AssertCallbackRoutine (u8 *File, s32 Line) |
This function asserts a callback error. More... | |
void | CamReset (void) |
This function resets IMX274 camera sensor. More... | |
void | Reset_IP_Pipe (void) |
This function resets image processing pipe. More... | |
int | main (void) |
Main function to initialize the video pipleline and process user input. More... | |
Variables | |
XTpg_PatternId | Pattern |
Video pattern. More... | |
u8 | IsPassThrough |
Demo mode 0-colorbar 1-pass through. More... | |
#define I2C_MUX_ADDR 0x74 |
I2C Mux Address.
Referenced by I2cMux().
void CamReset | ( | void | ) |
This function resets IMX274 camera sensor.
void CloneTxEdid | ( | void | ) |
This function clones the EDID of the connected sink device to the HDMI RX.
void config_csi_cap_path | ( | ) |
Main function to initialize the video pipleline and process user input.
References FrmbufrdDoneCallback(), and FrmbufwrDoneCallback().
void EnableColorBar | ( | XVphy * | VphyPtr, |
XV_HdmiTxSs * | HdmiTxSsPtr, | ||
XVidC_VideoMode | VideoMode, | ||
XVidC_ColorFormat | ColorFormat, | ||
XVidC_ColorDepth | Bpc | ||
) |
This function enables the ColorBar.
VphyPtr | is a pointer to the VPHY core instance. |
HdmiTxSsPtr | is a pointer to the XV_HdmiTxSs instance. |
VideoMode | is the resolution that is to be displayed |
ColorFormat | that can be RGB888 or YUV422 or YUV420 |
Bpc | is the Bits per color that can be 8 or 10 or 12 |
References I2cClk(), and IsPassThrough.
Referenced by main().
void EnableDSI | ( | void | ) |
This function enables MIPI DSI SS.
int I2cClk | ( | u32 | InFreq, |
u32 | OutFreq | ||
) |
This function setup SI5324 clock generator either in free or locked mode.
InFreq | specifies an input frequency for the si5324. |
OutFreq | specifies the output frequency of si5324. |
Index | specifies an index for selecting mode frequency. |
Mode | specifies either free or locked mode. |
References I2C_CLK_ADDR.
Referenced by EnableColorBar(), and StartTxAfterRx().
int I2cMux | ( | void | ) |
This function setup SI5324 clock generator over IIC.
None. |
References I2C_MUX_ADDR.
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.
In addition, it also prints information about HDMI TX, and HDMI GT cores.
None. |
u32 InitStreamMuxGpio | ( | void | ) |
This function initializes GPIO IP for Stream Switch selection and gets config parameters.
Referenced by main().
int main | ( | void | ) |
Main function to initialize the video pipleline and process user input.
References config_csi_cap_path(), EnableColorBar(), EnableDSI(), I2C_CLK_ADDR, InitDSI(), InitializeCsiRxSs(), InitIIC(), InitImageProcessingPipe(), InitStreamMuxGpio(), IsPassThrough, Pattern, PrintPipeConfig(), Reset_IP_Pipe(), ResetTpg(), SelectDSIOutput(), SelectHDMIOutput(), SetColorDepth(), SetupCameraSensor(), SetupDSI(), SetupInterruptSystem(), StartSensor(), TxConnectCallback(), TxStreamUpCallback(), TxVsCallback(), VphyHdmiTxInitCallback(), VphyHdmiTxReadyCallback(), Xil_AssertCallbackRoutine(), XMipi_MenuInitialize(), XMipi_MenuProcess(), and XV_ConfigTpg().
void ReportStreamMode | ( | XV_HdmiTxSs * | HdmiTxSsPtr, |
u8 | IsPassThrough | ||
) |
This function reports the stream mode.
HdmiTxSsPtr | is a pointer to the XV_HdmiTxSs instance. |
IsPassThrough | is a flag to represent passthrough or colorbar mode. |
Referenced by TxStreamUpCallback().
void Reset_IP_Pipe | ( | void | ) |
void ResetTpg | ( | void | ) |
void SelectDSIOutput | ( | void | ) |
This function programs GPIO to 1 to select MIPI DSI SS Stream Path in AXI- Stream switch.
This function programs GPIO to 1 to select MIPI DSI SS Stream Path in AXI- Stream switch.
Referenced by main().
void SelectHDMIOutput | ( | void | ) |
This function programs GPIO to '0' to select HDMI Stream path in AXI-Stream switch.
This function programs GPIO to '0' to select HDMI Stream path in AXI-Stream switch.
Referenced by main().
int SetupInterruptSystem | ( | void | ) |
This function setups the interrupt system.
Referenced by main().
void StartTxAfterRx | ( | void | ) |
This function is called to start the TX stream after the RX stream was up and running.
References I2cClk(), ResetTpg(), and XV_ConfigTpg().
void TxConnectCallback | ( | void * | CallbackRef | ) |
This function is called when a TX connect event has occurred.
CallbackRef | is a callback function reference. |
References IsPassThrough.
Referenced by main().
void TxStreamDownCallback | ( | void * | CallbackRef | ) |
This function is called when the TX stream is down.
CallbackRef | is a callback function reference. |
void TxStreamUpCallback | ( | void * | CallbackRef | ) |
This function is called when the TX stream is up.
CallbackRef | is a callback function reference. |
References IsPassThrough, and ReportStreamMode().
Referenced by main().
void TxVsCallback | ( | void * | CallbackRef | ) |
This function is called when a TX vsync has occurred.
CallbackRef | is a callback function reference. |
Referenced by main().
void VphyHdmiTxInitCallback | ( | void * | CallbackRef | ) |
This function is called when the GT TX reference input clock has changed.
CallbackRef | is a callback function reference. |
Referenced by main().
void VphyHdmiTxReadyCallback | ( | void * | CallbackRef | ) |
This function is called when the GT TX has been initialized.
CallbackRef | is a callback function reference. |
Referenced by main().
void Xil_AssertCallbackRoutine | ( | u8 * | File, |
s32 | Line | ||
) |
This function asserts a callback error.
File | is current file name. |
Line | is line number of the asserted callback. |
Referenced by main().
void XV_ConfigTpg | ( | XV_tpg * | InstancePtr | ) |
This function generates video pattern.
InstancePtr | TPG Instance Pointer. |
References Pattern.
Referenced by main(), and StartTxAfterRx().
u8 IsPassThrough |
Demo mode 0-colorbar 1-pass through.
Referenced by EnableColorBar(), main(), TxConnectCallback(), and TxStreamUpCallback().
XTpg_PatternId Pattern |
Video pattern.
Referenced by main(), and XV_ConfigTpg().