1
2
3
4
5
6
7
8
9
10 #define SOFT_RESET_REG 0x0000
11 #define INTEN_REG 0x0004
12 #define INTC_PEND_REG 0x000C
13 #define FIFO_STAT_REG 0x0010
14 #define AXI_ID_MODE_REG 0x0014
15 #define CACHECTL_REG 0x0018
16 #define AXI_MODE_REG 0x001C
17
18
19 #define BITBLT_START_REG 0x0100
20 #define BITBLT_COMMAND_REG 0x0104
21
22
23 #define ROTATE_REG 0x0200
24 #define SRC_MSK_DIRECT_REG 0x0204
25 #define DST_PAT_DIRECT_REG 0x0208
26
27
28 #define SRC_SELECT_REG 0x0300
29 #define SRC_BASE_ADDR_REG 0x0304
30 #define SRC_STRIDE_REG 0x0308
31 #define SRC_COLOR_MODE_REG 0x030C
32 #define SRC_LEFT_TOP_REG 0x0310
33 #define SRC_RIGHT_BOTTOM_REG 0x0314
34 #define SRC_SCALE_CTRL_REG 0x0328
35 #define SRC_XSCALE_REG 0x032c
36 #define SRC_YSCALE_REG 0x0330
37
38
39 #define DST_SELECT_REG 0x0400
40 #define DST_BASE_ADDR_REG 0x0404
41 #define DST_STRIDE_REG 0x0408
42 #define DST_COLOR_MODE_REG 0x040C
43 #define DST_LEFT_TOP_REG 0x0410
44 #define DST_RIGHT_BOTTOM_REG 0x0414
45
46
47 #define PAT_BASE_ADDR_REG 0x0500
48 #define PAT_SIZE_REG 0x0504
49 #define PAT_COLOR_MODE_REG 0x0508
50 #define PAT_OFFSET_REG 0x050C
51 #define PAT_STRIDE_REG 0x0510
52
53
54 #define MASK_BASE_ADDR_REG 0x0520
55 #define MASK_STRIDE_REG 0x0524
56
57
58 #define CW_LT_REG 0x0600
59 #define CW_RB_REG 0x0604
60
61
62
63 #define THIRD_OPERAND_REG 0x0610
64 #define ROP4_REG 0x0614
65 #define ALPHA_REG 0x0618
66
67
68 #define FG_COLOR_REG 0x0700
69 #define BG_COLOR_REG 0x0704
70 #define BS_COLOR_REG 0x0708
71
72
73 #define SRC_COLORKEY_CTRL_REG 0x0710
74 #define SRC_COLORKEY_DR_MIN_REG 0x0714
75
76 #define SRC_COLORKEY_DR_MAX_REG 0x0718
77
78 #define DST_COLORKEY_CTRL_REG 0x071C
79 #define DST_COLORKEY_DR_MIN_REG 0x0720
80
81 #define DST_COLORKEY_DR_MAX_REG 0x0724
82
83
84
85
86 #define ORDER_XRGB 0
87 #define ORDER_RGBX 1
88 #define ORDER_XBGR 2
89 #define ORDER_BGRX 3
90
91 #define MODE_XRGB_8888 0
92 #define MODE_ARGB_8888 1
93 #define MODE_RGB_565 2
94 #define MODE_XRGB_1555 3
95 #define MODE_ARGB_1555 4
96 #define MODE_XRGB_4444 5
97 #define MODE_ARGB_4444 6
98 #define MODE_PACKED_RGB_888 7
99
100 #define COLOR_MODE(o, m) (((o) << 4) | (m))
101
102
103 #define ROP4_COPY 0xCCCC
104 #define ROP4_INVERT 0x3333
105
106
107 #define MAX_WIDTH 8000
108 #define MAX_HEIGHT 8000
109
110 #define G2D_TIMEOUT 500
111
112 #define DEFAULT_WIDTH 100
113 #define DEFAULT_HEIGHT 100
114
115 #define DEFAULT_SCALE_MODE (2 << 0)
116
117
118 #define CMD_V3_ENABLE_STRETCH (1 << 4)