Difference between revisions of "Register Guide/G2D"

From Linux Exynos
Jump to: navigation, search
m (descriptions, some more registers.)
(General registers)
 
(18 intermediate revisions by one user not shown)
Line 10: Line 10:
 
  | <tt>0x0000</tt>
 
  | <tt>0x0000</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt>Software reset.</tt>
+
  | Software reset.
 
  |-
 
  |-
 
  | <tt>[[#G2D_INTEN|G2D_INTEN]]</tt>
 
  | <tt>[[#G2D_INTEN|G2D_INTEN]]</tt>
 
  | <tt>0x0004</tt>
 
  | <tt>0x0004</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt>Interrupt enable.</tt>
+
  | Interrupt control flags.
 
  |-
 
  |-
 
  | <tt>[[#G2D_INTC|G2D_INTC]]</tt>
 
  | <tt>[[#G2D_INTC|G2D_INTC]]</tt>
 
  | <tt>0x000c</tt>
 
  | <tt>0x000c</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt>Interrupt control pending.</tt>
+
  | Pending interrupts.
 
  |-
 
  |-
 
  | <tt>[[#G2D_FIFO_STATUS|G2D_FIFO_STATUS]]</tt>
 
  | <tt>[[#G2D_FIFO_STATUS|G2D_FIFO_STATUS]]</tt>
 
  | <tt>0x0010</tt>
 
  | <tt>0x0010</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt>Command FIFO status.</tt>
+
  | Command FIFO status.
 
  |-
 
  |-
 
  | <tt>[[#G2D_AXI_ID_MODE|G2D_AXI_ID_MODE]]</tt>
 
  | <tt>[[#G2D_AXI_ID_MODE|G2D_AXI_ID_MODE]]</tt>
 
  | <tt>0x0014</tt>
 
  | <tt>0x0014</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt>AXI read ID mode.</tt>
+
  | AXI read ID mode.
 
  |-
 
  |-
 
  | <tt>[[#G2D_CACHECTL|G2D_CACHECTL]]</tt>
 
  | <tt>[[#G2D_CACHECTL|G2D_CACHECTL]]</tt>
 
  | <tt>0x0018</tt>
 
  | <tt>0x0018</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt>Cache & buffer clear.</tt>
+
  | Cache & buffer clear.
 
  |-
 
  |-
 
  | <tt>[[#G2D_AXI_MODE|G2D_AXI_MODE]]</tt>
 
  | <tt>[[#G2D_AXI_MODE|G2D_AXI_MODE]]</tt>
 
  | <tt>0x001c</tt>
 
  | <tt>0x001c</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt>AXI mode.</tt>
+
  | AXI mode.
 
  |-
 
  |-
 
  | <tt>[[#G2D_DMA_SFR_BASE_ADDR|G2D_DMA_SFR_BASE_ADDR]]</tt>
 
  | <tt>[[#G2D_DMA_SFR_BASE_ADDR|G2D_DMA_SFR_BASE_ADDR]]</tt>
 
  | <tt>0x0080</tt>
 
  | <tt>0x0080</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt></tt>
+
  |
 
  |-
 
  |-
 
  | <tt>[[#G2D_DMA_COMMAND|G2D_DMA_COMMAND]]</tt>
 
  | <tt>[[#G2D_DMA_COMMAND|G2D_DMA_COMMAND]]</tt>
 
  | <tt>0x0084</tt>
 
  | <tt>0x0084</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt></tt>
+
|
 +
|-
 +
  | <tt>[[#G2D_DMA_EXE_LIST_NUM|G2D_DMA_EXE_LIST_NUM]]</tt>
 +
| <tt>0x0088</tt>
 +
| <tt>4B</tt>
 +
|
 
  |-
 
  |-
 
  | <tt>[[#G2D_DMA_STATUS|G2D_DMA_STATUS]]</tt>
 
  | <tt>[[#G2D_DMA_STATUS|G2D_DMA_STATUS]]</tt>
 
  | <tt>0x008c</tt>
 
  | <tt>0x008c</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt></tt>
+
  |
 
  |-
 
  |-
 
  | <tt>[[#G2D_DMA_HOLD_CMD|G2D_DMA_HOLD_CMD]]</tt>
 
  | <tt>[[#G2D_DMA_HOLD_CMD|G2D_DMA_HOLD_CMD]]</tt>
 
  | <tt>0x0090</tt>
 
  | <tt>0x0090</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
  | <tt></tt>
+
|
 +
|}
 +
 
 +
=== G2D_SOFT_RESET ===
 +
 
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
  | <tt>G2D_SOFT_RESET</tt>
 +
| <tt>0</tt>
 +
| <tt>W</tt>
 +
| <tt>0</tt>
 +
| <tt>1</tt>
 +
| Resets the G2D hardware.
 +
|-
 +
| <tt>G2D_SFR_CLEAR</tt>
 +
| <tt>1</tt>
 +
| <tt>W</tt>
 +
| <tt>0</tt>
 +
| <tt>1</tt>
 +
|
 +
|}
 +
 
 +
=== G2D_INTEN ===
 +
 
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_BLIT_INT_ENABLE</tt>
 +
| <tt>0</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = enabled; 0 = disabled</tt>
 +
|
 +
|-
 +
| <tt>G2D_GCF_INT_ENABLE</tt>
 +
| <tt>1</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = enabled; 0 = disabled</tt>
 +
|
 +
|-
 +
| <tt>G2D_UCF_INT_ENABLE</tt>
 +
| <tt>2</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = enabled; 0 = disabled</tt>
 +
|
 +
|-
 +
| <tt>G2D_ACF_INT_ENABLE</tt>
 +
| <tt>3</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = enabled; 0 = disabled</tt>
 +
|
 +
|-
 +
| <tt>G2D_INT_TYPE</tt>
 +
| <tt>4</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
0 = edge-triggered
 +
1 = level-triggered</tt>
 +
| Whether interrupts should be edge-triggered or level-triggered.
 +
|}
 +
 
 +
=== G2D_INTC ===
 +
 
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_BLIT_INT</tt>
 +
| <tt>0</tt>
 +
| <tt>R</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = pending</tt>
 +
|
 +
|-
 +
| <tt>G2D_GCMD_INT</tt>
 +
| <tt>1</tt>
 +
| <tt>R</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = pending</tt>
 +
|
 +
|-
 +
| <tt>G2D_UCMD_INT</tt>
 +
| <tt>2</tt>
 +
| <tt>R</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = pending</tt>
 +
|
 +
|-
 +
| <tt>G2D_ACMD_INT</tt>
 +
| <tt>3</tt>
 +
| <tt>R</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = pending</tt>
 +
|
 +
|}
 +
 
 +
=== G2D_FIFO_STATUS ===
 +
 
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_BLIT_FINISHED</tt>
 +
| <tt>0</tt>
 +
| <tt>R</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = done</tt>
 +
| Whether the G2D hardware has finished blitting.
 +
|}
 +
 
 +
=== G2D_AXI_MODE ===
 +
 
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_MAX_BURST_LEN</tt>
 +
| <tt>24:26</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
0 = burst size: 2
 +
1 = burst size: 4
 +
2 = burst size: 8
 +
3 = burst size: 16</tt>
 +
| Maximum AXI burst size.
 
  |}
 
  |}
  
Line 73: Line 230:
 
  | <tt>[[#G2D_BITBLT_START|G2D_BITBLT_START]]</tt>
 
  | <tt>[[#G2D_BITBLT_START|G2D_BITBLT_START]]</tt>
 
  | <tt>0x0100</tt>
 
  | <tt>0x0100</tt>
 +
| <tt>4B</tt>
 +
|
 +
|-
 +
| <tt>[[#G2D_BITBLT_CMD|G2D_BITBLT_CMD]]</tt>
 +
| <tt>0x0104</tt>
 +
| <tt>4B</tt>
 +
| Bit block transfer control flags.
 +
|-
 +
| <tt>[[#G2D_BLEND_FUNCTION|G2D_BLEND_FUNCTION]]</tt>
 +
| <tt>0x0108</tt>
 +
| <tt>4B</tt>
 +
| (since version 4.1).
 +
|-
 +
| <tt>[[#G2D_ROUND_MODE|G2D_ROUND_MODE]]</tt>
 +
| <tt>0x010c</tt>
 +
| <tt>4B</tt>
 +
| (since version 4.1).
 +
|}
 +
 +
=== G2D_BITBLT_CMD ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_ENABLE_DITHER</tt>
 +
| <tt>3</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = enabled; 0 = disabled</tt>
 +
| Control flag for dithering.
 +
|-
 +
| <tt>G2D_ENABLE_CW</tt>
 +
| <tt>8</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = enabled; 0 = disabled</tt>
 +
| Control flag for [[#Clipping window registers|the clipping window]].
 +
|-
 +
| <tt>G2D_SOLID_FILL</tt>
 +
| <tt>28</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>1 = enabled; 0 = disabled</tt>
 +
| Control flag for solid fill. When enabled, the [[#Colour registers|solid fill colour]] is being used rather than the source image.
 +
|}
 +
 +
== Source registers ==
 +
 +
{| class="wikitable" |
 +
! Register Name
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| <tt>[[#G2D_SRC_SELECT|G2D_SRC_SELECT]]</tt>
 +
| <tt>0x0300</tt>
 
  | <tt>4B</tt>
 
  | <tt>4B</tt>
 
  | <tt></tt>
 
  | <tt></tt>
 +
|-
 +
| <tt>[[#G2D_SRC_BASE_ADDR|G2D_SRC_BASE_ADDR]]</tt>
 +
| <tt>0x0304</tt>
 +
| <tt>4B</tt>
 +
| The base address of the image plane.
 +
|-
 +
| <tt>[[#G2D_SRC_STRIDE|G2D_SRC_STRIDE]]</tt>
 +
| <tt>0x0308</tt>
 +
| <tt>4B</tt>
 +
| The stride between every two consecutive pixels in bytes.
 +
|-
 +
| <tt>[[#G2D_SRC_COLOUR_MODE|G2D_SRC_COLOUR_MODE]]</tt>
 +
| <tt>0x030c</tt>
 +
| <tt>4B</tt>
 +
| The colour mode of the source image.
 +
|-
 +
| <tt>[[#G2D_SRC_LEFT_TOP|G2D_SRC_LEFT_TOP]]</tt>
 +
| <tt>0x0310</tt>
 +
| <tt>4B</tt>
 +
| The top left corner of the source rectangle.
 +
|-
 +
| <tt>[[#G2D_SRC_RIGHT_BOTTOM|G2D_SRC_RIGHT_BOTTOM]]</tt>
 +
| <tt>0x0314</tt>
 +
| <tt>4B</tt>
 +
| The bottom right corner of the source rectangle.
 +
|-
 +
| <tt>[[#G2D_SRC_PLANE2_BASE_ADDR|G2D_SRC_PLANE2_BASE_ADDR]]</tt>
 +
| <tt>0x0318</tt>
 +
| <tt>4B</tt>
 +
| The base address of the second plane in case of a YCbCr planar format (since version 4.1).
 +
|-
 +
| <tt>[[#G2D_SRC_REPEAT_MODE|G2D_SRC_REPEAT_MODE]]</tt>
 +
| <tt>0x031c</tt>
 +
| <tt>4B</tt>
 +
| <tt></tt>
 +
|-
 +
| <tt>[[#G2D_SRC_PAD_VALUE|G2D_SRC_PAD_VALUE]]</tt>
 +
| <tt>0x0320</tt>
 +
| <tt>4B</tt>
 +
| <tt></tt>
 +
|-
 +
| <tt>[[#G2D_SRC_A8_RGB_EXT|G2D_SRC_A8_RGB_EXT]]</tt>
 +
| <tt>0x0324</tt>
 +
| <tt>4B</tt>
 +
| <tt></tt>
 +
|-
 +
| <tt>[[#G2D_SRC_SCALE_CTRL|G2D_SRC_SCALE_CTRL]]</tt>
 +
| <tt>0x0328</tt>
 +
| <tt>4B</tt>
 +
| <tt></tt>
 +
|-
 +
| <tt>[[#G2D_SRC_XSCALE|G2D_SRC_XSCALE]]</tt>
 +
| <tt>0x032c</tt>
 +
| <tt>4B</tt>
 +
| <tt></tt>
 +
|-
 +
| <tt>[[#G2D_SRC_YSCALE|G2D_SRC_YSCALE]]</tt>
 +
| <tt>0x0330</tt>
 +
| <tt>4B</tt>
 +
| <tt></tt>
 +
|}
 +
 +
=== G2D_SRC_COLOUR_MODE ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_COLOUR_FORMAT</tt>
 +
| <tt>0:4</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
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</tt>
 +
| The pixel format of the source image.
 +
|-
 +
| <tt>G2D_RGB_ORDER</tt>
 +
| <tt>4:6</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
0 = G2D_RGB_ORDER_AXRGB
 +
1 = G2D_RGB_ORDER_RGBAX
 +
2 = G2D_RGB_ORDER_AXBGR
 +
3 = G2D_RGB_ORDER_BGRAX</tt>
 +
| The order of the pixel format in case of RGB(A).
 +
|-
 +
| <tt>Reserved</tt>
 +
| <tt>6:8</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| Reserved.
 +
|-
 +
| <tt>G2D_YCBCR_PLANAR</tt>
 +
| <tt>8</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
0 = interleaved
 +
1 = planar</tt>
 +
| Whether the YCbCr pixel format is interleaved or planar.
 +
|}
 +
 +
=== G2D_SRC_LEFT_TOP ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_SRC_LEFT</tt>
 +
| <tt>0:16</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The left position of the source rectangle.
 +
|-
 +
| <tt>G2D_SRC_TOP</tt>
 +
| <tt>16:32</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The top position of the source rectangle.
 +
|}
 +
 +
=== G2D_SRC_RIGHT_BOTTOM ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_SRC_RIGHT</tt>
 +
| <tt>0:16</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The right position of the source rectangle.
 +
|-
 +
| <tt>G2D_SRC_BOTTOM</tt>
 +
| <tt>16:32</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The bottom position of the source rectangle.
 +
|}
 +
 +
== Destination registers ==
 +
 +
{| class="wikitable" |
 +
! Register Name
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| <tt>[[#G2D_DST_SELECT|G2D_DST_SELECT]]</tt>
 +
| <tt>0x0400</tt>
 +
| <tt>4B</tt>
 +
|
 +
|-
 +
| <tt>[[#G2D_DST_BASE_ADDR|G2D_DST_BASE_ADDR]]</tt>
 +
| <tt>0x0404</tt>
 +
| <tt>4B</tt>
 +
| The base address of the image plane.
 +
|-
 +
| <tt>[[#G2D_DST_STRIDE|G2D_DST_STRIDE]]</tt>
 +
| <tt>0x0408</tt>
 +
| <tt>4B</tt>
 +
| The stride between every two consecutive pixels in bytes.
 +
|-
 +
| <tt>[[#G2D_DST_COLOUR_MODE|G2D_DST_COLOUR_MODE]]</tt>
 +
| <tt>0x040c</tt>
 +
| <tt>4B</tt>
 +
| The colour mode of the destination image.
 +
|-
 +
| <tt>[[#G2D_DST_LEFT_TOP|G2D_DST_LEFT_TOP]]</tt>
 +
| <tt>0x0410</tt>
 +
| <tt>4B</tt>
 +
| The top left corner of the destination rectangle.
 +
|-
 +
| <tt>[[#G2D_DST_RIGHT_BOTTOM|G2D_DST_RIGHT_BOTTOM]]</tt>
 +
| <tt>0x0414</tt>
 +
| <tt>4B</tt>
 +
| The bottom right corner of the destination rectangle.
 +
|-
 +
| <tt>[[#G2D_DST_PLANE2_BASE_ADDR|G2D_DST_PLANE2_BASE_ADDR]]</tt>
 +
| <tt>0x0418</tt>
 +
| <tt>4B</tt>
 +
| The base address of the second plane in case of a YCbCr planar format (since version 4.1).
 +
|-
 +
| <tt>[[#G2D_DST_A8_RGB_EXT|G2D_DST_A8_RGB_EXT]]</tt>
 +
| <tt>0x041c</tt>
 +
| <tt>4B</tt>
 +
|
 +
|}
 +
 +
=== G2D_DST_COLOUR_MODE ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_COLOUR_FORMAT</tt>
 +
| <tt>0:4</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
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</tt>
 +
| The pixel format of the destination image.
 +
|-
 +
| <tt>G2D_RGB_ORDER</tt>
 +
| <tt>4:6</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
0 = G2D_RGB_ORDER_AXRGB
 +
1 = G2D_RGB_ORDER_RGBAX
 +
2 = G2D_RGB_ORDER_AXBGR
 +
3 = G2D_RGB_ORDER_BGRAX</tt>
 +
| The order of the pixel format in case of RGB(A).
 +
|-
 +
| <tt>Reserved</tt>
 +
| <tt>6:8</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| Reserved.
 +
|-
 +
| <tt>G2D_YCBCR_PLANAR</tt>
 +
| <tt>8</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt>
 +
0 = interleaved
 +
1 = planar</tt>
 +
| Whether the YCbCr pixel format is interleaved or planar.
 +
|}
 +
 +
=== G2D_DST_LEFT_TOP ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_DST_LEFT</tt>
 +
| <tt>0:16</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The left position of the destination rectangle.
 +
|-
 +
| <tt>G2D_DST_TOP</tt>
 +
| <tt>16:32</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The top position of the destination rectangle.
 +
|}
 +
 +
=== G2D_DST_RIGHT_BOTTOM ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_DST_RIGHT</tt>
 +
| <tt>0:16</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The right position of the destination rectangle.
 +
|-
 +
| <tt>G2D_DST_BOTTOM</tt>
 +
| <tt>16:32</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The bottom position of the destination rectangle.
 +
|}
 +
 +
== Clipping window registers ==
 +
 +
{| class="wikitable" |
 +
! Register Name
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| <tt>[[#G2D_CW_LEFT_TOP|G2D_CW_LEFT_TOP]]</tt>
 +
| <tt>0x0600</tt>
 +
| <tt>4B</tt>
 +
| The top left corner of the rectangle specifying the clipping window.
 +
|-
 +
| <tt>[[#G2D_CW_RIGHT_BOTTOM|G2D_CW_RIGHT_BOTTOM]]</tt>
 +
| <tt>0x0604</tt>
 +
| <tt>4B</tt>
 +
| The bottom right corner of the rectangle specifying the clipping window.
 +
|}
 +
 +
=== G2D_CW_LEFT_TOP ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_CW_LEFT</tt>
 +
| <tt>0:16</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The left position of the clipping window.
 +
|-
 +
| <tt>G2D_CW_TOP</tt>
 +
| <tt>16:32</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The top position of the clipping window.
 +
|}
 +
 +
=== G2D_CW_RIGHT_BOTTOM ===
 +
 +
{| class="wikitable" |
 +
! Name
 +
! Bit
 +
! Mode
 +
! Default
 +
! Values
 +
! Description
 +
|-
 +
| <tt>G2D_CW_RIGHT</tt>
 +
| <tt>0:16</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The right position of the clipping window.
 +
|-
 +
| <tt>G2D_CW_BOTTOM</tt>
 +
| <tt>16:32</tt>
 +
| <tt>RW</tt>
 +
| <tt>0</tt>
 +
| <tt></tt>
 +
| The bottom position of the clipping window.
 +
|}
 +
 +
== Colour registers ==
 +
 +
{| class="wikitable" |
 +
! Register Name
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| <tt>[[#G2D_FG_COLOUR|G2D_FG_COLOUR]]</tt>
 +
| <tt>0x0700</tt>
 +
| <tt>4B</tt>
 +
| The foreground colour to use.
 +
|-
 +
| <tt>[[#G2D_BG_COLOUR|G2D_BG_COLOUR]]</tt>
 +
| <tt>0x0704</tt>
 +
| <tt>4B</tt>
 +
| The background colour to use.
 +
|-
 +
| <tt>[[#G2D_BS_COLOUR|G2D_BS_COLOUR]]</tt>
 +
| <tt>0x0708</tt>
 +
| <tt>4B</tt>
 +
| The bluescreen colour to use.
 +
|-
 +
| <tt>[[#G2D_SF_COLOUR|G2D_SF_COLOUR]]</tt>
 +
| <tt>0x070c</tt>
 +
| <tt>4B</tt>
 +
| The solid fill colour to use.
 
  |}
 
  |}

Latest revision as of 15:05, 22 January 2015

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.