Register Guide/G2D

From Linux Exynos
Jump to: navigation, search

Contents

General registers

Register Name Offset Size Description
G2D_SOFT_RESET 0x0000 4B Software reset.
G2D_INTEN 0x0004 4B Interrupt control flags.
G2D_INTC 0x000c 4B Pending interrupts.
G2D_FIFO_STATUS 0x0010 4B Command FIFO status.
G2D_AXI_ID_MODE 0x0014 4B AXI read ID mode.
G2D_CACHECTL 0x0018 4B Cache & buffer clear.
G2D_AXI_MODE 0x001c 4B AXI mode.
G2D_DMA_SFR_BASE_ADDR 0x0080 4B
G2D_DMA_COMMAND 0x0084 4B
G2D_DMA_EXE_LIST_NUM 0x0088 4B
G2D_DMA_STATUS 0x008c 4B
G2D_DMA_HOLD_CMD 0x0090 4B

G2D_SOFT_RESET

Name Bit Mode Default Values Description
G2D_SOFT_RESET 0 W 0 1 Resets the G2D hardware.
G2D_SFR_CLEAR 1 W 0 1

G2D_INTEN

Name Bit Mode Default Values Description
G2D_BLIT_INT_ENABLE 0 RW 0 1 = enabled; 0 = disabled
G2D_GCF_INT_ENABLE 1 RW 0 1 = enabled; 0 = disabled
G2D_UCF_INT_ENABLE 2 RW 0 1 = enabled; 0 = disabled
G2D_ACF_INT_ENABLE 3 RW 0 1 = enabled; 0 = disabled
G2D_INT_TYPE 4 RW 0
0 = edge-triggered
1 = level-triggered
Whether interrupts should be edge-triggered or level-triggered.

G2D_INTC

Name Bit Mode Default Values Description
G2D_BLIT_INT 0 R 0 1 = pending
G2D_GCMD_INT 1 R 0 1 = pending
G2D_UCMD_INT 2 R 0 1 = pending
G2D_ACMD_INT 3 R 0 1 = pending

G2D_FIFO_STATUS

Name Bit Mode Default Values Description
G2D_BLIT_FINISHED 0 R 0 1 = done Whether the G2D hardware has finished blitting.

G2D_AXI_MODE

Name Bit Mode Default Values Description
G2D_MAX_BURST_LEN 24:26 RW 0
0 = burst size: 2
1 = burst size: 4
2 = burst size: 8
3 = burst size: 16
Maximum AXI burst size.

Command registers

Register Name Offset Size Description
G2D_BITBLT_START 0x0100 4B
G2D_BITBLT_CMD 0x0104 4B Bit block transfer control flags.
G2D_BLEND_FUNCTION 0x0108 4B (since version 4.1).
G2D_ROUND_MODE 0x010c 4B (since version 4.1).

G2D_BITBLT_CMD

Name Bit Mode Default Values Description
G2D_ENABLE_DITHER 3 RW 0 1 = enabled; 0 = disabled Control flag for dithering.
G2D_ENABLE_CW 8 RW 0 1 = enabled; 0 = disabled Control flag for the clipping window.
G2D_SOLID_FILL 28 RW 0 1 = enabled; 0 = disabled Control flag for solid fill. When enabled, the solid fill colour is being used rather than the source image.

Source registers

Register Name Offset Size Description
G2D_SRC_SELECT 0x0300 4B
G2D_SRC_BASE_ADDR 0x0304 4B The base address of the image plane.
G2D_SRC_STRIDE 0x0308 4B The stride between every two consecutive pixels in bytes.
G2D_SRC_COLOUR_MODE 0x030c 4B The colour mode of the source image.
G2D_SRC_LEFT_TOP 0x0310 4B The top left corner of the source rectangle.
G2D_SRC_RIGHT_BOTTOM 0x0314 4B The bottom right corner of the source rectangle.
G2D_SRC_PLANE2_BASE_ADDR 0x0318 4B The base address of the second plane in case of a YCbCr planar format (since version 4.1).
G2D_SRC_REPEAT_MODE 0x031c 4B
G2D_SRC_PAD_VALUE 0x0320 4B
G2D_SRC_A8_RGB_EXT 0x0324 4B
G2D_SRC_SCALE_CTRL 0x0328 4B
G2D_SRC_XSCALE 0x032c 4B
G2D_SRC_YSCALE 0x0330 4B

G2D_SRC_COLOUR_MODE

Name Bit Mode Default Values Description
G2D_COLOUR_FORMAT 0:4 RW 0
0 = G2D_COLOUR_FORMAT_XRGB_8888
1 = G2D_COLOUR_FORMAT_ARGB_8888
2 = G2D_COLOUR_FORMAT_RGB_565
3 = G2D_COLOUR_FORMAT_XRGB_1555
4 = G2D_COLOUR_FORMAT_ARGB_1555
5 = G2D_COLOUR_FORMAT_XRGB_4444
6 = G2D_COLOUR_FORMAT_ARGB_4444
7 = G2D_COLOUR_FORMAT_PACKED_RGB_888 
8 = G2D_COLOUR_FORMAT_YCBCR_444
9 = G2D_COLOUR_FORMAT_YCBCR_422
10 = G2D_COLOUR_FORMAT_YCBCR_420
11 = G2D_COLOUR_FORMAT_A8
12 = G2D_COLOUR_FORMAT_L8
The pixel format of the source image.
G2D_RGB_ORDER 4:6 RW 0
0 = G2D_RGB_ORDER_AXRGB
1 = G2D_RGB_ORDER_RGBAX
2 = G2D_RGB_ORDER_AXBGR
3 = G2D_RGB_ORDER_BGRAX
The order of the pixel format in case of RGB(A).
Reserved 6:8 RW 0 Reserved.
G2D_YCBCR_PLANAR 8 RW 0
0 = interleaved
1 = planar
Whether the YCbCr pixel format is interleaved or planar.

G2D_SRC_LEFT_TOP

Name Bit Mode Default Values Description
G2D_SRC_LEFT 0:16 RW 0 The left position of the source rectangle.
G2D_SRC_TOP 16:32 RW 0 The top position of the source rectangle.

G2D_SRC_RIGHT_BOTTOM

Name Bit Mode Default Values Description
G2D_SRC_RIGHT 0:16 RW 0 The right position of the source rectangle.
G2D_SRC_BOTTOM 16:32 RW 0 The bottom position of the source rectangle.

Destination registers

Register Name Offset Size Description
G2D_DST_SELECT 0x0400 4B
G2D_DST_BASE_ADDR 0x0404 4B The base address of the image plane.
G2D_DST_STRIDE 0x0408 4B The stride between every two consecutive pixels in bytes.
G2D_DST_COLOUR_MODE 0x040c 4B The colour mode of the destination image.
G2D_DST_LEFT_TOP 0x0410 4B The top left corner of the destination rectangle.
G2D_DST_RIGHT_BOTTOM 0x0414 4B The bottom right corner of the destination rectangle.
G2D_DST_PLANE2_BASE_ADDR 0x0418 4B The base address of the second plane in case of a YCbCr planar format (since version 4.1).
G2D_DST_A8_RGB_EXT 0x041c 4B

G2D_DST_COLOUR_MODE

Name Bit Mode Default Values Description
G2D_COLOUR_FORMAT 0:4 RW 0
0 = G2D_COLOUR_FORMAT_XRGB_8888
1 = G2D_COLOUR_FORMAT_ARGB_8888
2 = G2D_COLOUR_FORMAT_RGB_565
3 = G2D_COLOUR_FORMAT_XRGB_1555
4 = G2D_COLOUR_FORMAT_ARGB_1555
5 = G2D_COLOUR_FORMAT_XRGB_4444
6 = G2D_COLOUR_FORMAT_ARGB_4444
7 = G2D_COLOUR_FORMAT_PACKED_RGB_888 
8 = G2D_COLOUR_FORMAT_YCBCR_444
9 = G2D_COLOUR_FORMAT_YCBCR_422
10 = G2D_COLOUR_FORMAT_YCBCR_420
11 = G2D_COLOUR_FORMAT_A8
12 = G2D_COLOUR_FORMAT_L8
The pixel format of the destination image.
G2D_RGB_ORDER 4:6 RW 0
0 = G2D_RGB_ORDER_AXRGB
1 = G2D_RGB_ORDER_RGBAX
2 = G2D_RGB_ORDER_AXBGR
3 = G2D_RGB_ORDER_BGRAX
The order of the pixel format in case of RGB(A).
Reserved 6:8 RW 0 Reserved.
G2D_YCBCR_PLANAR 8 RW 0
0 = interleaved
1 = planar
Whether the YCbCr pixel format is interleaved or planar.

G2D_DST_LEFT_TOP

Name Bit Mode Default Values Description
G2D_DST_LEFT 0:16 RW 0 The left position of the destination rectangle.
G2D_DST_TOP 16:32 RW 0 The top position of the destination rectangle.

G2D_DST_RIGHT_BOTTOM

Name Bit Mode Default Values Description
G2D_DST_RIGHT 0:16 RW 0 The right position of the destination rectangle.
G2D_DST_BOTTOM 16:32 RW 0 The bottom position of the destination rectangle.

Clipping window registers

Register Name Offset Size Description
G2D_CW_LEFT_TOP 0x0600 4B The top left corner of the rectangle specifying the clipping window.
G2D_CW_RIGHT_BOTTOM 0x0604 4B The bottom right corner of the rectangle specifying the clipping window.

G2D_CW_LEFT_TOP

Name Bit Mode Default Values Description
G2D_CW_LEFT 0:16 RW 0 The left position of the clipping window.
G2D_CW_TOP 16:32 RW 0 The top position of the clipping window.

G2D_CW_RIGHT_BOTTOM

Name Bit Mode Default Values Description
G2D_CW_RIGHT 0:16 RW 0 The right position of the clipping window.
G2D_CW_BOTTOM 16:32 RW 0 The bottom position of the clipping window.

Colour registers

Register Name Offset Size Description
G2D_FG_COLOUR 0x0700 4B The foreground colour to use.
G2D_BG_COLOUR 0x0704 4B The background colour to use.
G2D_BS_COLOUR 0x0708 4B The bluescreen colour to use.
G2D_SF_COLOUR 0x070c 4B The solid fill colour to use.