DSS
The Display Subsystem (DSS) is a flexible, multi-pipeline subsystem that supports high-resolution display outputs. DSS includes input pipelines providing multi-layer blending with transparency to enable on-the-fly composition. Various pixel processing capabilities are supported, such as color space conversion and scaling, among others. DSS includes a DMA engine, which allows direct access to the frame buffer (device system memory).
Display outputs can connect seamlessly to an Open LVDS Display Interface transmitter (OLDITX), or can directly drive device pads as a Display Parallel Interface (DPI).This document has detailed API description that user can use to make use of the DSS driver.
DSS supports two types of display interfaces:
Display parallel interface via DISPC Video Port 2 (VP2) output.
Two low-voltage differential signaling (LVDS) interfaces, each with four data lanes and one clock lane, via Open LDI Transmitters (OLDITX0 and OLDITX1) connected to DISPC Video Port 1 (VP1) output.
DSS Block Diagram
Features Supported
Support for Video Pipleline configuration for VID and VIDL.
Support configuration for Video port configuration for VP1 and VP2.
Support configuration for single link and dual link OLDI panel on VP1.
Support for DPI configuration for VP2.
Support for RGB 16-bit, RGB 32-bit, RGB 64-bit, RGB 24-bit and YUV frame formats for video pipeline input.
Support for video port timing parameters configuration.
Support configuration display plane zorder for Overlay manager OVR1 and OVR2.
Support for scaling on VID video pipeline.
Support for background color programming for Overlay manager OVR1 and OVR2.
Support for colorbar test pattern generation from OVR1 and OVR2.
Alpha blending support: embedded pixel alpha (ARGB and RGBA), global pixel, combination of global pixel and pixel alpha.
Support for display sharing with HLOS with VIDL pipeline, OVR1 and VP1 in control of MCU and zorder configuration controlled by MCU.
Safety Features:
Support for 4 programmable (position/size) safety check regions on each display output.
Support for 1 safety check region on each input video pipeline output.
Support for MISR (Multiple Input Signature Register) on each safety region, used to perform data correctness check and/or freeze frame detection.
SysConfig Features
Configuration for selecting single pipeline or dual pipeline.
Configuration to select Display sharing with HLOS.
DSS Global Configuration
Configuration for VID and VIDL pipelines.
VID and VIDL Configuration
Configuration for Overlay manager.
Overlay Manager Configuration
Configuration for Video port and timing parameters.
Video Port Configuration
Configuration for OLDI panel.
OLDI Panel Configuration
Configuration for Video port safety regions.
Video Port Safety
Configuration for VID and VIDL pipeline safety regions.
Video Pipeline Safety
Features NOT Supported
Programmable VC1 range mapping
Luma Key generation.
Gamma correction
Bitmap frame input format.
Color space conversion at video port.
Failure Prevention Guidelines for Applications
Application developer must take care of the following guidelines to avoid failures:
The application developer should ensure that chrominance re-sampling is not bypassed when using YUV420/YUV422 frame formats.
The application developer should refer to the documented guidelines for setting the appropriate Color Space Conversion (CSC) coefficients, to maintain accurate color reproduction.
The application developer should verify that the configured position ensures the entire image is displayed within the screen boundaries.
The application developer should ensure that both input and output sizes are explicitly configured, if scaling is enabled
The application developer should set the correct horizontal and vertical synchronization (HSYNC/VSYNC) parameters based on the display requirements.
The application developer should configure the pixel clock according to the pixel format requirements.
The application developer should configure QoS to provide sufficient bandwidth for DSS.
The application developer should set a sufficiently high pre-load value in DSS based on the use case before starting the stream.
API Reference
DSS Driver API/interface file. This is DSS’s top level include for applications.
Defines
-
DSS_DISP_DRV_ID
Display driver ID used at the time of FVID2 create.
-
DSS_DCTRL_DRV_ID
Display controller driver ID used at the time of FVID2 create.
-
DSS_DISP_IOCTL_BASE
IOCTL base address for the display driver IOCTLs.
-
DSS_DCTRL_IOCTL_BASE
IOCTL base address for the display controller driver IOCTLs.
-
DSS_DISP_SOC_IOCTL_BASE
IOCTL base address for the SOC specific display driver IOCTLs.
-
DSS_DCTRL_SOC_IOCTL_BASE
IOCTL base address for the SOC specific display controller driver IOCTLs.
Functions
-
void Dss_initParamsInit(Dss_InitParams *dssParams)
Dss_InitParams structure init function.
- Parameters:
dssParams – Pointer to Dss_InitParams structure.
-
int32_t Dss_init(const Dss_InitParams *initParams)
DSS initialization function. This function initializes the DSS hardware and drivers. This function should be called before calling any driver APIs and only once.
- Parameters:
initParams – Pointer to a Dss_InitParams structure containing the DSS configuration
- Returns:
FVID2_SOK if successful, else suitable error code
-
int32_t Dss_deInit(void)
DSS de-initialization function. This function un-initializes the DSS hardware and drivers. This function should be called during system shutdown if Dss_init() was called by the application.
- Returns:
FVID2_SOK if successful, else suitable error code
-
struct Dss_InitParams
- #include <dss.h>
DSS initialization parameters.
Public Members
-
Dss_SocParams socParams
SoC parameters. Refer Dss_SocParams for details
-
Dss_SocParams socParams
-
struct Dss_ConfigPipelineParams
- #include <dss.h>
Display pipeline config parameters. The test case execution happens based on values of this structure.
Public Members
-
uint32_t numTestPipes
Number of pipes in test params
-
uint32_t bpp
Number of bytes per pixel
-
uint32_t instId[DSS_DISP_INST_MAX]
Driver instance id
-
uint32_t pipeId[DSS_DISP_INST_MAX]
Pipe id
-
uint32_t pipeNodeId[DSS_DISP_INST_MAX]
Pipe Node id
-
uint32_t pipeType[DSS_DISP_INST_MAX]
Video pipe type
-
uint32_t inDataFmt[DSS_DISP_INST_MAX]
Data format
-
uint32_t inWidth[DSS_DISP_INST_MAX]
Input buffer resolution width in pixels
-
uint32_t inHeight[DSS_DISP_INST_MAX]
Input buffer resolution height in lines
-
uint32_t pitch[DSS_DISP_INST_MAX][FVID2_MAX_PLANES]
Pitch of input buffer
-
uint32_t inScanFmt[DSS_DISP_INST_MAX]
Scan format
-
uint32_t outWidth[DSS_DISP_INST_MAX]
Output buffer resolution width in pixels
-
uint32_t outHeight[DSS_DISP_INST_MAX]
Output buffer resolution height in lines
-
uint32_t scEnable[DSS_DISP_INST_MAX]
Scaler enable
-
uint32_t globalAlpha[DSS_DISP_INST_MAX]
Global Alpha value
-
uint32_t preMultiplyAlpha[DSS_DISP_INST_MAX]
Pre-multiply Alpha value
-
uint32_t posx[DSS_DISP_INST_MAX]
Input buffer position x.
-
uint32_t posy[DSS_DISP_INST_MAX]
Input buffer position y.
-
uint32_t invalidPipeId[DSS_DISP_INST_MAX]
Pipe id
-
uint32_t safetyCheck[DSS_DISP_INST_MAX]
Safety Check Enable
-
uint32_t numTestPipes
-
struct Dss_InstObject
- #include <dss.h>
Driver instance information.
Public Members
-
uint32_t instId
Instance ID
-
uint32_t numFrames
Instance ID
-
Dss_DispCreateParams createParams
Create time parameters
-
Dss_DispCreateStatus createStatus
Create status returned by driver during Fvid2_create()
-
Dss_DispParams dispParams
DSS display parameters
-
Dss_DispPipeMflagParams mflagParams
DSS mflag parameters
-
Dss_DispPipeSafetyChkParams safetyParams
DSS pipeline safety check parameters
-
Fvid2_Handle drvHandle
FVID2 display driver handle
-
Fvid2_CbParams cbParams
Callback parameters
-
Fvid2_Frame *frames
FVID2 Frames that will be used for display
-
SemaphoreP_Object syncSem
Semaphore for ISR
-
uint32_t instId
-
struct Dss_RegionFwlData
- #include <dss.h>
Firewall data structure defining ID, start and end address.
-
struct Dss_FirewallRegionConfig
- #include <dss.h>
Firewall configuration structure.
Public Members
-
uint32_t numFwlRegion
Number for firewall regions.
-
Dss_RegionFwlData fwlRegionData[DSS_FWL_REGIONS_MAX]
-
uint32_t numFwlRegion
-
struct Dss_Object
- #include <dss.h>
Test application data structure.
Public Members
-
Dss_InstObject instObj[CSL_DSS_VID_PIPE_ID_MAX]
Display driver instance objects
-
Fvid2_Handle dctrlHandle
DCTRL handle
-
Dss_InitParams initParams
DSS Initialization Parameters
-
Dss_DctrlPathInfo *dctrlPathInfo
DSS Path Information
-
Dss_DctrlVpParams vpParams
VP Params
-
Dss_DctrlAdvVpParams advVpParams
Advance VP Params
-
Dss_DctrlVpSafetyChkParams vpSafetyParams[CSL_DSS_VP_SAFETY_REGION_MAX]
VP safety check params
-
Dss_DctrlOverlayParams overlayParams
Overlay Params
-
Dss_DctrlOverlayLayerParams layerParams
Layer Params
-
Dss_DctrlVpErrorStats errorStats
Error Stats
-
Dss_DctrlGlobalDssParams globalDssParams
Global DSS Params
-
Dss_DctrlOldiParams *oldiParams
OLDI Params
-
Dss_FirewallRegionConfig *fwlConfig
Pointer to fwl region data.
-
Dss_InstObject instObj[CSL_DSS_VID_PIPE_ID_MAX]
DSS Driver configuration file.
Defines
-
DSS_DEF_QUEUE_LEN_PER_INST
Default max number of frames that can be queued per display driver instance.
-
DSS_DEF_QUEUE_LEN_PER_M2M_DRV_INST
Default max number of frames that can be queued per display M2M driver instance.
-
DssTrace
Log enable for DSS module.
DSS Controller Driver API/interface file.
Defines
-
IOCTL_DSS_DCTRL_SET_PATH
Command to set the DSS display path configuration.
All the DSS modules handled by the Display Controller can be represented by a graph, where node represents a module like video port, overlay etc. and edge is present between two nodes if they are connected. All DSS paths can be configured by this IOCTL in one shot. Use macros defined in <dss_soc.h> for different node ids.
This IOCTL takes list of edges connecting nodes and configures display paths. It first validates these paths and then configures DSS for the display paths. It configures all the modules present in the path.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlPathInfo
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_CLEAR_PATH
Command to clear the DSS display path configuration.
This IOCTL takes list of edges connecting nodes and clears the configuration. It also stops Video Ports.
It does not validates the edge list. It simply disables the edge connecting nodes. For the Video Ports, it checks for the validity and then disables the video port if there are no errors. Use macros defined in <dss_soc.h> for different node ids.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlPathInfo
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_VP_PARAMS
Command to set Video Port configuration.
This IOCTL is used to set the Video Port configuration if Video Port is not on. For the enabled Video Port, port has to be stopped first, then configuration can can be changed. Refer Dss_DctrlVpParams for configuration details. This IOCTL should be called before IOCTL_DSS_DCTRL_SET_PATH.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlVpParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_OVERLAY_PARAMS
Command to set configuration of the given overlay.
This IOCTL is used to set the different Overlay parameters. Refer Dss_DctrlOverlayParams for configuration details. Note: In case color bar enable is TRUE then this IOCTL should be called at the end after doing all other display controller configuration.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlOverlayParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_LAYER_PARAMS
Command to set layer/Z-order configuration of the given overlay.
This IOCTL is used to set the layer/Z-order configuration. Refer Dss_DctrlOverlayLayerParams for details. Note: User should pass the layer configuration for all the video pipes which are present in the DSS in order to set/change the Z order. In case a particular pipe is disabled, layerNum should be set to CSL_DSS_OVERLAY_LAYER_INVALID.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlOverlayLayerParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_VP_CSC_COEFF
Command to program the CSC coefficients for Video Port. By default BT 601 coefficients are set.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlVpCscCoeff
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_ADV_VP_PARAMS
Command to set advance Video Port configuration.
This IOCTL is used to program the advance Video Port configuration. Refer Dss_DctrlAdvVpParams for configuration details.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlAdvVpParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_LCD_BLANK_TIMING_PARAMS
Command to program blank timing parameters of given LCD.
This IOCTL is used to program the blank timing parameters for the LCD. This IOCTL can be called dynamically at runtime. Note: The change in timing will take effect from the next vsync. This API should be called in the vsync callback to the application in the ISR context or immediately after that in task/swi context. Calling this IOCTL near the vsync should be avoided as the shadow to work copy could happens while we are changing the timing parameters and could result in taking only a part of this configuration for next one frame or delaying the timing change by next one frame. Subsequent frames will have proper timing.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlLcdBlankTimingParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_VP_SAFETY_CHK_PARAMS
Command to program Safety Check configuration at Video Port Output.
This IOCTL is used to program the safety check configuration parameters. Note: There are up to four sub-regions within the active video output in which safety check can be enabled. This IOCTL should be called separately for each region.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlVpSafetyChkParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_GET_VP_ERROR_STATS
IOCTL to get the number of errors for a given Video Port.
This IOCTL is used to get the count of sync lost errors, security violations and safety check errors for a given video port.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlVpErrorStats
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_GLOBAL_DSS_PARAMS
IOCTL to set the global DSS parameters.
This IOCTL can be used to set the global mflag and CBA configuration.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlGlobalDssParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_STOP_VP
Command to disable Video Port.
This IOCTL is used to disable the Video Port. Refer Dss_DctrlVpParams for configuration details.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlVpParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_REGISTER_SYNCLOST_CB
Command to register Video Port sync lost callback function.
This IOCTL can be used to register a callback when there is a sync loss for a particular video port. See Dss_DctrlSyncLostCbFxn for details. This IOCTL is per Video Port and hence should be called separately for each port. Note: syncLostCbFxn should be set to NULL in order to unregister the callback.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlSyncLostCbParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_REGISTER_LINENUM_CB
Command to register Video Port line number callback function.
This IOCTL can be used to register a callback when there is a line number interrupt for a particular video port. See Dss_DctrlLineNumCbFxn for details. This IOCTL is per Video Port and hence should be called separately for each port. Note: lineNumCbFxn should be set to NULL in order to unregister the callback.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlLineNumCbParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_SET_DSI_PARAMS
Command to set the DSI specific parameters.
Currently used to set number of output lanes.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DctrlDsiParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DCTRL_IS_DP_CONNECTED
Command to detect if the DP cable is connected or not.
- Returns:
FVID2_SOK if successful, else suitable error code
Typedefs
-
typedef void (*Dss_DctrlSyncLostCbFxn)(uint32_t vpId, void *appData)
Video Port sync loss callback function prototype.
- Param vpId:
[OUT] Video Port Id.
- Param appData:
[OUT] Application’s private data.
- Return:
None.
-
typedef void (*Dss_DctrlSafetyErrCbFxn)(uint32_t vpId, Dss_DctrlVpSafetyCbData safetyCbData, void *appData)
Video Port safety error callback function prototype.
- Param vpId:
[OUT] Video Port Id.
- Param safetyCbData:
[OUT] Safety Callback Data. Refer Dss_DctrlVpSafetyCbData_t for details
- Param appData:
[OUT] Application’s private data.
- Return:
None.
-
typedef void (*Dss_DctrlLineNumCbFxn)(uint32_t vpId, void *appData)
Video Port line number callback function prototype.
- Param vpId:
[OUT] Video Port Id.
- Param appData:
[OUT] Application’s private data.
- Return:
None.
Functions
-
static inline void Dss_dctrlPathInfoInit(Dss_DctrlPathInfo *pathInfo)
Dss_DctrlPathInfo structure init function.
- Parameters:
pathInfo – [IN]Pointer to Dss_DctrlPathInfo structure.
-
static inline void Dss_dctrlVpParamsInit(Dss_DctrlVpParams *vpParams)
Dss_DctrlVpParams structure init function.
- Parameters:
vpParams – [IN]Pointer to Dss_DctrlVpParams structure.
-
static inline void Dss_dctrlOverlayParamsInit(Dss_DctrlOverlayParams *overlayParams)
Dss_DctrlOverlayParams structure init function.
- Parameters:
overlayParams – [IN]Pointer to Dss_DctrlOverlayParams structure.
-
static inline void Dss_dctrlOverlayLayerParamsInit(Dss_DctrlOverlayLayerParams *layerParams)
Dss_DctrlOverlayLayerParams structure init function.
- Parameters:
layerParams – [IN]Pointer to Dss_DctrlOverlayLayerParams structure.
-
static inline void Dss_dctrlAdvVpParamsInit(Dss_DctrlAdvVpParams *advVpParams)
Dss_DctrlAdvVpParams structure init function.
- Parameters:
advVpParams – [IN]Pointer to Dss_DctrlAdvVpParams structure.
-
static inline void Dss_dctrlLcdBlankTimingParamsInit(Dss_DctrlLcdBlankTimingParams *lcdBlankTimingParams)
Dss_DctrlLcdBlankTimingParams structure init function.
- Parameters:
lcdBlankTimingParams – [IN]Pointer to Dss_DctrlLcdBlankTimingParams structure.
-
static inline void Dss_dctrlRegionSafetyChkCfgInit(Dss_DctrlRegionSafetyChkCfg *regionSafetyChkCfg)
Dss_DctrlRegionSafetyChkCfg structure init function.
- Parameters:
regionSafetyChkCfg – [IN]Pointer to Dss_DctrlRegionSafetyChkCfg structure.
-
static inline void Dss_dctrlVpSafetyCbDataInit(Dss_DctrlVpSafetyCbData *safetyCbData)
Dss_DctrlVpSafetyCbData structure init function.
- Parameters:
safetyCbData – [IN]Pointer to Dss_DctrlVpSafetyCbData_t structure.
-
static inline void Dss_dctrlVpSafetyChkParamsInit(Dss_DctrlVpSafetyChkParams *vpSafetyChkParams)
Dss_DctrlVpSafetyChkParams structure init function.
- Parameters:
vpSafetyChkParams – [IN]Pointer to Dss_DctrlVpSafetyChkParams structure.
-
static inline void Dss_dctrlVpErrorStatsInit(Dss_DctrlVpErrorStats *vpErrorStats)
Dss_DctrlVpErrorStats structure init function.
- Parameters:
vpErrorStats – [IN]Pointer to Dss_DctrlVpErrorStats structure.
-
static inline void Dss_dctrlGlobalDssParamsInit(Dss_DctrlGlobalDssParams *globalDssParams)
Dss_DctrlGlobalDssParams structure init function.
- Parameters:
globalDssParams – [IN]Pointer to Dss_DctrlGlobalDssParams structure.
-
static inline void Dss_dctrlSyncLostCbParamsInit(Dss_DctrlSyncLostCbParams *syncLostCbParams)
Dss_DctrlSyncLostCbParams structure init function.
- Parameters:
syncLostCbParams – [IN]Pointer to Dss_DctrlSyncLostCbParams structure.
-
static inline void Dss_dctrlLineNumCbParamsInit(Dss_DctrlLineNumCbParams *lineNumCbParams)
Dss_DctrlLineNumCbParams structure init function.
- Parameters:
lineNumCbParams – [IN]Pointer to Dss_DctrlLineNumCbParams structure.
-
static inline void Dss_DctrlSyncOpCfgInit(Dss_DctrlSyncOpCfg *syncOpCfg)
-
struct Dss_DctrlPathInfo
- #include <dss_dctrl.h>
Structure containing DSS path information. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_PATH. This IOCTL takes the array of edges connected between nodes.
Public Members
-
uint32_t numEdges
Number edge in the edgeInfo array
-
Fvid2_GraphEdgeInfo edgeInfo[DSS_DCTRL_MAX_EDGES]
List of edges connecting DSS modules. Display controller parses these edges and enables/disables input/output path in the appropriate DSS module. This edge tells which module is connected to which module enabling output in edge start module and input in edge end module.
-
uint32_t numEdges
-
struct Dss_DctrlSyncOpCfg
- #include <dss_dctrl.h>
Structure containing DSS sync operations configuration. This structure is used as a part of Dss_DctrlVpParams.
Public Members
-
uint32_t enabled
Enable sync operations configuration
-
uint32_t isPrimary
Whether this VP is the primary output. Only operations on the primary VP results in H/W register operations. For secondary VPs, the enable / setGo operations pend on the corresponding operation on the primary VP
-
uint32_t syncVpIds[CSL_DSS_VP_ID_MAX]
Array of VP Ids for Sync operations
-
uint32_t enabled
-
struct Dss_DctrlVpParams
- #include <dss_dctrl.h>
Structure containing Video Port information. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_VP_PARAMS.
Public Members
-
uint32_t vpId
Video Port Id. See CSL_DssVpId for values
-
CSL_DssVpLcdOpTimingCfg lcdOpTimingCfg
Timing configuration for the LCD output. See CSL_DssVpLcdOpTimingCfg for details
-
CSL_DssVpLcdSignalPolarityCfg lcdPolarityCfg
LCD Polarity Configuration. See CSL_DssVpLcdSignalPolarityCfg for details
-
CSL_DssVpLcdTdmCfg lcdTdmCfg
LCD TDM Configuration. See CSL_DssVpLcdTdmCfg for details
-
Dss_DctrlSyncOpCfg syncOpCfg
Sync operation Configuration. See Dss_DctrlSyncOpCfg for details
-
uint32_t vpId
-
struct Dss_DctrlOverlayParams
- #include <dss_dctrl.h>
Structure containing Overlay information. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_OVERLAY_PARAMS.
-
struct Dss_DctrlOverlayLayerParams
- #include <dss_dctrl.h>
Structure containing Overlay layer information. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_LAYER_PARAMS.
-
struct Dss_DctrlVpCscCoeff
- #include <dss_dctrl.h>
Structure containing Video Port CSC information. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_VP_CSC_COEFF.
-
struct Dss_DctrlAdvVpParams
- #include <dss_dctrl.h>
Structure containing advance Video Port information. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_ADV_VP_PARAMS.
-
struct Dss_DctrlLcdBlankTimingParams
- #include <dss_dctrl.h>
Structure containing LCD Blank Timing Configuration. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_LCD_BLANK_TIMING_PARAMS.
Public Members
-
uint32_t vpId
Video Port Id. See CSL_DssVpId for values
-
uint32_t dvoFormat
Digital output format. For valid values see Fvid2_DVFormat
-
CSL_DssVpLcdBlankTimingCfg lcdBlankTimingCfg
Timing configuration for the LCD. See CSL_DssVpLcdBlankTimingCfg for details
-
uint32_t vpId
-
struct Dss_DctrlRegionSafetyChkCfg
- #include <dss_dctrl.h>
Structure containing Safety Check configuration for a particular region.
-
struct Dss_DctrlVpSafetyCbData_t
- #include <dss_dctrl.h>
Structure containing safety error callback data. This structure is returned by the driver .
Forward declaration for instance object.
-
struct Dss_DctrlVpSafetyChkParams
- #include <dss_dctrl.h>
Structure containing Safety Check configuration of Video Port. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_VP_SAFETY_CHK_PARAMS.
Public Members
-
uint32_t vpId
Video Port Id. See CSL_DssVpId for values
-
uint32_t safetySignSeedVal
Safety Signature Seed Value, only one non-zero value is possible in a particular context. In case user passes multiple non-zero values for different regions, previous value is overwritten.
-
Dss_DctrlRegionSafetyChkCfg regionSafetyChkCfg
Safety Check Configuration for a particular region. See Dss_DctrlRegionSafetyChkCfg for details
-
Dss_DctrlSafetyErrCbFxn safetyErrCbFxn
Safety Error callback function
-
Dss_DctrlVpSafetyCbData safetyCbData
Safety Error callback data to be returned to application
-
void *appData
Private data of application
-
uint32_t vpId
-
struct Dss_DctrlVpErrorStats
- #include <dss_dctrl.h>
Structure containing Error Stats of Video Port. This structure is used as an argument to IOCTL_DSS_DCTRL_GET_VP_ERROR_STATS.
-
struct Dss_DctrlGlobalDssParams
- #include <dss_dctrl.h>
Structure containing global DSS Configuration. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_GLOBAL_DSS_PARAMS.
-
struct Dss_DctrlSyncLostCbParams
- #include <dss_dctrl.h>
Structure containing Sync Lost callback parameters. This structure is used as an argument to IOCTL_DSS_DCTRL_REGISTER_SYNCLOST_CB.
Public Members
-
uint32_t vpId
Video Port Id. See CSL_DssVpId for values
-
Dss_DctrlSyncLostCbFxn syncLostCbFxn
Sync lost callback function
-
void *appData
Private data of application
-
uint32_t vpId
-
struct Dss_DctrlLineNumCbParams
- #include <dss_dctrl.h>
Structure containing line number interrupt callback parameters. This structure is used as an argument to IOCTL_DSS_DCTRL_REGISTER_LINENUM_CB.
Public Members
-
uint32_t vpId
Video Port Id. See CSL_DssVpId for values
-
Dss_DctrlLineNumCbFxn lineNumCbFxn
Line number callback function
-
void *appData
Private data of application
-
uint32_t vpId
-
struct Dss_DctrlDsiParams
- #include <dss_dctrl.h>
Structure containing DSI Output parameters. This structure is used as an argument to IOCTL_DSS_DCTRL_SET_DSI_PARAMS.
Public Members
-
uint32_t instId
DSI Instance ID, currently note used
-
uint32_t numOfLanes
Number of outputs lanes for DSI output, max 4
-
uint32_t laneSpeedInKbps
Exact DPHY lane speed from the selected speed band in Megabits per sec. This parameter is set to default value during init time. If updated in the application after init, newly set value will be used for DPHY clock configurations.
-
uint32_t instId
DSS Display Driver interface file.
Defines
-
DSS_BUFFER_ALIGNMENT
DSS video buffer alignment. All application buffer address and line pitch should be aligned to this byte boundary.
-
IOCTL_DSS_DISP_SET_DSS_PARAMS
Command to set DSS display parameters.
This IOCTL is used to program the DSS display parameters. Refer to structure Dss_DispParams for details on DSS parameters.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DispParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DISP_SET_PIPE_MFLAG_PARAMS
Command to set MFLAG parameters for video pipe.
This IOCTL can be used to set the MFLAG parameters for the given video pipe.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DispPipeMflagParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DISP_GET_CURRENT_STATUS
Command to get the display status.
This IOCTL can be used to get the display status like number of frames displayed, repeated, queued. dequeued, etc. Note: These counters will be reset either at the time of driver create or while starting the display operation. See respective counter comments for details.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DispCurrentStatus
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DISP_SET_PIPE_SAFETY_CHK_PARAMS
Command to program Safety Check configuration at Video Pipe Output.
This IOCTL is used to program the safety check configuration parameters.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DispPipeSafetyChkParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DISP_SET_PIPE_CSC_COEFF
Command to program the CSC coefficients for Video Pipe. By default BT 601 coefficients are set.
- Parameters:
cmdArgs – [IN] Pointer of type CSL_DssCscCoeff
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DISP_REGISTER_BUF_PRGM_CB
Command to register buffer program callback function.
This IOCTL can be used to register a callback when the actual buffer is getting programmed to the hardware. See Dss_DispBufPrgmCbFxn for details. This IOCTL is per display driver instance and hence should be called separately for each display pipeline. Also this IOCTL should be called before starting the display. Note: bufPrgmCbFxn should be set to NULL in order to unregister the callback.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DispBufPrgmCbParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DISP_REGISTER_PIPE_PRGM_CB
Command to register video pipe program callback function.
This IOCTL can be used to register a callback when the actual buffer has been programmed to the hardware. See Dss_DispPipePrgmCbFxn for details. This IOCTL is per display driver instance and hence should be called separately for each display pipeline. Also this IOCTL should be called before starting the display. Note: pipePrgmCbFxn should be set to NULL in order to unregister the callback.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DispPipePrgmCbParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
-
IOCTL_DSS_DISP_REGISTER_PIPE_UNDERFLOW_CB
Command to register video pipe underflow callback function.
This IOCTL can be used to register a callback when there is a underflow for a particular video pipe. See Dss_DispUnderFlowCbFxn for details. This IOCTL is per display driver instance and hence should be called separately for each display pipeline. Also this IOCTL should be called before starting the display. Note: underFlowCbFxn should be set to NULL in order to unregister the callback.
- Parameters:
cmdArgs – [IN] Pointer of type Dss_DispUnderFlowCbParams
cmdArgsStatus – [OUT] NULL
- Returns:
FVID2_SOK if successful, else suitable error code
Typedefs
-
typedef Fvid2_Frame *(*Dss_DispBufPrgmCbFxn)(Fvid2_Handle handle, Fvid2_Frame *curFrm, uint32_t isFrmRepeat, uint32_t frmRepeatCnt)
Display driver buffer program callback function prototype.
This callback is called by the driver when it is about to program the already queued buffer to the hardware. The driver returns the current frame pointer and the application can use this information to check if the buffer to be programmed is too old to display. If it decides so, the application can give a new frame buffer (blank frame) in the return parameter. Then the driver swaps this FVID2 frame pointer in its internal queue and program the new frame provided.
Note: Once the frame is swapped with the driver, the driver will not have any reference to the old frame. The ownership of the old frame is transferred to application and will not be returned in the driver dequeue operation.
User should assume that callbacks happen in ISR context and hence should apply rules relevant to ISR context when implementing callback functions, i.e. blocking APIs should not be called from callback. Users should also assume that interrupts are enabled when in callback context, i.e. other interrupt / callbacks can occur when a callback is under execution. User callback implementation should not be very long, since callback execution may block other drivers from executing. Typically it is recommended to set a semaphore or flag when callback happens and do the more involved callback handling in task context.
- Param handle:
[OUT] FVID2 handle for which the callback has occurred.
- Param curFrm:
[OUT] Current FVID2 frame about to be programmed.
- Param isFrmRepeat:
[OUT] Flag to indicate whether the current frame is already programmed in the hardware.
- Param frmRepeatCnt:
[OUT] This variable indicates the frame repeat count reflecting the hardware queue depth. In case of DSS, we have actual register and shadow register. Hence this value could be 1 or 2 for most of the cases. 1 means normal operating mode without frame repeat. 2 means both the shadow and current register have the same buffer i.e. the frame is getting repeated. There is a special case when this value is 0. This means the driver is trying to program the register in low latency mode in task context. But the success of the buffer getting accepted depends on when the queue is called with respect to VSYNC. If the Queue call is very near the VSYNC say 10 lines before VSYNC, the buffer programming will not be accepted. And the application should assume that the buffer will gets programmed in the next VSYNC only.
- Return:
The application can return the new FVID2 frame to be used for programming the hardware. If the application returns NULL no action is taken and the driver will go ahead and program the current frame to hardware.
-
typedef int32_t (*Dss_DispPipePrgmCbFxn)(Fvid2_Frame *progFrm, void *appData)
Display driver video pipe program callback function prototype.
This callback is called by the driver after it has programmed the already queued buffer to the hardware. The application can use this callback to simulate a VSYNC. The driver returns the programmed frame pointer to the application.
User should assume that callbacks happen in ISR context and hence should apply rules relevant to ISR context when implementing callback functions, i.e. blocking APIs should not be called from callback. User callback implementation should not be very long, since callback execution may block other drivers from executing. Typically it is recommended to set a semaphore or flag when callback happens and do the more involved callback handling in task context.
- Param progFrm:
[OUT] Current FVID2 frame that has been programmed.
- Param appData:
[OUT] Application’s private data.
- Return:
Status
-
typedef void (*Dss_DispUnderFlowCbFxn)(void *appData)
Video pipe underflow callback function prototype.
- Param appData:
[OUT] Application’s private data.
- Return:
None.
-
typedef void (*Dss_DispSafetyErrCbFxn)(uint32_t pipeId, uint32_t capturedSign, void *appData)
Video Pipe safety error callback function prototype.
- Param pipeId:
[OUT] Pipeline Id
- Param capturedSign:
[OUT] Captured signature
- Param appData:
[OUT] Application’s private data.
- Return:
None.
Functions
-
static inline void Dss_dispCreateParamsInit(Dss_DispCreateParams *createParams)
Dss_DispCreateParams structure init function.
- Parameters:
createParams – [IN]Pointer to Dss_DispCreateParams structure.
-
static inline void Dss_dispParamsInit(Dss_DispParams *dssParams)
Dss_DispParams structure init function.
- Parameters:
dssParams – [IN]Pointer to Dss_DispParams structure.
-
static inline void Dss_dispPipeMflagParamsInit(Dss_DispPipeMflagParams *pipeMflagParams)
Dss_DispPipeMflagParams structure init function.
- Parameters:
pipeMflagParams – [IN]Pointer to Dss_DispPipeMflagParams structure.
-
static inline void Dss_dispPipeSafetyChkParamsInit(Dss_DispPipeSafetyChkParams *pipeSafetyChkParams)
Dss_DispPipeSafetyChkParams structure init function.
- Parameters:
pipeSafetyChkParams – [IN]Pointer to Dss_DispPipeSafetyChkParams structure.
-
static inline void Dss_dispBufPrgmCbParamsInit(Dss_DispBufPrgmCbParams *bufPrgmCbParams)
Dss_DispBufPrgmCbParams structure init function.
- Parameters:
bufPrgmCbParams – [IN]Pointer to Dss_DispBufPrgmCbParams structure.
-
static inline void Dss_dispPipePrgmCbParamsInit(Dss_DispPipePrgmCbParams *pipePrgmCbParams)
Dss_DispPipePrgmCbParams structure init function.
- Parameters:
pipePrgmCbParams – [IN]Pointer to Dss_DispPipePrgmCbParams structure.
-
static inline void Dss_dispUnderFlowCbParamsInit(Dss_DispUnderFlowCbParams *underFlowCbParams)
Dss_DispUnderFlowCbParams structure init function.
- Parameters:
underFlowCbParams – [IN]Pointer to Dss_DispUnderFlowCbParams structure.
-
static inline void Dss_scRtParamsInit(Dss_ScRtParams *scRtParams)
Dss_ScRtParams structure init function.
- Parameters:
scRtParams – [IN]Pointer to Dss_ScRtParams structure.
-
static inline void Dss_frameRtParamsInit(Dss_FrameRtParams *frameRtParams)
Dss_FrameRtParams structure init function.
- Parameters:
frameRtParams – [IN]Pointer to Dss_FrameRtParams structure.
-
static inline void Dss_dispRtParamsInit(Dss_DispRtParams *rtParams)
Dss_DispRtParams structure init function.
- Parameters:
rtParams – [IN]Pointer to Dss_DispRtParams structure.
-
static inline void Dss_dispPipeCropParamsInit(Dss_DispPipeCropParams *cropParams)
-
struct Dss_DispCreateParams
- #include <dss_disp.h>
Structure containing display driver create arguments, used when calling Fvid2_create().
Public Members
-
uint32_t periodicCbEnable
Periodic Callback Enable. Possible values are TRUE or FALSE. TRUE: User callback passed during FVID2 create is called periodically. For progressive display, this interval is equal to VSYNC interval. For interlaced display, this interval is equal to twice the VSYNC interval as frames (two fields) are queued to the driver FALSE: User callback passed during FVID2 create is called only if one or more frames (requests) are available in the driver output queue for the application to dequeue
-
uint32_t progPipeVsyncEnable
Program Pipe at Vsync Enable. Possible values are TRUE or FALSE. TRUE: Pipe Registers will be updated only during VSYNC context. This essentially implies that start and stop will be dummy. The actual buffer programming will happen at next VSYNC and hence there will be one frame delay. In case of queue operation the frame will always be pushed to request queue. This means buffer will not be updated immediately even when driver is repeating frames in safe to push context. FALSE: This is the default behavior. Start and stop will be agnostic to Vsync and happen immediately. In case of queue operation, driver will display the new frame if there was frame repeat and queue is done during safe to push period.
-
uint32_t periodicCbEnable
-
struct Dss_DispCreateStatus
- #include <dss_disp.h>
Structure containing create status for the display driver. This should be passed as a status argument while creating the driver.
Public Members
-
int32_t retVal
Return status of create call
-
uint32_t standard
Video Port standard like 1080p, 720p, etc. to which the video pipe is connected. For valid values see Fvid2_Standard
-
uint32_t dispWidth
Width of the display at the Video Port in pixels
-
uint32_t dispHeight
Height of the display at the Video Port in lines
-
uint32_t minNumPrimeBuf
Minimum number of buffers to prime before starting display operation
-
int32_t retVal
-
struct Dss_DispPipeCropParams
- #include <dss_disp.h>
Structure containing video pipeline crop configuration.
Public Members
-
uint32_t cropEnable
Enable/disable the crop
-
Fvid2_EdgeCropConfig cropCfg
Crop configuration described using FVID2 type Fvid2_EdgeCropConfig
cropTop
:
Crop Top in lines, valid values are 0-31
cropBottom
:
Crop Bottom in lines, valid values are 0-31
cropLeft
:
Crop Left in pixels, valid values are 0-31
cropRight
:
Crop Right in pixels, valid values are 0-31
-
uint32_t cropEnable
-
struct Dss_DispParams
- #include <dss_disp.h>
Structure containing DSS parameters. This structure is used as an argument to IOCTL_DSS_DISP_SET_DSS_PARAMS.
Public Members
-
CSL_DssVidPipeCfg pipeCfg
Video pipeline configuration
-
CSL_DssVidPipeDmaCfg dmaCfg
Video pipeline DMA configuration
-
CSL_DssVidPipeAlphaCfg alphaCfg
Video pipeline alpha configuration
-
CSL_DssVidPipeVC1Cfg vc1Cfg
Video pipeline VC1 configuration
-
Dss_DispPipeCropParams cropParams
Video pipeline Crop parameters, used only for J7 platform
-
Fvid2_PosConfig layerPos
Position of the video buffer described using Fvid2_PosConfig
startX
:
X position of the video buffer The first pixel on the left of the screen has the X-position 0
startY
:
Y position of the video buffer The line at the top has the Y-position 0
-
CSL_DssVidPipeCfg pipeCfg
-
struct Dss_DispPipeMflagParams
- #include <dss_disp.h>
Structure containing Video Pipe Mflag Information. This structure is used as an argument to IOCTL_DSS_DISP_SET_PIPE_MFLAG_PARAMS.
Public Members
-
CSL_DssVidPipeMFlagCfg mflagCfg
Video pipeline mflag configuration. See CSL_DssVidPipeMFlagCfg for details
-
CSL_DssVidPipeMFlagCfg mflagCfg
-
struct Dss_DispCurrentStatus
- #include <dss_disp.h>
Structure containing current status of the display driver. This structure is used as an argument to IOCTL_DSS_DISP_GET_CURRENT_STATUS.
Public Members
-
uint32_t queueCount
Counter to keep track of how many requests are queued to the driver. Note: This counter will be reset at the time of driver create
-
uint32_t dequeueCount
Counter to keep track of how many requests are dequeued from the driver. Note: This counter will be reset at the time of driver create
-
uint32_t dispFrmCount
Counter to keep track of how many frames are displayed. For interlaced display, this is half of the actual field display. Note: This counter will be reset at the time of display start
-
uint32_t repeatFrmCount
Counter to keep track of how many frames are repeated when the application fails to queue buffer at the display rate. Note: This counter will be reset at the time of display start
-
uint32_t underflowCount
Counter to keep track of number of underflows Note: This counter will be reset at the time of driver create
-
uint32_t safetyViolationCount
Counter to keep track of number of safety violations Note: This counter will be reset at the time of driver create
-
uint32_t queueCount
-
struct Dss_DispPipeSafetyChkParams
- #include <dss_disp.h>
Structure containing Safety Check configuration of Video Port. This structure is used as an argument to IOCTL_DSS_DISP_SET_PIPE_SAFETY_CHK_PARAMS.
Public Members
-
uint32_t safetySignSeedVal
Safety Signature Seed Value
-
uint32_t referenceSign
Reference Safety Signature for Data Correctness Check
-
CSL_DssSafetyChkCfg safetyChkCfg
Safety Check Configuration. See CSL_DssSafetyChkCfg for details
-
Dss_DispSafetyErrCbFxn safetyErrCbFxn
Safety Error callback function
-
uint32_t capturedSign
Captured Signature returned to the application
-
void *appData
Private data of application
-
uint32_t safetySignSeedVal
-
struct Dss_DispBufPrgmCbParams
- #include <dss_disp.h>
Structure containing display buffer program callback parameters. This structure is used as an argument to IOCTL_DSS_DISP_REGISTER_BUF_PRGM_CB.
Public Members
-
Dss_DispBufPrgmCbFxn bufPrgmCbFxn
Application callback function to be called just before programming the hardware. A value of NULL will un-register the callback.
-
Dss_DispBufPrgmCbFxn bufPrgmCbFxn
-
struct Dss_DispPipePrgmCbParams
- #include <dss_disp.h>
Structure containing video pipe program callback parameters. This structure is used as an argument to IOCTL_DSS_DISP_REGISTER_PIPE_PRGM_CB.
Public Members
-
Dss_DispPipePrgmCbFxn pipePrgmCbFxn
Application callback function to be called just after programming the hardware. A value of NULL will un-register the callback.
-
void *appData
Private data of application
-
Dss_DispPipePrgmCbFxn pipePrgmCbFxn
-
struct Dss_DispUnderFlowCbParams
- #include <dss_disp.h>
Structure containing pipe under flow callback parameters. This structure is used as an argument to IOCTL_DSS_DISP_REGISTER_PIPE_UNDERFLOW_CB.
Public Members
-
Dss_DispUnderFlowCbFxn underFlowCbFxn
Sync lost callback function
-
void *appData
Private data of application
-
Dss_DispUnderFlowCbFxn underFlowCbFxn
-
struct Dss_ScRtParams
- #include <dss_disp.h>
Structure containing run time scaler configuration.
Public Members
-
uint32_t pixelInc
Pixel increment in terms of pixels.
-
uint32_t pixelInc
-
struct Dss_FrameRtParams
- #include <dss_disp.h>
Structure containing run time configuration per frame.
Public Members
-
uint32_t width
Width of the video frame or field in pixels.
-
uint32_t height
Height of the video frame or field in lines.
-
uint32_t pitch[FVID2_MAX_PLANES]
Pitch in bytes for each of the sub-buffers. This represents the difference between two consecutive line addresses in bytes. This is irrespective of whether the video is interlaced or progressive and whether the fields are merged or separated for interlaced video.
-
uint32_t dataFormat
Frame data Format. For valid values see Fvid2_DataFormat.
-
uint32_t width
-
struct Dss_DispRtParams
- #include <dss_disp.h>
Structure containing run time configuration of the display driver. This needs to be passed along with frame list to update any supported run time parameters.
Public Members
-
Fvid2_PosConfig *posCfg
Position Configuration used to position the Frame in the Overlay. Refer to Fvid2_PosConfig for details. Note: Pass NULL if no change is required
-
Dss_FrameRtParams *inFrmParams
RT Params for input frame. This parameter is used to change the frame width and height at runtime. Note that this is used only when the buffer dimension is smaller than the LCD size. When changing the size, the application should ensure that the startX/startY + frame size doesn’t exceed the display resolution. Refer to Dss_FrameRtParams for details. Note: Pass NULL if no change is required
-
Dss_FrameRtParams *outFrmParams
RT Params for output frame i.e. output of video pipeline. Only Width and height is valid in this structure. Refer to Dss_FrameRtParams for details. Note: Pass NULL if no change is required
-
Dss_ScRtParams *scParams
RT Params for scaler. Refer to Dss_ScRtParams for details. Note: Pass NULL if no change is required
-
Fvid2_PosConfig *posCfg