forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/mgag200/mgag200_reg.h
....@@ -16,9 +16,10 @@
1616 * MGA1064SG Mystique register file
1717 */
1818
19
-
2019 #ifndef _MGA_REG_H_
2120 #define _MGA_REG_H_
21
+
22
+#include <linux/bits.h>
2223
2324 #define MGAREG_DWGCTL 0x1c00
2425 #define MGAREG_MACCESS 0x1c04
....@@ -221,20 +222,40 @@
221222
222223 #define MGAREG_MISC_IOADSEL (0x1 << 0)
223224 #define MGAREG_MISC_RAMMAPEN (0x1 << 1)
224
-#define MGAREG_MISC_CLK_SEL_VGA25 (0x0 << 2)
225
-#define MGAREG_MISC_CLK_SEL_VGA28 (0x1 << 2)
226
-#define MGAREG_MISC_CLK_SEL_MGA_PIX (0x2 << 2)
227
-#define MGAREG_MISC_CLK_SEL_MGA_MSK (0x3 << 2)
225
+#define MGAREG_MISC_CLKSEL_MASK GENMASK(3, 2)
226
+#define MGAREG_MISC_CLKSEL_VGA25 (0x0 << 2)
227
+#define MGAREG_MISC_CLKSEL_VGA28 (0x1 << 2)
228
+#define MGAREG_MISC_CLKSEL_MGA (0x3 << 2)
228229 #define MGAREG_MISC_VIDEO_DIS (0x1 << 4)
229230 #define MGAREG_MISC_HIGH_PG_SEL (0x1 << 5)
231
+#define MGAREG_MISC_HSYNCPOL BIT(6)
232
+#define MGAREG_MISC_VSYNCPOL BIT(7)
230233
231234 /* MMIO VGA registers */
232235 #define MGAREG_SEQ_INDEX 0x1fc4
233236 #define MGAREG_SEQ_DATA 0x1fc5
237
+
238
+#define MGAREG_SEQ0_ASYNCRST BIT(0)
239
+#define MGAREG_SEQ0_SYNCRST BIT(1)
240
+
241
+#define MGAREG_SEQ1_SCROFF BIT(5)
242
+
234243 #define MGAREG_CRTC_INDEX 0x1fd4
235244 #define MGAREG_CRTC_DATA 0x1fd5
245
+
246
+#define MGAREG_CRTC11_VINTCLR BIT(4)
247
+#define MGAREG_CRTC11_VINTEN BIT(5)
248
+#define MGAREG_CRTC11_CRTCPROTECT BIT(7)
249
+
236250 #define MGAREG_CRTCEXT_INDEX 0x1fde
237251 #define MGAREG_CRTCEXT_DATA 0x1fdf
252
+
253
+#define MGAREG_CRTCEXT0_OFFSET_MASK GENMASK(5, 4)
254
+
255
+#define MGAREG_CRTCEXT1_VSYNCOFF BIT(5)
256
+#define MGAREG_CRTCEXT1_HSYNCOFF BIT(4)
257
+
258
+#define MGAREG_CRTCEXT3_MGAMODE BIT(7)
238259
239260 /* Cursor X and Y position */
240261 #define MGA_CURPOSXL 0x3c0c
....@@ -262,6 +283,8 @@
262283 #define PCI_MGA_OPTION2 0x50
263284 #define PCI_MGA_OPTION3 0x54
264285
286
+#define PCI_MGA_OPTION_HARDPWMSK BIT(14)
287
+
265288 #define RAMDAC_OFFSET 0x3c00
266289
267290 /* TVP3026 direct registers */