Go to the documentation of this file.
68 #define HAL_GDC_CFG_LAYER_EXISTS(i) (1U << (8 + (i)*4))
69 #define HAL_GDC_CFG_LAYER_BLENDER(i) (1U << (8 + (i)*4 + 1))
70 #define HAL_GDC_CFG_LAYER_SCALER(i) (1U << (8 + (i)*4 + 2))
71 #define HAL_GDC_CFG_LAYER_GAMMA(i) (1U << (8 + (i)*4 + 3))
73 #define HAL_GDC_LAYER_ENABLE (1U << 31)
74 #define HAL_GDC_ENABLE (1U << 31)
75 #define HAL_GDC_CFG_L3_YUVMEM (1U << 31)
76 #define HAL_GDC_EN_L3PIX (1U << 31)
77 #define DC_STATUS_rsrvd_0 (1U << 31)
78 #define hal_gdc_clkctrl_cg_l3_bus_clk (1U << 31)
438 void hal_gdc_timing(
int resx,
int fpx,
int blx,
int bpx,
int resy,
int fpy,
int bly,
int bpy);
uintptr_t baseaddr_phys
Physical Address.
@ HAL_GDC_EN_L2BUS
layer 2 bus clock clock-gater bypass
@ HAL_GDC_LAYER_AHBLOCK
Activate HLOCK signal on AHB DMAs.
@ HAL_GDC_CFG_PROGR_CURSOR
Programmable Cursor enabled.
@ HAL_GDC_CFG_PALETTE
Global Gamma enabled.
void hal_gdc_cursor_xy(int x, int y)
Set the location of the cursor.
@ hal_gdc_clkctrl_cg_rsrvd_8
Reserved bit.
@ hal_gdc_clkctrl_cg_rsrvd_19
Reserved bit.
@ DC_STATUS_dbi_cs
DBI/SPI i/f active transaction.
uint32_t u_stride
U Stride.
uint32_t resy
Resolution Y.
@ HAL_GDC_EN_L3BUS
layer 3 bus clock clock-gater bypass
int hal_gdc_init(void)
Initialize hal_gdc library.
@ hal_gdc_clkctrl_cg_rsrvd_15
Reserved bit.
hal_gdc_blend_mode_t
Layer blending mode definition.
@ DC_STATUS_LASTROW
last scan-row
@ HAL_GDC_S_12BIT
S_12BIT.
Header file containing functions prototypes of Graphics library.
@ hal_gdc_clkctrl_cg_rsrvd_13
Reserved bit.
@ DC_STATUS_rsrvd_1
Reserved bit.
void hal_gdc_set_cursor_img(unsigned char *img)
Set programmable cursor image (32x32 pixels)
uint32_t v_stride
V Stride.
Display parameters definition.
@ hal_gdc_clkctrl_cg_l2_pix_clk
layer 2 pixel clock clock-gater bypass
@ DC_STATUS_rsrvd_9
Reserved bit.
uint32_t bpx
Back Porch X.
@ HAL_GDC_EN_L0PIX
layer 0 pixel clock clock-gater bypass
uint32_t hal_gdc_get_crc(void)
Read CRC Checksum Register.
uint32_t hal_gdc_get_config(void)
Read Configuration Register.
@ HAL_GDC_BL_SRC_OVER
Sa + Da * (1 - Sa)
@ HAL_GDC_CFG_L1_YUVMEM
layer 1 has YUV Memory
uint32_t fpy
Front Porch Y.
uint32_t resy
Resolution Y.
@ HAL_GDC_LVDSPADS
LVDSPADS.
hal_gdc_videomode_t
Layer video mode definition.
@ hal_gdc_clkctrl_cg_bypass_clk
Clock-gaters bypass.
hal_gdc_config_t
Layer configuration definition.
@ DC_STATUS_dbi_cmd_ready
DBI i/f fifo full.
@ DC_STATUS_DPI_Csync
DPI C-sync.
@ HAL_GDC_T_16BIT
T_16BIT.
@ hal_gdc_clkctrl_cg_l1_pix_clk
layer 1 pixel clock clock-gater bypass
hal_gdc_format_t
Layer color mode definition.
uint32_t hal_gdc_get_col_mode(void)
Read Color Mode Register.
@ DC_STATUS_rsrvd_12
Reserved bit.
@ HAL_GDC_CFG_SPI
SPI interface is enabled.
@ HAL_GDC_DITHER15
DITHER 15-bit.
@ DC_STATUS_mmu_error
not implemented
uint32_t fpx
Front Porch X.
@ HAL_GDC_P_RGB3_16B
P_RGB3.
@ HAL_GDC_EN_PIXCLK
Resolution X.
@ hal_gdc_clkctrl_cg_clk_en
Enable clock divider.
void hal_gdc_clkdiv(int div, int div2, int dma_prefetch, int phase)
Set the built-in Clock Dividers and DMA Line Prefetch.
@ HAL_GDC_CFG_L2_BLENDER
Layer 2 has blender.
@ HAL_GDC_BF_INVGBLALPHA
Inverted Global.
@ hal_gdc_clkctrl_cg_l0_bus_clk
layer 0 bus clock clock-gater bypass
@ hal_gdc_clkctrl_cg_l0_pix_clk
layer 0 pixel clock clock-gater bypass
@ HAL_GDC_OUTP_OFF
OUTP_OFF.
int hal_gdc_stride_size(hal_gdc_format_t format, int width)
Get stride size in bytes.
hal_gdc_clkctrl_t
DC clock control definition.
@ hal_gdc_clkctrl_cg_rsrvd_20
Reserved bit.
@ DC_STATUS_rsrvd_6
Reserved bit.
@ DC_STATUS_dbi_busy
DBI i/f busy.
@ HAL_GDC_CFG_DITHERING
Dithering enabled.
@ hal_gdc_clkctrl_cg_rsrvd_12
Reserved bit.
@ DC_STATUS_vsync_te
Vsync or Tearing.
@ HAL_GDC_LVDS_ISP8
LVDS_ISP8.
@ DC_STATUS_frame_end
End of frame pulse.
void hal_gdc_request_vsync_non_blocking(void)
Request a VSync Interrupt without blocking.
uint32_t resx
Resolution X.
@ hal_gdc_clkctrl_cg_regfil_clk
RegFile clock-gaters bypass.
@ DC_STATUS_rsrvd_11
Reserved bit.
@ hal_gdc_clkctrl_cg_l2_bus_clk
layer 2 bus clock clock-gater bypass
@ HAL_GDC_CFG_L0_BLENDER
Layer 0 has blender.
Layer parameters definition.
void * baseaddr_virt
Virtual Address.
@ HAL_GDC_SCALE_NN
Activate Bilinear Filter.
@ DC_STATUS_rsrvd_2
Reserved bit.
@ hal_gdc_clkctrl_cg_rsrvd_16
Reserved bit.
@ HAL_GDC_FORCE_A
Force Alpha.
@ HAL_GDC_ARGB8888
ARGB8888.
@ HAL_GDC_CFG_L2_YUVMEM
layer 2 has YUV Memory
hal_gdc_status_t
DC status definition.
@ DC_STATUS_rsrvd_14
Reserved bit.
@ DC_STATUS_rsrvd_10
Reserved bit.
void hal_gdc_set_bgcolor(uint32_t rgba)
Set hal_gdc Background Color.
@ HAL_GDC_LAYER_DISABLE
Disable Layer.
@ DC_STATUS_rsrvd_15
Reserved bit.
@ HAL_GDC_CFG_L0_GAMMA
Layer 0 has gamma LUT.
@ hal_gdc_clkctrl_cg_rsrvd_14
Reserved bit.
@ HAL_GDC_CLKOUTDIV
CLKOUTDIV.
@ HAL_GDC_PALETTE
PALETTE.
@ HAL_GDC_BGRA8888
BGRA8888.
@ DC_STATUS_rsrvd_3
Reserved bit.
@ hal_gdc_clkctrl_cg_rsrvd_5
Reserved bit.
@ HAL_GDC_RGBA8888
RGBA8888.
@ HAL_GDC_BL_SRC_IN
Sa * Da.
@ hal_gdc_clkctrl_cg_rsrvd_6
Reserved bit.
@ HAL_GDC_CFG_FORMAT
Formatting enabled.
@ HAL_GDC_CFG_L1_ENABLED
Layer 1 enabled.
@ hal_gdc_clkctrl_cg_rsrvd_3
Reserved bit.
@ HAL_GDC_EN_L1BUS
layer 1 bus clock clock-gater bypass
@ HAL_GDC_P_RGB3_18B1
P_RGB3.
@ DC_STATUS_rsrvd_5
Reserved bit.
@ HAL_GDC_EN_L0BUS
layer 0 bus clock clock-gater bypass
void hal_gdc_set_layer_addr(int layer_no, uintptr_t addr)
Set the physical address of a layer.
@ HAL_GDC_BF_INVDSTALPHA
Inverted Destination.
@ HAL_GDC_MIPI_OFF
MIPI_OFF.
@ HAL_GDC_CFG_L1_SCALER
Layer 1 has scaler.
uint8_t blendmode
Blending Mode.
@ hal_gdc_clkctrl_cg_rsrvd_17
Reserved bit.
@ DC_STATUS_underflow
underflow signal
@ HAL_GDC_CFG_DBIB
DBI Type-B interface enabled.
@ DC_STATUS_dbi_pending_cmd
pending command
@ HAL_GDC_RGBA4444
RGBA4444.
@ HAL_GDC_CFG_L3_SCALER
Layer 3 has scaler.
@ HAL_GDC_BL_DST_OVER
Sa * (1 - Da) + Da.
@ HAL_GDC_CFG_L0_SCALER
Layer 0 has scaler.
@ HAL_GDC_EN_L1PIX
layer 1 pixel clock clock-gater bypass
@ DC_STATUS_rsrvd_4
Reserved bit.
@ hal_gdc_clkctrl_cg_l1_bus_clk
layer 1 bus clock clock-gater bypass
@ HAL_GDC_CFG_YUVOUT
RGB to YUV converted.
@ hal_gdc_clkctrl_cg_rsrvd_10
Reserved bit.
@ HAL_GDC_BL_DST_IN
Da * Sa.
int hal_gdc_get_palette(uint32_t index)
Reads an entry from the lut8 Palatte Gamma table.
void hal_gdc_timing(int resx, int fpx, int blx, int bpx, int resy, int fpy, int bly, int bpy)
Set Display timing parameters.
struct __hal_gdc_layer_t hal_gdc_layer_t
Layer parameters definition.
int hal_gdc_get_layer_count(void)
Get the number of layers available.
@ HAL_GDC_BL_DST_OUT
Da * (1 - Sa)
@ hal_gdc_clkctrl_cg_l3_pix_clk
layer 3 bus clock clock-gater bypass
@ HAL_GDC_BF_GLBALPHA
Alpha Global.
@ HAL_GDC_EN_CFCLK
RegFile clock-gaters bypass.
void hal_gdc_set_cursor_lut(uint32_t index, uint32_t color)
Set a color for the Cursor LUT.
@ HAL_GDC_BF_INVSRCGBLALPHA
Inverted Source And Global.
struct __hal_gdc_display_t hal_gdc_display_t
Display parameters definition.
uint32_t hal_gdc_get_status(void)
Get status from Status Register.
hal_gdc_format_t format
Format.
@ HAL_GDC_SINGLEV
SINGLEV.
@ HAL_GDC_CFG_L3_GAMMA
Layer 3 has gamma LUT.
@ HAL_GDC_P_RGB3_16B1
P_RGB3.
@ DC_STATUS_framegen_busy
Frame-generation in-progress.
@ HAL_GDC_BF_INVSRCALPHA
Inverted Source.
@ DC_STATUS_rsrvd_7
Reserved bit.
@ HAL_GDC_BL_XOR
Sa * (1 - Da) + Da * (1 - Sa)
@ HAL_GDC_CFG_L0_YUVMEM
layer 0 has YUV Memory
@ HAL_GDC_P_RGB3_18B
P_RGB3.
@ hal_gdc_clkctrl_cg_rsrvd_18
Reserved bit.
uint32_t bpy
Back Porch Y.
@ HAL_GDC_ONE_FRAME
ONE_FRAME.
@ HAL_GDC_BL_SRC_OUT
Sa * (1 - Da)
@ HAL_GDC_BF_SRCALPHA
Alpha Source.
@ HAL_GDC_BL_DST_ATOP
Sa * (1 - Da) + Da * Sa.
void hal_gdc_set_layer(int layer_no, hal_gdc_layer_t *layer)
Set the Layer Mode.
@ hal_gdc_clkctrl_cg_clk_inv
Invert (ouput) clock polarity.
@ HAL_GDC_BF_DSTALPHA
Alpha Destination.
@ HAL_GDC_CFG_L2_GAMMA
Layer 2 has gamma LUT.
void hal_gdc_layer_enable(int layer_no)
Enable layer.
@ HAL_GDC_INTERLACE
INTERLACE.
void hal_gdc_clkctrl(hal_gdc_clkctrl_t ctrl)
Control the clock gaters.
void hal_gdc_layer_disable(int layer_no)
Disable layer.
@ HAL_GDC_RGBA5551
RGBA5551.
@ hal_gdc_clkctrl_cg_clk_swap
Pixel generation and format clock swap.
void hal_gdc_cursor_enable(int enable)
Enable or Disable fixed cursor.
@ HAL_GDC_DISABLE
DISABLE.
@ HAL_GDC_ABGR8888
ABGR8888.
@ HAL_GDC_LAYER_GAMMALUT_EN
Enable Gamma Look Up Table.
@ HAL_GDC_LVDS_ISP68
LVDS_ISP68.
@ HAL_GDC_MODULATE_A
Modulate Alpha.
@ HAL_GDC_CFG_L2_ENABLED
Layer 2 enabled.
@ HAL_GDC_DITHER16
DITHER 16-bit.
hal_gdc_clkctrl_cg_t
DC clock cg control definition.
hal_gdc_blend_factors_t
Layer blending factor definition.
@ DC_STATUS_dbi_pending_data
pending pixel data
@ HAL_GDC_EN_L2PIX
layer 2 pixel clock clock-gater bypass
@ DC_STATUS_rsrvd_8
Reserved bit.
@ hal_gdc_clkctrl_cg_rsrvd_4
Reserved bit.
@ HAL_GDC_CFG_L3_ENABLED
Layer 3 enabled.
@ hal_gdc_clkctrl_cg_rsrvd_9
Reserved bit.
@ HAL_GDC_CFG_FIXED_CURSOR
Fixed Cursor enabled.
@ DC_STATUS_dbi_pending_trans
pending command/data transaction
@ HAL_GDC_LVDS_OFF
LVDS_OFF.
@ HAL_GDC_CFG_L3_BLENDER
Layer 3 has blender.
@ HAL_GDC_CFG_L1_BLENDER
Layer 1 has blender.
@ HAL_GDC_P_RGB3_16B2
P_RGB3.
int hal_gdc_get_layer_gamma_lut(int layer, int index)
Get an entry in the lut8 Palette Gamma table for a layer.
@ HAL_GDC_S_RGBX4
S_RGBX4.
@ HAL_GDC_BL_SRC_ATOP
Sa * Da + Da * (1 - Sa)
@ HAL_GDC_CFG_L2_SCALER
Layer 2 has scaler.
@ HAL_GDC_CFG_L1_GAMMA
Layer 1 has gamma LUT.
@ DC_STATUS_sticky
underflow flag
@ HAL_GDC_INVPIXCLK
INVPIXCLK.
uint32_t resx
Resolution X.
@ HAL_GDC_SCANDOUBLE
SCANDOUBLE.
@ HAL_GDC_BL_SIMPLE
Sa * Sa + Da * (1 - Sa)
@ HAL_GDC_TLYUV420
TLYUV420.
@ HAL_GDC_BF_SRCGBLALPHA
Alpha Source And Alpha Global.
unsigned char hal_gdc_check_config(hal_gdc_config_t flag)
Check whether hal_gdc supports a specific characteristic.
void hal_gdc_set_layer_gamma_lut(int layer, int index, int colour)
Set the physical address of a layer.
@ HAL_GDC_CFG_HiQ_YUV
High Quality YUV converted enabled.
@ DC_STATUS_rsrvd_13
Reserved bit.
@ hal_gdc_clkctrl_cg_rsrvd_21
Reserved bit.
hal_gdc_layer_ctrl_t
Layer control definition.
@ hal_gdc_clkctrl_cg_rsrvd_11
Reserved bit.
@ HAL_GDC_CFG_L0_ENABLED
Layer 0 enabled.
void hal_gdc_set_mode(int mode)
Set operation mode.
@ HAL_GDC_DITHER
DITHER 18-bit.
@ HAL_GDC_V_YUV420
V_YUV420.
@ HAL_GDC_TESTMODE
TESTMODE.
@ HAL_GDC_ARGB4444
ARGB4444.
@ hal_gdc_clkctrl_cg_rsrvd_7
Reserved bit.
void hal_gdc_set_palette(uint32_t index, uint32_t colour)
Sets an entry in the lut8 Palatte Gamma table.