dsitxss
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Overview

Data Structures

struct  DsiTxSsSubCore
 Sub-core configuration information structure. More...
 
struct  XDsiTxSs_Config
 MIPI DSI Tx Subsystem configuration structure. More...
 
struct  XDsiTxSs
 The XDsiTxSs driver instance data. More...
 

Macros

#define XDSITXSS_HW_H_
 Prevent circular inclusions by using protection macros. More...
 

Typedefs

typedef void(* XDsiTxSs_Callback )(void *CallbackRef, u32 Mask)
 Callback type for all interrupts defined. More...
 

Enumerations

enum  XDsiSS_Selection { XDSITXSS_DISABLE = 0, XDSITXSS_ENABLE = 1 }
 DSI TX Subsystem enable/disable selection enumeration. More...
 
enum  XDsiSS_Subcore { XDSITXSS_DSI = 0, XDSITXSS_PHY = 1 }
 DSI TX Subsystem sub-core selection enumeration. More...
 

Functions

s32 XDsiTxSs_CfgInitialize (XDsiTxSs *InstancePtr, XDsiTxSs_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the MIPI DSI TX subsystem and included sub-cores. More...
 
u32 XDsiTxSs_DefaultConfigure (XDsiTxSs *InstancePtr)
 This function is used to configure the DSI default parameters that are to be handled by the application. More...
 
int XDsiTxSs_Activate (XDsiTxSs *InstancePtr, XDsiSS_Subcore core, u8 Flag)
 This function is used to activate the DSI Subsystem. More...
 
void XDsiTxSs_Reset (XDsiTxSs *InstancePtr)
 This function is used to reset the DSI Subsystem. More...
 
void XDsiTxSs_ReportCoreInfo (XDsiTxSs *InstancePtr)
 This function reports list of cores included in DSI TX Subsystem. More...
 
int XDsiTxSs_SetDSIMode (XDsiTxSs *InstancePtr, XDsi_DsiModeType mode)
 
int XDsiTxSs_SendCmdModePacket (XDsiTxSs *InstancePtr)
 
void XDsiTxSs_SendShortPacket (XDsiTxSs *InstancePtr)
 This function will send the short packet to controller Generic Short Packet Register and fill up the structure passed from caller. More...
 
void XDsiTxSs_GetConfigParams (XDsiTxSs *InstancePtr)
 This function will get the information from the GUI settings. More...
 
u32 XDsiTxSs_IsControllerReady (XDsiTxSs *InstancePtr)
 This function will get the information from the GUI settings. More...
 
u32 XDsiTxSs_GetPixelFormat (XDsiTxSs *InstancePtr)
 This function is used to get pixel format. More...
 
u32 XDsiTxSs_GetCmdQVacancy (XDsiTxSs *InstancePtr)
 This function is used to get Command queue Vacancy. More...
 
s32 XDsiTxSs_SetVideoInterfaceTiming (XDsiTxSs *InstancePtr, XDsi_VideoMode VideoMode, XVidC_VideoMode Resolution, u16 BurstPacketSize)
 This function Set Timing mode and Resolution. More...
 
s32 XDsiTxSs_SetCustomVideoInterfaceTiming (XDsiTxSs *InstancePtr, XDsi_VideoMode VideoMode, XDsi_VideoTiming *Timing)
 This function Set Timning mode and Resolution as per user inputs. More...
 
XDsiTxSs_ConfigXDsiTxSs_LookupConfig (UINTPTR BaseAddress)
 This function looks for the device configuration based on the unique device ID. More...
 
u32 XDsiTxSs_GetDrvIndex (XDsiTxSs *InstancePtr, UINTPTR BaseAddress)
 This function returns the Index number of config table using BaseAddress. More...
 
u32 XDsiTxSs_SelfTest (XDsiTxSs *InstancePtr)
 This function performs self test on MIPI DSI Tx Subsystem sub-cores. More...
 
u32 XDsiTxSs_SetCallback (XDsiTxSs *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
 This routine installs an asynchronous callback function for the given HandlerType: More...
 
void XDsiTxSs_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the MIPI DSI Tx Subsystem. More...
 
void XDsiTxSs_SetGlobalInterrupt (void *InstancePtr)
 This function will enable the interrupts present in the interrupt mask passed onto the function. More...
 
void XDsiTxSs_InterruptEnable (void *InstancePtr, u32 Mask)
 This function will enable the interrupts present in the interrupt mask passed onto the function. More...
 

Variables

XDsi XDsiTxSs_SubCores::DsiInst
 DSI controller driver instance. More...
 
XDsiTxSs_SubCores DsiTxSsSubCores [XPAR_XDSITXSS_NUM_INSTANCES]
 Global array of DSI TX Subsystem sub-core instances. More...
 
XDsiTxSs_Config XDsiTxSs_ConfigTable []
 Configuration table containing hardware configuration information for each XDsiTxSs instance in the system. More...
 

Interrupt handler identifiers

Map DSITxSS handler IDs to the underlying DSI core handler IDs.

#define XDSITXSS_HANDLER_UNSUPPORT_DATATYPE   XDSI_HANDLER_UNSUPPORT_DATATYPE
 Unsupported data type handler ID. More...
 
#define XDSITXSS_HANDLER_PIXELDATA_UNDERRUN   XDSI_HANDLER_PIXELDATA_UNDERRUN
 Pixel data underrun handler ID. More...
 
#define XDSITXSS_HANDLER_CMDQ_FIFOFULL   XDSI_HANDLER_CMDQ_FIFOFULL
 Command queue FIFO full handler ID. More...
 
#define XDSITXSS_HANDLER_OTHERERROR   XDSI_HANDLER_OTHERERROR
 Other error handler ID. More...
 

Interrupt status masks

Mapped DSITxSS interrupt status masks from the DSI core.

#define XDSITXSS_ISR_DATAIDERR_MASK   XDSI_ISR_DATA_ID_ERR_MASK
 Data ID error interrupt status mask. More...
 
#define XDSITXSS_ISR_PIXELUNDERRUN_MASK   XDSI_ISR_PXL_UNDR_RUN_MASK
 Pixel underrun interrupt status mask. More...
 
#define XDSITXSS_ISR_CMDQ_FIFO_FULL_MASK   XDSI_ISR_CMDQ_FIFO_FULL_MASK
 Command queue FIFO full interrupt status mask. More...
 

Interrupt enable masks

Mapped DSITxSS interrupt enable masks from the DSI core.

#define XDSITXSS_IER_DATAIDERR_MASK   XDSI_IER_DATA_ID_ERR_MASK
 Data ID error interrupt enable mask. More...
 
#define XDSITXSS_IER_PIXELUNDERRUN_MASK   XDSI_IER_PXL_UNDR_RUN_MASK
 Pixel underrun interrupt enable mask. More...
 
#define XDSITXSS_IER_CMDQ_FIFO_FULL_MASK   XDSI_IER_CMDQ_FIFO_FULL_MASK
 Command queue FIFO full interrupt enable mask. More...
 
#define XDSITXSS_IER_ALLINTR_MASK   XDSI_IER_ALLINTR_MASK
 Enable all supported interrupts mask. More...
 

Macro Definition Documentation

#define XDSITXSS_HANDLER_CMDQ_FIFOFULL   XDSI_HANDLER_CMDQ_FIFOFULL

Command queue FIFO full handler ID.

Referenced by DsiTxSs_IntrExample().

#define XDSITXSS_HANDLER_OTHERERROR   XDSI_HANDLER_OTHERERROR

Other error handler ID.

#define XDSITXSS_HANDLER_PIXELDATA_UNDERRUN   XDSI_HANDLER_PIXELDATA_UNDERRUN

Pixel data underrun handler ID.

Referenced by DsiTxSs_IntrExample().

#define XDSITXSS_HANDLER_UNSUPPORT_DATATYPE   XDSI_HANDLER_UNSUPPORT_DATATYPE

Unsupported data type handler ID.

Referenced by DsiTxSs_IntrExample().

#define XDSITXSS_HW_H_

Prevent circular inclusions by using protection macros.

#define XDSITXSS_IER_ALLINTR_MASK   XDSI_IER_ALLINTR_MASK

Enable all supported interrupts mask.

Referenced by DsiTxSs_IntrExample().

#define XDSITXSS_IER_CMDQ_FIFO_FULL_MASK   XDSI_IER_CMDQ_FIFO_FULL_MASK

Command queue FIFO full interrupt enable mask.

#define XDSITXSS_IER_DATAIDERR_MASK   XDSI_IER_DATA_ID_ERR_MASK

Data ID error interrupt enable mask.

#define XDSITXSS_IER_PIXELUNDERRUN_MASK   XDSI_IER_PXL_UNDR_RUN_MASK

Pixel underrun interrupt enable mask.

#define XDSITXSS_ISR_CMDQ_FIFO_FULL_MASK   XDSI_ISR_CMDQ_FIFO_FULL_MASK

Command queue FIFO full interrupt status mask.

Referenced by DsiTxSs_CmdQFIFOFullEventHandler().

#define XDSITXSS_ISR_DATAIDERR_MASK   XDSI_ISR_DATA_ID_ERR_MASK

Data ID error interrupt status mask.

Referenced by DsiTxSs_UnSupportDataEventHandler().

#define XDSITXSS_ISR_PIXELUNDERRUN_MASK   XDSI_ISR_PXL_UNDR_RUN_MASK

Pixel underrun interrupt status mask.

Referenced by DsiTxSs_PixelUnderrunEventHandler().

Typedef Documentation

typedef void(* XDsiTxSs_Callback)(void *CallbackRef, u32 Mask)

Callback type for all interrupts defined.

Parameters
CallbackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
Maskis a bit mask indicating the cause of the event. For current core version, this parameter is "OR" of 0 or more XDSITXSS_ISR_*_MASK constants defined in xdsitxss_hw.h.
Returns
None.
Note
None.

Enumeration Type Documentation

DSI TX Subsystem enable/disable selection enumeration.

Specifies whether to enable or disable the DSI TX Subsystem core.

Enumerator
XDSITXSS_DISABLE 

Disable DSI TX subsystem.

XDSITXSS_ENABLE 

Enable DSI TX subsystem.

DSI TX Subsystem sub-core selection enumeration.

Specifies which sub-core (DSI or DPHY) within the subsystem to operate on.

Enumerator
XDSITXSS_DSI 

DSI Core.

XDSITXSS_PHY 

DPHY Core.

Function Documentation

int XDsiTxSs_Activate ( XDsiTxSs InstancePtr,
XDsiSS_Subcore  core,
u8  Flag 
)

This function is used to activate the DSI Subsystem.

Internally it activates the DPHY and DSI. Enable/Disable IP core to start processing

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
coreis used to denote the subcore of subsystem
Flagis used to denote whether to enable or disable the subsystem
Returns
XST_SUCCESS is returned if subcore(DSI/DPHY) was successfully enabled or disabled XST_INVALID_PARAM is returned if subsystem core is not found
Note
None.

References XDsiTxSs::Config, XDsiTxSs::DsiPtr, XDSITXSS_DSI, XDSITXSS_ENABLE, and XDSITXSS_PHY.

Referenced by DsiTxSs_VideoTestExample().

s32 XDsiTxSs_CfgInitialize ( XDsiTxSs InstancePtr,
XDsiTxSs_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the MIPI DSI TX subsystem and included sub-cores.

This function must be called prior to using the subsystem. Initialization includes setting up the instance data for top level as well as all included sub-core therein, and ensuring the hardware is in a known stable state

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
CfgPtrpoints to the configuration structure associated with the subsystem instance.
EffectiveAddris the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if initialization is successful
  • XST_FAILURE if initialization is failure
Note
None.

References XDsiTxSs_Config::BaseAddr, XDsiTxSs::Config, XDsiTxSs::DsiPtr, and XDsiTxSs::IsReady.

Referenced by DsiTxSs_IntrExample(), DsiTxSs_SelfTestExample(), and DsiTxSs_VideoTestExample().

u32 XDsiTxSs_DefaultConfigure ( XDsiTxSs InstancePtr)

This function is used to configure the DSI default parameters that are to be handled by the application.

It will configure protocol register with video mode, bllp mode,eotp

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
  • XST_SUCCESS on successful configuration of parameters
  • XST_FAILURE on failure scenraio
Note
None.

References XDsiTxSs::DsiPtr.

u32 XDsiTxSs_GetCmdQVacancy ( XDsiTxSs InstancePtr)

This function is used to get Command queue Vacancy.

Parameters
InstancePtris a pointer to the DSITxSs Instance to be worked on.
Returns
Number of command queue entries can be safely written to Command queue FIFO, before it goes full.
Note
None

References XDsiTxSs::DsiPtr.

void XDsiTxSs_GetConfigParams ( XDsiTxSs InstancePtr)

This function will get the information from the GUI settings.

Parameters
InstancePtris the XDsi instance to operate on
Note
None.

References XDsiTxSs::ConfigInfo, and XDsiTxSs::DsiPtr.

u32 XDsiTxSs_GetDrvIndex ( XDsiTxSs InstancePtr,
UINTPTR  BaseAddress 
)

This function returns the Index number of config table using BaseAddress.

Parameters
InstancePtrpointer to the instance structure
BaseAddressaddress of the instance
Returns
Index number of the config table
u32 XDsiTxSs_GetPixelFormat ( XDsiTxSs InstancePtr)

This function is used to get pixel format.

Parameters
InstancePtris a pointer to the DsiTxSs Instance to be worked on.
Returns
0x0E – Packed RGB565 0x1E- packed RGB666 0x2E – Loosely packed RGB666 0x3E- Packed RGB888 0x0B- Compressed Pixel Stream
Note
None

References XDsiTxSs::DsiPtr.

void XDsiTxSs_InterruptEnable ( void *  InstancePtr,
u32  Mask 
)

This function will enable the interrupts present in the interrupt mask passed onto the function.

Parameters
InstancePtris the XDsiTxSs instance to operate on
Maskis the interrupt mask which need to be enabled in core

References XDsiTxSs::DsiPtr.

Referenced by DsiTxSs_IntrExample().

void XDsiTxSs_IntrHandler ( void *  InstancePtr)

This function is the interrupt handler for the MIPI DSI Tx Subsystem.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XDsiTxSs_SetCallback() during initialization phase.

Parameters
InstancePtris a pointer to the XDsiTxSs core instance that just interrupted.
Note
None.

References XDsiTxSs::DsiPtr.

u32 XDsiTxSs_IsControllerReady ( XDsiTxSs InstancePtr)

This function will get the information from the GUI settings.

Parameters
InstancePtris the XDsiTxss instance to operate on
Returns
Controller ready status
Note
None.

References XDsiTxSs::DsiPtr.

XDsiTxSs_Config * XDsiTxSs_LookupConfig ( UINTPTR  BaseAddress)

This function looks for the device configuration based on the unique device ID.

The table XDsiTxSs_ConfigTable[] contains the configuration information for each instance of the device in the system.

Parameters
DeviceIdis the unique device ID of the device being looked up
Returns
A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found
Note
None.

Referenced by DsiTxSs_IntrExample(), DsiTxSs_SelfTestExample(), and DsiTxSs_VideoTestExample().

void XDsiTxSs_ReportCoreInfo ( XDsiTxSs InstancePtr)

This function reports list of cores included in DSI TX Subsystem.

Parameters
InstancePtris a pointer to the DSI TX Subsystem instance.
Note
None.

References XDsiTxSs::Config, XDsiTxSs_Config::DphyInfo, XDsiTxSs::DsiPtr, and DsiTxSsSubCore::IsPresent.

void XDsiTxSs_Reset ( XDsiTxSs InstancePtr)

This function is used to reset the DSI Subsystem.

Internally it resets the DPHY and DSI

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Note
None.

References XDsiTxSs::Config, XDsiTxSs::DsiPtr, and XDsiTxSs_Config::IsDphyRegIntfcPresent.

Referenced by DsiTxSs_VideoTestExample().

u32 XDsiTxSs_SelfTest ( XDsiTxSs InstancePtr)

This function performs self test on MIPI DSI Tx Subsystem sub-cores.

Parameters
InstancePtris a pointer to the XDsiTxSs core instance.
Returns
  • XST_SUCCESS if self test passed.
  • XST_FAILURE if self test failed.
Note
None.

References XDsiTxSs::Config, XDsiTxSs_Config::DphyInfo, XDsiTxSs::DsiPtr, and DsiTxSsSubCore::IsPresent.

Referenced by DsiTxSs_IntrExample(), DsiTxSs_SelfTestExample(), and DsiTxSs_VideoTestExample().

int XDsiTxSs_SendCmdModePacket ( XDsiTxSs InstancePtr)
  • This function will send the short packet to controller in command mode
  • Generic Short Packet Register and fill up the structure passed from caller.
  • Parameters
    InstancePtris the XDsiTxSs instance to operate on
  • Returns
    • XST_SUCCESS on successful packet transmission
    • XST_FAILURE on failure in packet transmission
  • Note
    None.

References XDsiTxSs::CmdPkt, and XDsiTxSs::DsiPtr.

void XDsiTxSs_SendShortPacket ( XDsiTxSs InstancePtr)

This function will send the short packet to controller Generic Short Packet Register and fill up the structure passed from caller.

like to turn on/off peripheral, change color mode

Parameters
InstancePtris the XDsiTxSs instance to operate on
Note
None.

References XDsiTxSs::DsiPtr, and XDsiTxSs::SpktData.

u32 XDsiTxSs_SetCallback ( XDsiTxSs InstancePtr,
u32  HandlerType,
void *  CallbackFunc,
void *  CallbackRef 
)

This routine installs an asynchronous callback function for the given HandlerType:

HandlerType                     Invoked by this driver when:
-----------------------  --------------------------------------------------
XDSI_HANDLER_UNSUPPORT_DATATYPE Un support data type detected
XDSI_HANDLER_PIXELDATA_UNDERRUN Byte    Stream FIFO starves for Pixel during
                                 HACT transmission
XDSI_HANDLER_OTHERERROR  Any other type of interrupt has occurred like
                        Stream Line Buffer Full, Incorrect Lanes, etc
XDSI_HANDLER_CMDQ_FIFOFULL      Command queue FIFO Full
Parameters
InstancePtris the XDsi instance to operate on
HandlerTypeis the type of call back to be registered.
CallbackFuncis the pointer to a call back function which is called when a particular event occurs.
CallbackRefis a void pointer to data to be referenced to by the CallbackFunc
Returns
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

References XDsiTxSs::DsiPtr, and XDsiTxSs::IsReady.

Referenced by DsiTxSs_IntrExample().

s32 XDsiTxSs_SetCustomVideoInterfaceTiming ( XDsiTxSs InstancePtr,
XDsi_VideoMode  VideoMode,
XDsi_VideoTiming *  Timing 
)

This function Set Timning mode and Resolution as per user inputs.

Parameters
InstancePtris the XDsi instance to operate on
VideoModeSpecifies mode of Interfacing
TimingVideo Timing parameters
Returns
  • XST_SUCCESS is return Video interfacing was successfully set
  • XST_INVALID_PARAM indicates an invalid parameter was specified.
Note
None

References XDsiTxSs::DsiPtr.

Referenced by DsiTxSs_VideoTestExample().

int XDsiTxSs_SetDSIMode ( XDsiTxSs InstancePtr,
XDsi_DsiModeType  mode 
)
  • This function sets the mode to send short packet.
  • Parameters
    InstancePtris the XDsiTxSs instance to operate on
  • Parameters
    modeis the DSI mode (video or command) to operate on
  • Returns
    None
  • Note
    None.

References XDsiTxSs::DsiPtr.

void XDsiTxSs_SetGlobalInterrupt ( void *  InstancePtr)

This function will enable the interrupts present in the interrupt mask passed onto the function.

Parameters
InstancePtris the XDsiTxSs instance to operate on.
Note
None.

References XDsiTxSs::DsiPtr.

s32 XDsiTxSs_SetVideoInterfaceTiming ( XDsiTxSs InstancePtr,
XDsi_VideoMode  VideoMode,
XVidC_VideoMode  Resolution,
u16  BurstPacketSize 
)

This function Set Timing mode and Resolution.

As per user resolution selection it will get populate Periperal Timing Parameters from video common Library

Parameters
InstancePtris the XDsi instance to operate on
VideoModeSpecifies mode of Interfacing
Resolutionsets the resolution
BurstPacketSizesets the packet size
Returns
  • XST_SUCCESS is return Video interfacing set was successful
  • XST_INVALID_PARAM indicates an invalid parameter was specified.
Note
None.

References XDsiTxSs::DsiPtr.

Variable Documentation

XDsi XDsiTxSs_SubCores::DsiInst

DSI controller driver instance.

XDsiTxSs_SubCores DsiTxSsSubCores[XPAR_XDSITXSS_NUM_INSTANCES]

Global array of DSI TX Subsystem sub-core instances.

Each array element contains the driver instances for all sub-cores (DSI, MIPI TX PHY, DPHY) associated with an instance of the DSI TX Subsystem.

XDsiTxSs_Config XDsiTxSs_ConfigTable[]

Configuration table containing hardware configuration information for each XDsiTxSs instance in the system.

This table is populated by the platform configuration tool and is referenced by XDsiTxSs_LookupConfig during device initialization.