annotate vidix/savage_regs.h @ 22930:8a38e7270fe7

documented -mpegopts :interleaving2
author nicodvb
date Sun, 08 Apr 2007 16:21:32 +0000
parents 9a1e26fef45b
children 88bed2131f19
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22850
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/savage/savage_regs.h,v 1.10 2001/11/04 22:17:48 alanh Exp $ */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
2
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
3 #ifndef _SAVAGE_REGS_H
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
4 #define _SAVAGE_REGS_H
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
5
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
6 /* These are here until xf86PciInfo.h is updated. */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
7
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
8 #ifndef PCI_CHIP_S3TWISTER_P
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
9 #define PCI_CHIP_S3TWISTER_P 0x8d01
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
10 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
11 #ifndef PCI_CHIP_S3TWISTER_K
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
12 #define PCI_CHIP_S3TWISTER_K 0x8d02
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
13 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
14 #ifndef PCI_CHIP_SUPSAV_MX128
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
15 #define PCI_CHIP_SUPSAV_MX128 0x8c22
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
16 #define PCI_CHIP_SUPSAV_MX64 0x8c24
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
17 #define PCI_CHIP_SUPSAV_MX64C 0x8c26
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
18 #define PCI_CHIP_SUPSAV_IX128SDR 0x8c2a
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
19 #define PCI_CHIP_SUPSAV_IX128DDR 0x8c2b
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
20 #define PCI_CHIP_SUPSAV_IX64SDR 0x8c2c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
21 #define PCI_CHIP_SUPSAV_IX64DDR 0x8c2d
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
22 #define PCI_CHIP_SUPSAV_IXCSDR 0x8c2e
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
23 #define PCI_CHIP_SUPSAV_IXCDDR 0x8c2f
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
24 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
25 #ifndef PCI_CHIP_PROSAVAGE_DDR
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
26 #define PCI_CHIP_PROSAVAGE_DDR 0x8d03
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
27 #define PCI_CHIP_PROSAVAGE_DDRK 0x8d04
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
28 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
29
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
30 #define S3_SAVAGE3D_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE_MX))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
31
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
32 #define S3_SAVAGE4_SERIES(chip) ((chip==S3_SAVAGE4) || (chip==S3_PROSAVAGE))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
33
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
34 #define S3_SAVAGE_MOBILE_SERIES(chip) ((chip==S3_SAVAGE_MX) || (chip==S3_SUPERSAVAGE))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
35
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
36 #define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
37
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
38
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
39 /* Chip tags. These are used to group the adapters into
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
40 * related families.
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
41 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
42
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
43
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
44 enum S3CHIPTAGS {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
45 S3_UNKNOWN = 0,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
46 S3_SAVAGE3D,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
47 S3_SAVAGE_MX,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
48 S3_SAVAGE4,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
49 S3_PROSAVAGE,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
50 S3_SUPERSAVAGE,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
51 S3_SAVAGE2000,
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
52 S3_LAST
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
53 };
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
54
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
55 typedef struct {
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
56 unsigned int mode, refresh;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
57 unsigned char SR08, SR0E, SR0F;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
58 unsigned char SR10, SR11, SR12, SR13, SR15, SR18, SR1B, SR29, SR30;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
59 unsigned char SR54[8];
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
60 unsigned char Clock;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
61 unsigned char CR31, CR32, CR33, CR34, CR36, CR3A, CR3B, CR3C;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
62 unsigned char CR40, CR41, CR42, CR43, CR45;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
63 unsigned char CR50, CR51, CR53, CR55, CR58, CR5B, CR5D, CR5E;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
64 unsigned char CR60, CR63, CR65, CR66, CR67, CR68, CR69, CR6D, CR6F;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
65 unsigned char CR86, CR88;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
66 unsigned char CR90, CR91, CRB0;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
67 unsigned int STREAMS[22]; /* yuck, streams regs */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
68 unsigned int MMPR0, MMPR1, MMPR2, MMPR3;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
69 } SavageRegRec, *SavageRegPtr;
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
70
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
71
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
72
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
73 #define BIOS_BSIZE 1024
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
74 #define BIOS_BASE 0xc0000
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
75
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
76 #define SAVAGE_NEWMMIO_REGBASE_S3 0x1000000 /* 16MB */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
77 #define SAVAGE_NEWMMIO_REGBASE_S4 0x0000000
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
78 #define SAVAGE_NEWMMIO_REGSIZE 0x0080000 /* 512kb */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
79 #define SAVAGE_NEWMMIO_VGABASE 0x8000
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
80
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
81 #define BASE_FREQ 14.31818
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
82
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
83 #define FIFO_CONTROL_REG 0x8200
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
84 #define MIU_CONTROL_REG 0x8204
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
85 #define STREAMS_TIMEOUT_REG 0x8208
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
86 #define MISC_TIMEOUT_REG 0x820c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
87
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
88 /* Stream Processor 1 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
89
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
90 /* Primary Stream 1 Frame Buffer Address 0 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
91 #define PRI_STREAM_FBUF_ADDR0 0x81c0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
92 /* Primary Stream 1 Frame Buffer Address 0 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
93 #define PRI_STREAM_FBUF_ADDR1 0x81c4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
94 /* Primary Stream 1 Stride */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
95 #define PRI_STREAM_STRIDE 0x81c8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
96 /* Primary Stream 1 Frame Buffer Size */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
97 #define PRI_STREAM_BUFFERSIZE 0x8214
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
98
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
99 /* Secondary stream 1 Color/Chroma Key Control */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
100 #define SEC_STREAM_CKEY_LOW 0x8184
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
101 /* Secondary stream 1 Chroma Key Upper Bound */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
102 #define SEC_STREAM_CKEY_UPPER 0x8194
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
103 /* Blend Control of Secondary Stream 1 & 2 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
104 #define BLEND_CONTROL 0x8190
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
105 /* Secondary Stream 1 Color conversion/Adjustment 1 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
106 #define SEC_STREAM_COLOR_CONVERT1 0x8198
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
107 /* Secondary Stream 1 Color conversion/Adjustment 2 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
108 #define SEC_STREAM_COLOR_CONVERT2 0x819c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
109 /* Secondary Stream 1 Color conversion/Adjustment 3 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
110 #define SEC_STREAM_COLOR_CONVERT3 0x81e4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
111 /* Secondary Stream 1 Horizontal Scaling */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
112 #define SEC_STREAM_HSCALING 0x81a0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
113 /* Secondary Stream 1 Frame Buffer Size */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
114 #define SEC_STREAM_BUFFERSIZE 0x81a8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
115 /* Secondary Stream 1 Horizontal Scaling Normalization (2K only) */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
116 #define SEC_STREAM_HSCALE_NORMALIZE 0x81ac
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
117 /* Secondary Stream 1 Horizontal Scaling */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
118 #define SEC_STREAM_VSCALING 0x81e8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
119 /* Secondary Stream 1 Frame Buffer Address 0 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
120 #define SEC_STREAM_FBUF_ADDR0 0x81d0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
121 /* Secondary Stream 1 Frame Buffer Address 1 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
122 #define SEC_STREAM_FBUF_ADDR1 0x81d4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
123 /* Secondary Stream 1 Frame Buffer Address 2 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
124 #define SEC_STREAM_FBUF_ADDR2 0x81ec
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
125 /* Secondary Stream 1 Stride */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
126 #define SEC_STREAM_STRIDE 0x81d8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
127 /* Secondary Stream 1 Window Start Coordinates */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
128 #define SEC_STREAM_WINDOW_START 0x81f8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
129 /* Secondary Stream 1 Window Size */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
130 #define SEC_STREAM_WINDOW_SZ 0x81fc
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
131 /* Secondary Streams Tile Offset */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
132 #define SEC_STREAM_TILE_OFF 0x821c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
133 /* Secondary Stream 1 Opaque Overlay Control */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
134 #define SEC_STREAM_OPAQUE_OVERLAY 0x81dc
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
135
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
136
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
137 /* Stream Processor 2 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
138
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
139 /* Primary Stream 2 Frame Buffer Address 0 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
140 #define PRI_STREAM2_FBUF_ADDR0 0x81b0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
141 /* Primary Stream 2 Frame Buffer Address 1 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
142 #define PRI_STREAM2_FBUF_ADDR1 0x81b4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
143 /* Primary Stream 2 Stride */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
144 #define PRI_STREAM2_STRIDE 0x81b8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
145 /* Primary Stream 2 Frame Buffer Size */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
146 #define PRI_STREAM2_BUFFERSIZE 0x8218
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
147
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
148 /* Secondary Stream 2 Color/Chroma Key Control */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
149 #define SEC_STREAM2_CKEY_LOW 0x8188
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
150 /* Secondary Stream 2 Chroma Key Upper Bound */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
151 #define SEC_STREAM2_CKEY_UPPER 0x818c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
152 /* Secondary Stream 2 Horizontal Scaling */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
153 #define SEC_STREAM2_HSCALING 0x81a4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
154 /* Secondary Stream 2 Horizontal Scaling */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
155 #define SEC_STREAM2_VSCALING 0x8204
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
156 /* Secondary Stream 2 Frame Buffer Size */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
157 #define SEC_STREAM2_BUFFERSIZE 0x81ac
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
158 /* Secondary Stream 2 Frame Buffer Address 0 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
159 #define SEC_STREAM2_FBUF_ADDR0 0x81bc
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
160 /* Secondary Stream 2 Frame Buffer Address 1 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
161 #define SEC_STREAM2_FBUF_ADDR1 0x81e0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
162 /* Secondary Stream 2 Frame Buffer Address 2 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
163 #define SEC_STREAM2_FBUF_ADDR2 0x8208
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
164 /* Multiple Buffer/LPB and Secondary Stream 2 Stride */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
165 #define SEC_STREAM2_STRIDE_LPB 0x81cc
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
166 /* Secondary Stream 2 Color conversion/Adjustment 1 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
167 #define SEC_STREAM2_COLOR_CONVERT1 0x81f0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
168 /* Secondary Stream 2 Color conversion/Adjustment 2 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
169 #define SEC_STREAM2_COLOR_CONVERT2 0x81f4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
170 /* Secondary Stream 2 Color conversion/Adjustment 3 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
171 #define SEC_STREAM2_COLOR_CONVERT3 0x8200
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
172 /* Secondary Stream 2 Window Start Coordinates */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
173 #define SEC_STREAM2_WINDOW_START 0x820c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
174 /* Secondary Stream 2 Window Size */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
175 #define SEC_STREAM2_WINDOW_SZ 0x8210
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
176 /* Secondary Stream 2 Opaque Overlay Control */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
177 #define SEC_STREAM2_OPAQUE_OVERLAY 0x8180
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
178
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
179
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
180 /* savage 2000 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
181 #define SEC_STREAM_COLOR_CONVERT0_2000 0x8198
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
182 #define SEC_STREAM_COLOR_CONVERT1_2000 0x819c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
183 #define SEC_STREAM_COLOR_CONVERT2_2000 0x81e0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
184 #define SEC_STREAM_COLOR_CONVERT3_2000 0x81e4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
185
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
186 #define SUBSYS_STAT_REG 0x8504
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
187
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
188 #define SRC_BASE 0xa4d4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
189 #define DEST_BASE 0xa4d8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
190 #define CLIP_L_R 0xa4dc
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
191 #define CLIP_T_B 0xa4e0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
192 #define DEST_SRC_STR 0xa4e4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
193 #define MONO_PAT_0 0xa4e8
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
194 #define MONO_PAT_1 0xa4ec
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
195
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
196 /* Constants for CR69. */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
197
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
198 #define CRT_ACTIVE 0x01
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
199 #define LCD_ACTIVE 0x02
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
200 #define TV_ACTIVE 0x04
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
201 #define CRT_ATTACHED 0x10
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
202 #define LCD_ATTACHED 0x20
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
203 #define TV_ATTACHED 0x40
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
204
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
205
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
206 /*
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
207 * reads from SUBSYS_STAT
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
208 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
209 #define STATUS_WORD0 (INREG(0x48C00))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
210 #define ALT_STATUS_WORD0 (INREG(0x48C60))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
211 #define MAXLOOP 0xffffff
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
212 #define IN_SUBSYS_STAT() (INREG(SUBSYS_STAT_REG))
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
213
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
214 #define MAXFIFO 0x7f00
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
215
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
216 /*
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
217 * NOTE: don't remove 'VGAIN8(vgaCRIndex);'.
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
218 * If not present it will cause lockups on Savage4.
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
219 * Ask S3, why.
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
220 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
221 /*#define VerticalRetraceWait() \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
222 { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
223 VGAIN8(0x3d0+4); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
224 VGAOUT8(0x3d0+4, 0x17); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
225 if (VGAIN8(0x3d0+5) & 0x80) { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
226 while ((VGAIN8(0x3d0 + 0x0a) & 0x08) == 0x08) ; \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
227 while ((VGAIN8(0x3d0 + 0x0a) & 0x08) == 0x00) ; \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
228 } \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
229 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
230 */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
231
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
232 #define VerticalRetraceWait() \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
233 do { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
234 VGAIN8(0x3d4); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
235 VGAOUT8(0x3d4, 0x17); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
236 if (VGAIN8(0x3d5) & 0x80) { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
237 int i = 0x10000; \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
238 while ((VGAIN8(0x3da) & 0x08) == 0x08 && i--) ; \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
239 i = 0x10000; \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
240 while ((VGAIN8(0x3da) & 0x08) == 0x00 && i--) ; \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
241 } \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
242 } while (0)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
243
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
244
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
245 #define I2C_REG 0xa0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
246 #define InI2CREG(a) \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
247 { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
248 VGAOUT8(0x3d0 + 4, I2C_REG); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
249 a = VGAIN8(0x3d0 + 5); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
250 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
251
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
252 #define OutI2CREG(a) \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
253 { \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
254 VGAOUT8(0x3d0 + 4, I2C_REG); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
255 VGAOUT8(0x3d0 + 5, a); \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
256 }
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
257
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
258 #define HZEXP_COMP_1 0x54
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
259 #define HZEXP_BORDER 0x58
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
260 #define HZEXP_FACTOR_IGA1 0x59
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
261
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
262 #define VTEXP_COMP_1 0x56
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
263 #define VTEXP_BORDER 0x5a
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
264 #define VTEXP_FACTOR_IGA1 0x5b
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
265
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
266 #define EC1_CENTER_ON 0x10
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
267 #define EC1_EXPAND_ON 0x0c
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
268
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
269 #define MODE_24 24
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
270
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
271 #if (MODE_24 == 32)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
272 # define BYTES_PP24 4
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
273 #else
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
274 # define BYTES_PP24 3
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
275 #endif
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
276
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
277 #define OVERLAY_DEPTH 16
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
278
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
279 #define STREAMS_MODE32 0x7
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
280 #define STREAMS_MODE24 0x6
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
281 #define STREAMS_MODE16 0x5 /* @@@ */
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
282
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
283
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
284 #define DEPTH_BPP(depth) (depth == 24 ? (BYTES_PP24 << 3) : (depth + 7) & ~0x7)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
285 #define DEPTH_2ND(depth) (depth > 8 ? depth\
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
286 : OVERLAY_DEPTH)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
287 #define SSTREAMS_MODE(bpp) (bpp > 16 ? (bpp > 24 ? STREAMS_MODE32 :\
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
288 STREAMS_MODE24) : STREAMS_MODE16)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
289
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
290 #define HSCALING_Shift 0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
291 #define HSCALING_Mask (((1L << 16)-1) << HSCALING_Shift)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
292 #define HSCALING(w0,w1) ((((unsigned int)(((double)w0/(double)w1) * (1 << 15))) \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
293 << HSCALING_Shift) \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
294 & HSCALING_Mask)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
295
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
296 #define VSCALING_Shift 0
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
297 #define VSCALING_Mask (((1L << 20)-1) << VSCALING_Shift)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
298 #define VSCALING(h0,h1) ((((unsigned int) (((double)h0/(double)h1) * (1 << 15))) \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
299 << VSCALING_Shift) \
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
300 & VSCALING_Mask)
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
301
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
302
9a1e26fef45b Move driver files directly into the vidix directory.
diego
parents:
diff changeset
303 #endif /* _SAVAGE_REGS_H */