PDK API Guide for J721E
Display Pipe Driver

Introduction

This is DSS Display driver documentation

Sub Modules

 Display IOCTLs
 

Files

file  dss_disp.h
 DSS Display Driver interface file.
 

Data Structures

struct  Dss_DispCreateParams
 Structure containing display driver create arguments, used when calling Fvid2_create(). More...
 
struct  Dss_DispCreateStatus
 Structure containing create status for the display driver. This should be passed as a status argument while creating the driver. More...
 
struct  Dss_DispPipeCropParams
 Structure containing video pipeline crop configuration. More...
 
struct  Dss_DispParams
 Structure containing DSS parameters. This structure is used as an argument to IOCTL_DSS_DISP_SET_DSS_PARAMS. More...
 
struct  Dss_DispPipeMflagParams
 Structure containing Video Pipe Mflag Information. This structure is used as an argument to IOCTL_DSS_DISP_SET_PIPE_MFLAG_PARAMS. More...
 
struct  Dss_DispCurrentStatus
 Structure containing current status of the display driver. This structure is used as an argument to IOCTL_DSS_DISP_GET_CURRENT_STATUS. More...
 
struct  Dss_DispPipeSafetyChkParams
 Structure containing Safety Check configuration of Video Port. This structure is used as an argument to IOCTL_DSS_DISP_SET_PIPE_SAFETY_CHK_PARAMS. More...
 
struct  Dss_DispBufPrgmCbParams
 Structure containing display buffer program callback parameters. This structure is used as an argument to IOCTL_DSS_DISP_REGISTER_BUF_PRGM_CB. More...
 
struct  Dss_DispPipePrgmCbParams
 Structure containing video pipe program callback parameters. This structure is used as an argument to IOCTL_DSS_DISP_REGISTER_PIPE_PRGM_CB. More...
 
struct  Dss_DispUnderFlowCbParams
 Structure containing pipe under flow callback parameters. This structure is used as an argument to IOCTL_DSS_DISP_REGISTER_PIPE_UNDERFLOW_CB. More...
 
struct  Dss_ScRtParams
 Structure containing run time scaler configuration. More...
 
struct  Dss_FrameRtParams
 Structure containing run time configuration per frame. More...
 
struct  Dss_DispRtParams
 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. More...
 

Functions

static void Dss_dispCreateParamsInit (Dss_DispCreateParams *createParams)
 Dss_DispCreateParams structure init function. More...
 
static void Dss_dispParamsInit (Dss_DispParams *dssParams)
 Dss_DispParams structure init function. More...
 
static void Dss_dispPipeMflagParamsInit (Dss_DispPipeMflagParams *pipeMflagParams)
 Dss_DispPipeMflagParams structure init function. More...
 
static void Dss_dispPipeSafetyChkParamsInit (Dss_DispPipeSafetyChkParams *pipeSafetyChkParams)
 Dss_DispPipeSafetyChkParams structure init function. More...
 
static void Dss_dispBufPrgmCbParamsInit (Dss_DispBufPrgmCbParams *bufPrgmCbParams)
 Dss_DispBufPrgmCbParams structure init function. More...
 
static void Dss_dispPipePrgmCbParamsInit (Dss_DispPipePrgmCbParams *pipePrgmCbParams)
 Dss_DispPipePrgmCbParams structure init function. More...
 
static void Dss_dispUnderFlowCbParamsInit (Dss_DispUnderFlowCbParams *underFlowCbParams)
 Dss_DispUnderFlowCbParams structure init function. More...
 
static void Dss_scRtParamsInit (Dss_ScRtParams *scRtParams)
 Dss_ScRtParams structure init function. More...
 
static void Dss_frameRtParamsInit (Dss_FrameRtParams *frameRtParams)
 Dss_FrameRtParams structure init function. More...
 
static void Dss_dispRtParamsInit (Dss_DispRtParams *rtParams)
 Dss_DispRtParams structure init function. More...
 
static void Dss_dispPipeCropParamsInit (Dss_DispPipeCropParams *cropParams)
 

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. More...
 
typedef int32_t(* Dss_DispPipePrgmCbFxn) (Fvid2_Frame *progFrm, void *appData)
 Display driver video pipe program callback function prototype. More...
 
typedef void(* Dss_DispUnderFlowCbFxn) (void *appData)
 Video pipe underflow callback function prototype. More...
 
typedef void(* Dss_DispSafetyErrCbFxn) (uint32_t capturedSign, void *appData)
 Video Pipe safety error callback function prototype. More...
 

Macros

#define DSS_BUFFER_ALIGNMENT   (16U)
 DSS video buffer alignment. All application buffer address and line pitch should be aligned to this byte boundary. More...
 

Macro Definition Documentation

◆ DSS_BUFFER_ALIGNMENT

#define DSS_BUFFER_ALIGNMENT   (16U)

DSS video buffer alignment. All application buffer address and line pitch should be aligned to this byte boundary.

Typedef Documentation

◆ Dss_DispBufPrgmCbFxn

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.

Parameters
handle[OUT] FVID2 handle for which the callback has occurred.
curFrm[OUT] Current FVID2 frame about to be programmed.
isFrmRepeat[OUT] Flag to indicate whether the current frame is already programmed in the hardware.
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.
Returns
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.

◆ Dss_DispPipePrgmCbFxn

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.

Parameters
progFrm[OUT] Current FVID2 frame that has been programmed.
appData[OUT] Application's private data.
Returns
Status

◆ Dss_DispUnderFlowCbFxn

typedef void(* Dss_DispUnderFlowCbFxn) (void *appData)

Video pipe underflow callback function prototype.

Parameters
appData[OUT] Application's private data.
Returns
None.

◆ Dss_DispSafetyErrCbFxn

typedef void(* Dss_DispSafetyErrCbFxn) (uint32_t capturedSign, void *appData)

Video Pipe safety error callback function prototype.

Parameters
capturedSign[OUT] Captured signature
appData[OUT] Application's private data.
Returns
None.

Function Documentation

◆ Dss_dispCreateParamsInit()

static void Dss_dispCreateParamsInit ( Dss_DispCreateParams createParams)
inlinestatic

Dss_DispCreateParams structure init function.

Parameters
createParams[IN]Pointer to Dss_DispCreateParams structure.
Returns
None

◆ Dss_dispParamsInit()

static void Dss_dispParamsInit ( Dss_DispParams dssParams)
inlinestatic

Dss_DispParams structure init function.

Parameters
dssParams[IN]Pointer to Dss_DispParams structure.
Returns
None

◆ Dss_dispPipeMflagParamsInit()

static void Dss_dispPipeMflagParamsInit ( Dss_DispPipeMflagParams pipeMflagParams)
inlinestatic

Dss_DispPipeMflagParams structure init function.

Parameters
pipeMflagParams[IN]Pointer to Dss_DispPipeMflagParams structure.
Returns
None

◆ Dss_dispPipeSafetyChkParamsInit()

static void Dss_dispPipeSafetyChkParamsInit ( Dss_DispPipeSafetyChkParams pipeSafetyChkParams)
inlinestatic

Dss_DispPipeSafetyChkParams structure init function.

Parameters
pipeSafetyChkParams[IN]Pointer to Dss_DispPipeSafetyChkParams structure.
Returns
None

◆ Dss_dispBufPrgmCbParamsInit()

static void Dss_dispBufPrgmCbParamsInit ( Dss_DispBufPrgmCbParams bufPrgmCbParams)
inlinestatic

Dss_DispBufPrgmCbParams structure init function.

Parameters
bufPrgmCbParams[IN]Pointer to Dss_DispBufPrgmCbParams structure.
Returns
None

◆ Dss_dispPipePrgmCbParamsInit()

static void Dss_dispPipePrgmCbParamsInit ( Dss_DispPipePrgmCbParams pipePrgmCbParams)
inlinestatic

Dss_DispPipePrgmCbParams structure init function.

Parameters
pipePrgmCbParams[IN]Pointer to Dss_DispPipePrgmCbParams structure.
Returns
None

◆ Dss_dispUnderFlowCbParamsInit()

static void Dss_dispUnderFlowCbParamsInit ( Dss_DispUnderFlowCbParams underFlowCbParams)
inlinestatic

Dss_DispUnderFlowCbParams structure init function.

Parameters
underFlowCbParams[IN]Pointer to Dss_DispUnderFlowCbParams structure.
Returns
None

◆ Dss_scRtParamsInit()

static void Dss_scRtParamsInit ( Dss_ScRtParams scRtParams)
inlinestatic

Dss_ScRtParams structure init function.

Parameters
scRtParams[IN]Pointer to Dss_ScRtParams structure.
Returns
None

◆ Dss_frameRtParamsInit()

static void Dss_frameRtParamsInit ( Dss_FrameRtParams frameRtParams)
inlinestatic

Dss_FrameRtParams structure init function.

Parameters
frameRtParams[IN]Pointer to Dss_FrameRtParams structure.
Returns
None

◆ Dss_dispRtParamsInit()

static void Dss_dispRtParamsInit ( Dss_DispRtParams rtParams)
inlinestatic

Dss_DispRtParams structure init function.

Parameters
rtParams[IN]Pointer to Dss_DispRtParams structure.
Returns
None

◆ Dss_dispPipeCropParamsInit()

static void Dss_dispPipeCropParamsInit ( Dss_DispPipeCropParams cropParams)
inlinestatic