blob: c2a01b878cb8d5b254ac1f30f00f32db02edf329 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
/* linux/drivers/video/decon_2.0/regs-dpp.h
*
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* Register definition file for Samsung dpp driver
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef DPP_REGS_H_
#define DPP_REGS_H_
/* IDMA_VG(R)x_ENABLE */
#define VG_ENABLE (0x00)
#define VG_ENABLE_OP_STATUS (1 << 2)
#define VG_ENABLE_SFR_UPDATE_FORCE (1 << 4)
#define VG_ENABLE_INT_CLOCK_GATE_EN (1 << 8)
#define VG_ENABLE_SRAM_CLOCK_GATE_EN (1 << 9)
#define VG_ENABLE_SFR_CLOCK_GATE_EN (1 << 10)
#define VG_ENABLE_SCALER_CLOCK_GATE_EN (1 << 11)
#define VG_ENABLE_RT_PATH_EN (1 << 16)
#define VG_ENABLE_RT_PATH_EN_S (1 << 17)
#define VG_ENABLE_SRESET (1 << 24)
#define VG_ENABLE_VSD_SRESET_MASK (1 << 25)
/* IDMA_VG(R)x_IRQ */
#define VG_IRQ (0x04)
#define VG_IRQ_ENABLE (1 << 0)
#define VG_IRQ_FRAMEDONE_MASK (1 << 1)
#define VG_IRQ_DEADLOCK_STATUS_MASK (1 << 2)
#define VG_IRQ_READ_SLAVE_ERROR_MASK (1 << 4)
#define VG_IRQ_HW_RESET_DONE_MASK (1 << 5)
#define VG_IRQ_FRAMEDONE (1 << 16)
#define VG_IRQ_DEADLOCK_STATUS (1 << 17)
#define VG_IRQ_READ_SLAVE_ERROR (1 << 19)
#define VG_IRQ_HW_RESET_DONE (1 << 20)
/* IDMA_VG(R)x_IN_CON */
#define VG_IN_CON (0x08)
#define VG_IN_CON_BLOCKING_FEATURE_EN (1 << 3)
#define VG_IN_CON_CHROMINANCE_STRIDE_EN (1 << 4)
#define VG_IN_CON_SCAN_MODE_MASK (3 << 5)
#define VG_IN_CON_SCAN_MODE_PRO_TO_PRO (1 << 5)
#define VG_IN_CON_SCAN_MODE_INT_TO_PRO (2 << 5)
#define VG_IN_CON_SCAN_MODE_INT_TO_INT (3 << 5)
#define VG_IN_CON_IN_ROTATION_MASK (7 << 8)
#define VG_IN_CON_IN_ROTATION_X_FLIP (1 << 8)
#define VG_IN_CON_IN_ROTATION_Y_FLIP (2 << 8)
#define VG_IN_CON_IN_ROTATION_180 (3 << 8)
#define VG_IN_CON_IN_ROTATION_90 (4 << 8)
#define VG_IN_CON_IN_ROTATION_90_X_FLIP (5 << 8)
#define VG_IN_CON_IN_ROTATION_90_Y_FLIP (6 << 8)
#define VG_IN_CON_IN_ROTATION_270 (7 << 8)
#define VG_IN_CON_IMG_FORMAT_MASK (31 << 11)
#define VG_IN_CON_IMG_FORMAT_ARGB8888 (0 << 11)
#define VG_IN_CON_IMG_FORMAT_ABGR8888 (1 << 11)
#define VG_IN_CON_IMG_FORMAT_RGBA8888 (2 << 11)
#define VG_IN_CON_IMG_FORMAT_BGRA8888 (3 << 11)
#define VG_IN_CON_IMG_FORMAT_XRGB8888 (4 << 11)
#define VG_IN_CON_IMG_FORMAT_XBGR8888 (5 << 11)
#define VG_IN_CON_IMG_FORMAT_RGBX8888 (6 << 11)
#define VG_IN_CON_IMG_FORMAT_BGRX8888 (7 << 11)
#define VG_IN_CON_IMG_FORMAT_RGB565 (8 << 11)
#define VG_IN_CON_IMG_FORMAT_YUV422_2P (20 << 11)
#define VG_IN_CON_IMG_FORMAT_YVU422_2P (21 << 11)
#define VG_IN_CON_IMG_FORMAT_YUV422_3P (22 << 11)
#define VG_IN_CON_IMG_FORMAT_YUV420_2P (24 << 11)
#define VG_IN_CON_IMG_FORMAT_YVU420_2P (25 << 11)
#define VG_IN_CON_IMG_FORMAT_YUV420_3P (26 << 11)
#define VG_IN_CON_IN_IC_MAX_DEFAULT (0x10 << 19)
#define VG_IN_CON_IN_IC_MAX (0x1F << 19)
#define VG_IN_CON_BURST_LENGTH_MASK (0xF << 24)
#define VG_IN_CON_BURST_LENGTH_0 (0 << 24)
#define VG_IN_CON_BURST_LENGTH_1 (1 << 24)
#define VG_IN_CON_BURST_LENGTH_2 (2 << 24)
#define VG_IN_CON_BURST_LENGTH_3 (3 << 24)
#define VG_IN_CON_IN_AFBC_EN (1 << 7)
/* IDMA_VG(R)x_OUT_CON */
#define VG_OUT_CON (0x0C)
#define VG_OUT_CON_RGB_TYPE_MASK (3 << 17)
#define VG_OUT_CON_RGB_TYPE_601_NARROW (0 << 17)
#define VG_OUT_CON_RGB_TYPE_601_WIDE (1 << 17)
#define VG_OUT_CON_RGB_TYPE_709_NARROW (2 << 17)
#define VG_OUT_CON_RGB_TYPE_709_WIDE (3 << 17)
#define VG_OUT_CON_FRAME_ALPHA_MASK (0xFF << 24)
#define VG_OUT_CON_FRAME_ALPHA(x) (x << 24)
/* IDMA_VG(R)x_SRC_SIZE */
#define VG_SRC_SIZE (0x10)
#define VG_SRC_SIZE_HEIGHT_MASK (0x1FFF << 16)
#define VG_SRC_SIZE_HEIGHT(x) ((x) << 16)
#define VG_SRC_SIZE_WIDTH_MASK (0x1FFF << 0)
#define VG_SRC_SIZE_WIDTH(x) ((x) << 0)
/* IDMA_VG(R)x_SRC_OFFSET */
#define VG_SRC_OFFSET (0x14)
#define VG_SRC_OFFSET_Y_MASK (0x1FFF << 16)
#define VG_SRC_OFFSET_Y(x) ((x) << 16)
#define VG_SRC_OFFSET_X_MASK (0x1FFF << 0)
#define VG_SRC_OFFSET_X(x) ((x) << 0)
/* IDMA_VG(R)x_IMG_SIZE */
#define VG_IMG_SIZE (0x18)
#define VG_IMG_SIZE_HEIGHT_MASK (0x1FFF << 16)
#define VG_IMG_SIZE_HEIGHT(x) ((x) << 16)
#define VG_IMG_SIZE_WIDTH_MASK (0x1FFF << 0)
#define VG_IMG_SIZE_WIDTH(x) ((x) << 0)
/* IDMA_x_PINGPONG_UPDATE */
#define VG_PINGPONG_UPDATE (0x1C)
#define VG_ADDR_PINGPONG_UPDATE (1 << 0)
/* IDMA_VG(R)x_CHROMINANCE_STRIDE */
#define VG_CHROMINANCE_STRIDE (0x20)
#define VG_CHROMINANCE_STRIDE_MASK (0x1FFF << 0)
#define VG_CHROMINANCE_STRIDE_SIZE(x) ((x) << 0)
/* IDMA_VG(R)x_BLK_OFFSET */
#define VG_BLK_OFFSET (0x24)
#define VG_BLK_OFFSET_Y_MASK (0x1FFF << 16)
#define VG_BLK_OFFSET_Y(x) ((x) << 16)
#define VG_BLK_OFFSET_X_MASK (0x1FFF << 0)
#define VG_BLK_OFFSET_X(x) ((x) << 0)
/* IDMA_VG(R)x_BLK_SIZE */
#define VG_BLK_SIZE (0x28)
#define VG_BLK_SIZE_HEIGHT_MASK (0x1FFF << 16)
#define VG_BLK_SIZE_HEIGHT(x) ((x) << 16)
#define VG_BLK_SIZE_WIDTH_MASK (0x1FFF << 0)
#define VG_BLK_SIZE_WIDTH(x) ((x) << 0)
/* IDMA_VG(R)x_SCALED_SIZE */
#define VG_SCALED_SIZE (0x2C)
#define VG_SCALED_SIZE_HEIGHT_MASK (0x1FFF << 16)
#define VG_SCALED_SIZE_HEIGHT(x) ((x) << 16)
#define VG_SCALED_SIZE_WIDTH_MASK (0x1FFF << 0)
#define VG_SCALED_SIZE_WIDTH(x) ((x) << 0)
/* IDMA_VG(R)x_H_RATIO */
#define VG_H_RATIO (0x44)
#define VG_H_RATIO_MASK (0xFFFFFF << 0)
#define VG_H_RATIO_VALUE(x) ((x) << 0)
/* IDMA_VG(R)x_V_RATIO */
#define VG_V_RATIO (0x48)
#define VG_V_RATIO_MASK (0xFFFFFF << 0)
#define VG_V_RATIO_VALUE(x) ((x) << 0)
/* IDMA_VG(R)x LOOKUP TABLE */
#define VG_QOS_LUT07_00 (0x60)
#define VG_QOS_LUT15_08 (0x64)
/* IDMA_VG(R)x BASE ADDRESS CONTROL */
#define VG_BASE_ADDR_CON (0x70)
#define VG_BASE_ADDR_CON_MASK(n) (1 << (x))
#define VG_BASE_ADDR_CON_PINGPONG_MASK (3 << 16)
#define VG_BASE_ADDR_CON_PINGPONG(n) ((x) << 16)
#define VG_BASE_ADDR_CON_CURRENT(n) ((x) >> 24)
#define VG_BASE_ADDR_CON_CURRENT_INDEX_INIT (1 << 31)
/* IDMA_VG(R)x BASE ADDRESS */
#define VG_BASE_ADDR_Y(n) (0x74 + (n) * 0x4)
#define VG_BASE_ADDR_Y_EVEN(n) (0x84 + (n) * 0x4)
#define VG_BASE_ADDR_CB(n) (0x94 + (n) * 0x4)
#define VG_BASE_ADDR_CB_EVEN(n) (0xA4 + (n) * 0x4)
/* IDMA_VG(R)x scaling filter */
#define VG_H_COEF(n, s, x) (0x290 + (n) * 0x4 + (s) * 0x24 + (x) * 0x200)
#define VG_V_COEF(n, s, x) (0x200 + (n) * 0x4 + (s) * 0x24 + (x) * 0x200)
/* IDMA_VG(R)x Y(R) start H position */
#define VG_YHPOSITION0 (0x5B0)
/* IDMA_VG(R)x Y(R) start V position */
#define VG_YVPOSITION0 (0x5B4)
/* IDMA_VG(R)x CB(G)/CR(B) H position */
#define VG_CHPOSITION0 (0x5B8)
/* IDMA_VG(R)x CB(G)/CR(B) V position */
#define VG_CVPOSITION0 (0x5BC)
/* IDMA_VG(R)x Y(R) start H position for odd frame */
#define VG_YHPOSITION1 (0x5C0)
/* IDMA_VG(R)x Y(R) start V position for odd frame */
#define VG_YVPOSITION1 (0x5C4)
/* IDMA_VG(R)x CB(G)/CR(B) H position for odd frame */
#define VG_CHPOSITION1 (0x5C8)
/* IDMA_VG(R)x CB(G)/CR(B) V position for odd frame */
#define VG_CVPOSITION1 (0x5CC)
#define VG_POSITION_F_MASK (0xFFFFF << 0)
/* IDMA_VG(R)x Deadlock Counter Number */
#define VG_DEADLOCK_NUM (0xA00)
/* IDMA_VG(R)x Sharpness Enhancer Control */
#define VG_SHE_CON (0xA0C)
#define VG_SHE_CON_SHARP_PATTERN_MASK (1 << 3)
#define VG_SHE_CON_SHARP_PATTERN_ENABLE (0 << 3)
#define VG_SHE_CON_SHARP_EFFECT_MASK (7 << 0)
#define VG_SHE_CON_SHARP_EFFECT_MAX (7 << 0)
#define VG_SHE_CON_SHARP_EN (1 << 4)
#define VG_SHE_CON_SHARP_BYPASS (1 << 5)
/* IDMA_VG(R)x SMART Interface Pixel Number */
#define VG_SMART_IF_PIXEL_NUM (0xA48)
/* IDMA_VG(R)x Dynamic clock gating */
#define VG_DYNAMIC_GATING_ENABLE (0xA54)
#endif
|