annotate drivers/3dfx.h @ 4431:44c23fd75005

Added uninit to input
author albeu
date Thu, 31 Jan 2002 09:37:12 +0000
parents 7d702c3ef0ad
children 9a44c38d388c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * 3dfx.h
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 *
1980
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
4 * changed by zsteva Aug/Sep 2001, see vo_3dfx.c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
5 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 * Copyright (C) Colin Cross Apr 2000
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 * mpeg2dec is free software; you can redistribute it and/or modify
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 * the Free Software Foundation; either version 2, or (at your option)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 * any later version.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 * mpeg2dec is distributed in the hope that it will be useful,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 * GNU General Public License for more details.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 * along with GNU Make; see the file COPYING. If not, write to
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 #define VOODOO_IO_REG_OFFSET ((unsigned long int)0x0000000)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 #define VOODOO_YUV_REG_OFFSET ((unsigned long int)0x0080100)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #define VOODOO_AGP_REG_OFFSET ((unsigned long int)0x0080000)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 #define VOODOO_2D_REG_OFFSET ((unsigned long int)0x0100000)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 #define VOODOO_YUV_PLANE_OFFSET ((unsigned long int)0x0C00000)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 #define VOODOO_BLT_FORMAT_YUYV (8<<16)
2346
7d702c3ef0ad updated - by zsteva@ptt.yu
arpi
parents: 1980
diff changeset
32 #define VOODOO_BLT_FORMAT_UYVY (9<<16)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 #define VOODOO_BLT_FORMAT_16 (3<<16)
2346
7d702c3ef0ad updated - by zsteva@ptt.yu
arpi
parents: 1980
diff changeset
34 #define VOODOO_BLT_FORMAT_24 (4<<16)
7d702c3ef0ad updated - by zsteva@ptt.yu
arpi
parents: 1980
diff changeset
35 #define VOODOO_BLT_FORMAT_32 (5<<16)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 #define VOODOO_YUV_STRIDE (1024>>2)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 struct voodoo_yuv_fb_t {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 uint32_t Y[0x0040000];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 uint32_t U[0x0040000];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 uint32_t V[0x0040000];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 struct voodoo_yuv_reg_t {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 uint32_t yuvBaseAddr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 uint32_t yuvStride;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 struct voodoo_2d_reg_t {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 uint32_t status;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 uint32_t intCtrl;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 uint32_t clip0Min;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 uint32_t clip0Max;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 uint32_t dstBaseAddr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 uint32_t dstFormat;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 uint32_t srcColorkeyMin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 uint32_t srcColorkeyMax;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 uint32_t dstColorkeyMin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 uint32_t dstColorkeyMax;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 signed long bresError0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 signed long bresError1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 uint32_t rop;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 uint32_t srcBaseAddr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 uint32_t commandExtra;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 uint32_t lineStipple;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 uint32_t lineStyle;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 uint32_t pattern0Alias;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 uint32_t pattern1Alias;;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 uint32_t clip1Min;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 uint32_t clip1Max;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 uint32_t srcFormat;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 uint32_t srcSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 uint32_t srcXY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 uint32_t colorBack;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 uint32_t colorFore;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 uint32_t dstSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 uint32_t dstXY;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 uint32_t command;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 uint32_t RESERVED1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 uint32_t RESERVED2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 uint32_t RESERVED3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 uint8_t launchArea[128];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 struct voodoo_io_reg_t {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 uint32_t status;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 uint32_t pciInit0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 uint32_t sipMonitor;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 uint32_t lfbMemoryConfig;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 uint32_t miscInit0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 uint32_t miscInit1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 uint32_t dramInit0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 uint32_t dramInit1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 uint32_t agpInit;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 uint32_t tmuGbeInit;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 uint32_t vgaInit0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 uint32_t vgaInit1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 uint32_t dramCommand;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 uint32_t dramData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 uint32_t RESERVED1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 uint32_t RESERVED2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 uint32_t pllCtrl0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 uint32_t pllCtrl1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 uint32_t pllCtrl2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 uint32_t dacMode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 uint32_t dacAddr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 uint32_t dacData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 uint32_t rgbMaxDelta;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 uint32_t vidProcCfg;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 uint32_t hwCurPatAddr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 uint32_t hwCurLoc;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 uint32_t hwCurC0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 uint32_t hwCurC1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 uint32_t vidInFormat;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119 uint32_t vidInStatus;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120 uint32_t vidSerialParallelPort;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 uint32_t vidInXDecimDeltas;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122 uint32_t vidInDecimInitErrs;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 uint32_t vidInYDecimDeltas;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124 uint32_t vidPixelBufThold;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125 uint32_t vidChromaMin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126 uint32_t vidChromaMax;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127 uint32_t vidCurrentLine;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 uint32_t vidScreenSize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 uint32_t vidOverlayStartCoords;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 uint32_t vidOverlayEndScreenCoord;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131 uint32_t vidOverlayDudx;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132 uint32_t vidOverlayDudxOffsetSrcWidth;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133 uint32_t vidOverlayDvdy;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
135 uint32_t vga_registers_not_mem_mapped[12];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
136 uint32_t vidOverlayDvdyOffset;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137 uint32_t vidDesktopStartAddr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138 uint32_t vidDesktopOverlayStride;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139 uint32_t vidInAddr0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 uint32_t vidInAddr1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 uint32_t vidInAddr2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 uint32_t vidInStride;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143 uint32_t vidCurrOverlayStartAddr;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 struct pioData_t {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 short port;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149 short size;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150 int device;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 void *value;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154 typedef struct pioData_t pioData;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155 typedef struct voodoo_2d_reg_t voodoo_2d_reg;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 typedef struct voodoo_io_reg_t voodoo_io_reg;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 typedef struct voodoo_yuv_reg_t voodoo_yuv_reg;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 typedef struct voodoo_yuv_fb_t voodoo_yuv_fb;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159
1980
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
160
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
161 /* from linux/driver/video/tdfxfb.c, definition for 3dfx registers.
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
162 *
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
163 * author: Hannu Mallat <hmallat@cc.hut.fi>
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
164 */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
165
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
166 #ifndef PCI_DEVICE_ID_3DFX_VOODOO5
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
167 #define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
168 #endif
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
169
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
170 /* membase0 register offsets */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
171 #define STATUS 0x00
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
172 #define PCIINIT0 0x04
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
173 #define SIPMONITOR 0x08
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
174 #define LFBMEMORYCONFIG 0x0c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
175 #define MISCINIT0 0x10
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
176 #define MISCINIT1 0x14
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
177 #define DRAMINIT0 0x18
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
178 #define DRAMINIT1 0x1c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
179 #define AGPINIT 0x20
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
180 #define TMUGBEINIT 0x24
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
181 #define VGAINIT0 0x28
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
182 #define VGAINIT1 0x2c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
183 #define DRAMCOMMAND 0x30
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
184 #define DRAMDATA 0x34
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
185 /* reserved 0x38 */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
186 /* reserved 0x3c */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
187 #define PLLCTRL0 0x40
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
188 #define PLLCTRL1 0x44
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
189 #define PLLCTRL2 0x48
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
190 #define DACMODE 0x4c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
191 #define DACADDR 0x50
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
192 #define DACDATA 0x54
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
193 #define RGBMAXDELTA 0x58
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
194 #define VIDPROCCFG 0x5c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
195 #define HWCURPATADDR 0x60
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
196 #define HWCURLOC 0x64
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
197 #define HWCURC0 0x68
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
198 #define HWCURC1 0x6c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
199 #define VIDINFORMAT 0x70
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
200 #define VIDINSTATUS 0x74
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
201 #define VIDSERPARPORT 0x78
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
202 #define VIDINXDELTA 0x7c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
203 #define VIDININITERR 0x80
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
204 #define VIDINYDELTA 0x84
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
205 #define VIDPIXBUFTHOLD 0x88
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
206 #define VIDCHRMIN 0x8c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
207 #define VIDCHRMAX 0x90
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
208 #define VIDCURLIN 0x94
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
209 #define VIDSCREENSIZE 0x98
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
210 #define VIDOVRSTARTCRD 0x9c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
211 #define VIDOVRENDCRD 0xa0
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
212 #define VIDOVRDUDX 0xa4
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
213 #define VIDOVRDUDXOFF 0xa8
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
214 #define VIDOVRDVDY 0xac
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
215 /* ... */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
216 #define VIDOVRDVDYOFF 0xe0
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
217 #define VIDDESKSTART 0xe4
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
218 #define VIDDESKSTRIDE 0xe8
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
219 #define VIDINADDR0 0xec
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
220 #define VIDINADDR1 0xf0
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
221 #define VIDINADDR2 0xf4
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
222 #define VIDINSTRIDE 0xf8
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
223 #define VIDCUROVRSTART 0xfc
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
224
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
225 #define INTCTRL (0x00100000 + 0x04)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
226 #define CLIP0MIN (0x00100000 + 0x08)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
227 #define CLIP0MAX (0x00100000 + 0x0c)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
228 #define DSTBASE (0x00100000 + 0x10)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
229 #define DSTFORMAT (0x00100000 + 0x14)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
230 #define SRCBASE (0x00100000 + 0x34)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
231 #define COMMANDEXTRA_2D (0x00100000 + 0x38)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
232 #define CLIP1MIN (0x00100000 + 0x4c)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
233 #define CLIP1MAX (0x00100000 + 0x50)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
234 #define SRCFORMAT (0x00100000 + 0x54)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
235 #define SRCSIZE (0x00100000 + 0x58)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
236 #define SRCXY (0x00100000 + 0x5c)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
237 #define COLORBACK (0x00100000 + 0x60)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
238 #define COLORFORE (0x00100000 + 0x64)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
239 #define DSTSIZE (0x00100000 + 0x68)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
240 #define DSTXY (0x00100000 + 0x6c)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
241 #define COMMAND_2D (0x00100000 + 0x70)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
242 #define LAUNCH_2D (0x00100000 + 0x80)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
243
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
244 #define COMMAND_3D (0x00200000 + 0x120)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
245
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
246 /* register bitfields (not all, only as needed) */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
247
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
248 #define BIT(x) (1UL << (x))
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
249
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
250 /* COMMAND_2D reg. values */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
251 #define ROP_COPY 0xcc // src
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
252 #define ROP_INVERT 0x55 // NOT dst
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
253 #define ROP_XOR 0x66 // src XOR dst
2346
7d702c3ef0ad updated - by zsteva@ptt.yu
arpi
parents: 1980
diff changeset
254 #define ROP_OR (0xee) /* src | dst */
1980
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
255
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
256 #define AUTOINC_DSTX BIT(10)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
257 #define AUTOINC_DSTY BIT(11)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
258 #define COMMAND_2D_FILLRECT 0x05
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
259 #define COMMAND_2D_S2S_BITBLT 0x01 // screen to screen
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
260 #define COMMAND_2D_H2S_BITBLT 0x03 // host to screen
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
261
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
262
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
263 #define COMMAND_3D_NOP 0x00
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
264 #define STATUS_RETRACE BIT(6)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
265 #define STATUS_BUSY BIT(9)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
266 #define MISCINIT1_CLUT_INV BIT(0)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
267 #define MISCINIT1_2DBLOCK_DIS BIT(15)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
268 #define DRAMINIT0_SGRAM_NUM BIT(26)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
269 #define DRAMINIT0_SGRAM_TYPE BIT(27)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
270 #define DRAMINIT1_MEM_SDRAM BIT(30)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
271 #define VGAINIT0_VGA_DISABLE BIT(0)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
272 #define VGAINIT0_EXT_TIMING BIT(1)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
273 #define VGAINIT0_8BIT_DAC BIT(2)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
274 #define VGAINIT0_EXT_ENABLE BIT(6)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
275 #define VGAINIT0_WAKEUP_3C3 BIT(8)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
276 #define VGAINIT0_LEGACY_DISABLE BIT(9)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
277 #define VGAINIT0_ALT_READBACK BIT(10)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
278 #define VGAINIT0_FAST_BLINK BIT(11)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
279 #define VGAINIT0_EXTSHIFTOUT BIT(12)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
280 #define VGAINIT0_DECODE_3C6 BIT(13)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
281 #define VGAINIT0_SGRAM_HBLANK_DISABLE BIT(22)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
282 #define VGAINIT1_MASK 0x1fffff
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
283 #define VIDCFG_VIDPROC_ENABLE BIT(0)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
284 #define VIDCFG_CURS_X11 BIT(1)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
285 #define VIDCFG_HALF_MODE BIT(4)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
286 #define VIDCFG_DESK_ENABLE BIT(7)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
287 #define VIDCFG_CLUT_BYPASS BIT(10)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
288 #define VIDCFG_2X BIT(26)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
289 #define VIDCFG_HWCURSOR_ENABLE BIT(27)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
290 #define VIDCFG_PIXFMT_SHIFT 18
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
291 #define DACMODE_2X BIT(0)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
292
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
293 /* VGA rubbish, need to change this for multihead support */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
294 #define MISC_W 0x3c2
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
295 #define MISC_R 0x3cc
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
296 #define SEQ_I 0x3c4
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
297 #define SEQ_D 0x3c5
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
298 #define CRT_I 0x3d4
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
299 #define CRT_D 0x3d5
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
300 #define ATT_IW 0x3c0
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
301 #define IS1_R 0x3da
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
302 #define GRA_I 0x3ce
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
303 #define GRA_D 0x3cf
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
304
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
305 #ifndef FB_ACCEL_3DFX_BANSHEE
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
306 #define FB_ACCEL_3DFX_BANSHEE 31
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
307 #endif
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
308
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
309 #define TDFXF_HSYNC_ACT_HIGH 0x01
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
310 #define TDFXF_HSYNC_ACT_LOW 0x02
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
311 #define TDFXF_VSYNC_ACT_HIGH 0x04
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
312 #define TDFXF_VSYNC_ACT_LOW 0x08
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
313 #define TDFXF_LINE_DOUBLE 0x10
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
314 #define TDFXF_VIDEO_ENABLE 0x20
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
315
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
316 #define TDFXF_HSYNC_MASK 0x03
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
317 #define TDFXF_VSYNC_MASK 0x0c
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
318
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
319 #define XYREG(x,y) (((y) << 16) | (x))
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
320
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
321 //#define TDFXFB_DEBUG
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
322 #ifdef TDFXFB_DEBUG
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
323 #define DPRINTK(a,b...) printk(KERN_DEBUG "fb: %s: " a, __FUNCTION__ , ## b)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
324 #else
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
325 #define DPRINTK(a,b...)
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
326 #endif
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
327
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
328 /* ------------------------------------------------------------------------- */
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
329
4a08e7ac3f59 tdfxfb yuv driver by Zeljko Stevanovic <zsteva@ptt.yu>
arpi
parents: 1
diff changeset
330