PSOC E8XXGP Device Support Library

General Description

Following section describes the functions available in graphics subsystem.

For GPU specific functions,Please refer to VGLite API Reference Manual

Display controller functionality is taken care with high level graphics API implementation. If user is looking for any specific functionality using direct display controller API directly, please refer to DPU API reference guide

Functions

cy_en_gfx_status_t Cy_GFXSS_Init (GFXSS_Type *base, cy_stc_gfx_config_t *config, cy_stc_gfx_context_t *context)
 Initializes graphics pipeline. More...
 
cy_en_gfx_status_t Cy_GFXSS_SleepCallback (cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)
 Sleep callback implementation for graphics sub system. More...
 
cy_en_syspm_status_t Cy_GFXSS_DeepSleepCallback (cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)
 Initializes graphics pipeline. More...
 
void Cy_GFXSS_Interrupt (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 The Interrupt Service Routine for the Graphics sub sytem. More...
 
void Cy_GFXSS_Clear_DC_Interrupt (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 The Interrupt Service Routine to clear Display Controller interrupts. More...
 
void Cy_GFXSS_Clear_GPU_Interrupt (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 The Interrupt Service Routine to clear GPU interrupts. More...
 
__STATIC_INLINE uint32_t Cy_GFXSS_Get_DC_Interrupt_Status (GFXSS_Type *base)
 Gets Display Controller interrupt status. More...
 
__STATIC_INLINE uint32_t Cy_GFXSS_Get_GPU_Interrupt_Status (GFXSS_Type *base)
 Gets GPU interrupt status. More...
 
__STATIC_INLINE cy_en_gfx_rlad_status_t Cy_GFXSS_Get_RLAD_Status (GFXSS_Type *base)
 Gets RLAD decoder status within Display Controller. More...
 
cy_en_gfx_status_t Cy_GFXSS_Set_FrameBuffer (GFXSS_Type *base, uint32_t *gfx_layer_buffer, cy_stc_gfx_context_t *context)
 Sets Video/Graphics layer buffer address. More...
 
cy_en_gfx_status_t Cy_GFXSS_Set_FrameBuffer_YUV (GFXSS_Type *base, uint32_t *y_buffer, uint32_t *uv_buffer, cy_stc_gfx_context_t *context)
 Sets Video/Graphics layer YUV buffer addresses. More...
 
uint32_t * Cy_GFXSS_Get_FrameBufferAddress (GFXSS_Type *base)
 Gets the video/graphics layer buffer address used for transferring frame through Display Controller. More...
 
cy_en_gfx_status_t Cy_GFXSS_Set_Overlay0 (GFXSS_Type *base, uint32_t *overlay0_buffer, cy_stc_gfx_context_t *context)
 Sets Overlay0 buffer address. More...
 
cy_en_gfx_status_t Cy_GFXSS_Set_Overlay0_YUV (GFXSS_Type *base, uint32_t *y_buffer, uint32_t *uv_buffer, cy_stc_gfx_context_t *context)
 Sets Overlay0 YUV buffer addresses. More...
 
cy_en_gfx_status_t Cy_GFXSS_Set_Overlay1 (GFXSS_Type *base, uint32_t *overlay1_buffer, cy_stc_gfx_context_t *context)
 Sets Overlay1 buffer address. More...
 
cy_en_gfx_status_t Cy_GFXSS_Set_Layer_Enabled (GFXSS_Type *base, cy_en_gfx_layer_type_t layer_id, bool enable)
 Enable/Disable the selected Layer. More...
 
cy_en_gfx_status_t Cy_GFXSS_DeInit (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 DeInitializes graphics pipeline. More...
 
cy_en_gfx_status_t Cy_GFXSS_RLAD_SetImage (GFXSS_Type *base, cy_stc_gfx_rlad_cfg_t *rlad_cfg, cy_stc_gfx_context_t *context)
 Set image configuration for RLAD. More...
 
cy_en_gfx_status_t Cy_GFXSS_RLAD_Enable (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 Enable RLAD in graphics pipeline. More...
 
cy_en_gfx_status_t Cy_GFXSS_RLAD_Disable (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 Disable RLAD in graphics pipeline. More...
 
cy_en_gfx_status_t Cy_GFXSS_Enable_GPU (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 Enable GPU for composition. More...
 
cy_en_gfx_status_t Cy_GFXSS_Disable_GPU (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 Disable GPU and let Display controller refresh display based on already composed buffer stored in frame buffer address. More...
 
cy_en_gfx_status_t Cy_GFXSS_Transfer_Frame (GFXSS_Type *base, cy_stc_gfx_context_t *context)
 Transfer frame to display in DBI command mode. More...
 
cy_en_gfx_status_t Cy_GFXSS_TransferPartialFrame (GFXSS_Type *base, uint32_t start_line_offset, uint32_t end_line_offset, cy_stc_gfx_context_t *context)
 Transfer partial frame to display in DBI command mode. More...
 
__STATIC_INLINE void Cy_GFXSS_Enable_GPU_Interrupt (GFXSS_Type *base)
 Enables GPU interrupt. More...
 
__STATIC_INLINE void Cy_GFXSS_Disable_GPU_Interrupt (GFXSS_Type *base)
 Disables GPU interrupt. More...
 

Function Documentation

◆ Cy_GFXSS_Init()

cy_en_gfx_status_t Cy_GFXSS_Init ( GFXSS_Type base,
cy_stc_gfx_config_t config,
cy_stc_gfx_context_t context 
)

Initializes graphics pipeline.

Parameters
basePointer to the graphics sub system base address.
configPointer to the pin config structure base address.
contextcontext information used by the driver.
Returns
Initialization status.

< Display controller configuration

< GPU configuration is optional

< per lane speed in mbps

< MIPI DSI configuration

< device max DPHY clock in MHz unit

< Command mode/Video mode

< Additional mode information

< Display parameters

◆ Cy_GFXSS_SleepCallback()

cy_en_gfx_status_t Cy_GFXSS_SleepCallback ( cy_stc_syspm_callback_params_t callbackParams,
cy_en_syspm_callback_mode_t  mode 
)

Sleep callback implementation for graphics sub system.

Parameters
*callbackParamsA cy_stc_syspm_callback_params_t structure with callback parameters that consists of mode, base and context fields: *base - a graphics register structure pointer. *context - context for the call-back function. mode
  • CY_SYSPM_CHECK_READY - no action for this state.
  • CY_SYSPM_CHECK_FAIL - no action for this state.
  • CY_SYSPM_BEFORE_TRANSITION -
  • CY_SYSPM_AFTER_TRANSITION -
modeCallback mode, see cy_en_syspm_callback_mode_t
Returns
cy_en_syspm_status_t

◆ Cy_GFXSS_DeepSleepCallback()

cy_en_syspm_status_t Cy_GFXSS_DeepSleepCallback ( cy_stc_syspm_callback_params_t callbackParams,
cy_en_syspm_callback_mode_t  mode 
)

Initializes graphics pipeline.

Parameters
*callbackParamsA cy_stc_syspm_callback_params_t structure with callback parameters that consists of mode, base and context fields: *base - a graphics register structure pointer. *context - context for the call-back function. mode
  • CY_SYSPM_CHECK_READY - no action for this state.
  • CY_SYSPM_CHECK_FAIL - no action for this state.
  • CY_SYSPM_BEFORE_TRANSITION -
  • CY_SYSPM_AFTER_TRANSITION -
modeCallback mode, see cy_en_syspm_callback_mode_t
Returns
cy_en_syspm_status_t

◆ Cy_GFXSS_Interrupt()

void Cy_GFXSS_Interrupt ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

The Interrupt Service Routine for the Graphics sub sytem.

Parameters
baseHolds the base address of the Graphics block registers.
contextcontext information used by the driver.

◆ Cy_GFXSS_Clear_DC_Interrupt()

void Cy_GFXSS_Clear_DC_Interrupt ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

The Interrupt Service Routine to clear Display Controller interrupts.

Parameters
baseHolds the base address of the Graphics block registers.
contextcontext information used by the driver.

◆ Cy_GFXSS_Clear_GPU_Interrupt()

void Cy_GFXSS_Clear_GPU_Interrupt ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

The Interrupt Service Routine to clear GPU interrupts.

Parameters
baseHolds the base address of the Graphics block registers.
contextcontext information used by the driver.

◆ Cy_GFXSS_Get_DC_Interrupt_Status()

__STATIC_INLINE uint32_t Cy_GFXSS_Get_DC_Interrupt_Status ( GFXSS_Type base)

Gets Display Controller interrupt status.

Parameters
baseHolds the base address of the Graphics block registers.
Returns
Returns a word with bits set at positions corresponding to the interrupts triggered in the display controller.

◆ Cy_GFXSS_Get_GPU_Interrupt_Status()

__STATIC_INLINE uint32_t Cy_GFXSS_Get_GPU_Interrupt_Status ( GFXSS_Type base)

Gets GPU interrupt status.

Parameters
baseHolds the base address of the Graphics block registers.
Returns
Returns a word with bits set at positions corresponding to the interrupts triggered in the GPU.

◆ Cy_GFXSS_Get_RLAD_Status()

__STATIC_INLINE cy_en_gfx_rlad_status_t Cy_GFXSS_Get_RLAD_Status ( GFXSS_Type base)

Gets RLAD decoder status within Display Controller.

Parameters
baseHolds the base address of the Graphics block registers.
Returns
Returns cy_en_gfx_rlad_status_t indicating decoder status.

◆ Cy_GFXSS_Set_FrameBuffer()

cy_en_gfx_status_t Cy_GFXSS_Set_FrameBuffer ( GFXSS_Type base,
uint32_t *  gfx_layer_buffer,
cy_stc_gfx_context_t context 
)

Sets Video/Graphics layer buffer address.

Parameters
baseHolds the base address of the Graphics block registers.
gfx_layer_bufferPointer to the frame buffer address to be used by Display Controller for transferring frame.
contextPointer to the graphics config structure base address.
Returns
CY_GFX_SUCCESS/CY_GFX_BAD_PARAM
Note
Framebuffer base address and stride for linear data should be 128-byte aligned.

◆ Cy_GFXSS_Set_FrameBuffer_YUV()

cy_en_gfx_status_t Cy_GFXSS_Set_FrameBuffer_YUV ( GFXSS_Type base,
uint32_t *  y_buffer,
uint32_t *  uv_buffer,
cy_stc_gfx_context_t context 
)

Sets Video/Graphics layer YUV buffer addresses.

Parameters
baseHolds the base address of the Graphics block registers.
y_bufferPointer to the Y buffer address to be used by Display Controller for transferring frame.
uv_bufferPointer to the UV buffer address to be used by Display Controller for transferring frame.
contextPointer to the graphics config structure base address.
Returns
CY_GFX_SUCCESS/CY_GFX_BAD_PARAM
Note
YUV Framebuffer base address and stride for linear data should be 64-byte aligned.

◆ Cy_GFXSS_Get_FrameBufferAddress()

uint32_t * Cy_GFXSS_Get_FrameBufferAddress ( GFXSS_Type base)

Gets the video/graphics layer buffer address used for transferring frame through Display Controller.

Returns
frame buffer address.

◆ Cy_GFXSS_Set_Overlay0()

cy_en_gfx_status_t Cy_GFXSS_Set_Overlay0 ( GFXSS_Type base,
uint32_t *  overlay0_buffer,
cy_stc_gfx_context_t context 
)

Sets Overlay0 buffer address.

Parameters
baseHolds the base address of the Graphics block registers.
overlay0_bufferPointer to the overlay0 buffer address to be used by Display Controller for transferring frame.
contextPointer to the graphics config structure base address.
Returns
CY_GFX_SUCCESS/CY_GFX_BAD_PARAM

◆ Cy_GFXSS_Set_Overlay0_YUV()

cy_en_gfx_status_t Cy_GFXSS_Set_Overlay0_YUV ( GFXSS_Type base,
uint32_t *  y_buffer,
uint32_t *  uv_buffer,
cy_stc_gfx_context_t context 
)

Sets Overlay0 YUV buffer addresses.

Parameters
baseHolds the base address of the Graphics block registers.
y_bufferPointer to the Y buffer address to be used by Display Controller for transferring frame.
uv_bufferPointer to the UV buffer address to be used by Display Controller for transferring frame.
contextPointer to the graphics config structure base address.
Returns
CY_GFX_SUCCESS/CY_GFX_BAD_PARAM

◆ Cy_GFXSS_Set_Overlay1()

cy_en_gfx_status_t Cy_GFXSS_Set_Overlay1 ( GFXSS_Type base,
uint32_t *  overlay1_buffer,
cy_stc_gfx_context_t context 
)

Sets Overlay1 buffer address.

Parameters
baseHolds the base address of the Graphics block registers.
overlay1_bufferPointer to the overlay1 buffer address to be used by Display Controller for transferring frame.
contextPointer to the graphics config structure base address.
Returns
CY_GFX_SUCCESS/CY_GFX_BAD_PARAM

◆ Cy_GFXSS_Set_Layer_Enabled()

cy_en_gfx_status_t Cy_GFXSS_Set_Layer_Enabled ( GFXSS_Type base,
cy_en_gfx_layer_type_t  layer_id,
bool  enable 
)

Enable/Disable the selected Layer.

Parameters
baseHolds the base address of the Graphics block registers.
layer_idLayer type to be enabled/disabled.
enableEnable/Disable visibility of the Layer
Returns
SUCCESS/FAILURE.

◆ Cy_GFXSS_DeInit()

cy_en_gfx_status_t Cy_GFXSS_DeInit ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

DeInitializes graphics pipeline.

Parameters
baseHolds the base address of the Graphics block registers.
contextcontext information used by the driver.
Returns
SUCCESS/FAILURE.

◆ Cy_GFXSS_RLAD_SetImage()

cy_en_gfx_status_t Cy_GFXSS_RLAD_SetImage ( GFXSS_Type base,
cy_stc_gfx_rlad_cfg_t rlad_cfg,
cy_stc_gfx_context_t context 
)

Set image configuration for RLAD.

Parameters
basePointer to the graphics sub system base address.
rlad_cfgPointer to the RLAD configuration structure.
contextcontext information used by the driver.
Returns
SUCESS/TIMEOUT status.

◆ Cy_GFXSS_RLAD_Enable()

cy_en_gfx_status_t Cy_GFXSS_RLAD_Enable ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

Enable RLAD in graphics pipeline.

Parameters
basePointer to the graphics sub system base address.
contextcontext information used by the driver.
Returns
SUCESS/FAILURE

◆ Cy_GFXSS_RLAD_Disable()

cy_en_gfx_status_t Cy_GFXSS_RLAD_Disable ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

Disable RLAD in graphics pipeline.

Parameters
basePointer to the graphics sub system base address.
contextcontext information used by the driver.
Returns
Initialization status.

◆ Cy_GFXSS_Enable_GPU()

cy_en_gfx_status_t Cy_GFXSS_Enable_GPU ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

Enable GPU for composition.

Parameters
basePointer to the graphics sub system base address.
contextcontext information used by the driver.
Returns
SUCESS/TIMEOUT status.

◆ Cy_GFXSS_Disable_GPU()

cy_en_gfx_status_t Cy_GFXSS_Disable_GPU ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

Disable GPU and let Display controller refresh display based on already composed buffer stored in frame buffer address.

Parameters
basePointer to the graphics sub system base address.
contextcontext information used by the driver.
Returns
SUCESS/TIMEOUT status.

◆ Cy_GFXSS_Transfer_Frame()

cy_en_gfx_status_t Cy_GFXSS_Transfer_Frame ( GFXSS_Type base,
cy_stc_gfx_context_t context 
)

Transfer frame to display in DBI command mode.

Parameters
basePointer to the graphics sub system base address.
contextcontext information used by the driver.
Returns
SUCESS/TIMEOUT status.

◆ Cy_GFXSS_TransferPartialFrame()

cy_en_gfx_status_t Cy_GFXSS_TransferPartialFrame ( GFXSS_Type base,
uint32_t  start_line_offset,
uint32_t  end_line_offset,
cy_stc_gfx_context_t context 
)

Transfer partial frame to display in DBI command mode.

Parameters
basePointer to the graphics sub system base address.
start_line_offsetStart line offset from the top of the frame buffer, beginning of partial frame.
end_line_offsetEnd line offset from the top of the frame buffer, end of partial frame.
contextcontext information used by the driver.
Returns
SUCESS/TIMEOUT status.

◆ Cy_GFXSS_Enable_GPU_Interrupt()

__STATIC_INLINE void Cy_GFXSS_Enable_GPU_Interrupt ( GFXSS_Type base)

Enables GPU interrupt.

Parameters
basePointer to the graphics sub system base address.

◆ Cy_GFXSS_Disable_GPU_Interrupt()

__STATIC_INLINE void Cy_GFXSS_Disable_GPU_Interrupt ( GFXSS_Type base)

Disables GPU interrupt.

Parameters
basePointer to the graphics sub system base address.