diff options
Diffstat (limited to 'include/video/pm3fb.h')
-rw-r--r-- | include/video/pm3fb.h | 1234 |
1 files changed, 602 insertions, 632 deletions
diff --git a/include/video/pm3fb.h b/include/video/pm3fb.h index 541c0bd4ab76..2b85134fe96f 100644 --- a/include/video/pm3fb.h +++ b/include/video/pm3fb.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/pm3fb.h -- 3DLabs Permedia3 frame buffer device | 2 | * linux/drivers/video/pm3fb.h -- 3DLabs Permedia3 frame buffer device |
3 | * | 3 | * |
4 | * Copyright (C) 2001 Romain Dolbeau <dolbeau@irisa.fr> | 4 | * Copyright (C) 2001 Romain Dolbeau <dolbeau@irisa.fr> |
5 | * Copyright (C) 2001 Sven Luther, <luther@dpt-info.u-strasbg.fr> | 5 | * Copyright (C) 2001 Sven Luther, <luther@dpt-info.u-strasbg.fr> |
6 | * | 6 | * |
@@ -51,36 +51,36 @@ | |||
51 | * GLINT Permedia3 Region 0 Bypass Controls * | 51 | * GLINT Permedia3 Region 0 Bypass Controls * |
52 | ***********************************************/ | 52 | ***********************************************/ |
53 | #define PM3ByAperture1Mode 0x0300 | 53 | #define PM3ByAperture1Mode 0x0300 |
54 | #define PM3ByApertureMode_BYTESWAP_ABCD (0<<0) | 54 | #define PM3ByApertureMode_BYTESWAP_ABCD (0 << 0) |
55 | #define PM3ByApertureMode_BYTESWAP_BADC (1<<0) | 55 | #define PM3ByApertureMode_BYTESWAP_BADC (1 << 0) |
56 | #define PM3ByApertureMode_BYTESWAP_CDAB (2<<0) | 56 | #define PM3ByApertureMode_BYTESWAP_CDAB (2 << 0) |
57 | #define PM3ByApertureMode_BYTESWAP_DCBA (3<<0) | 57 | #define PM3ByApertureMode_BYTESWAP_DCBA (3 << 0) |
58 | #define PM3ByApertureMode_PATCH_ENABLE (1<<2) | 58 | #define PM3ByApertureMode_PATCH_ENABLE (1 << 2) |
59 | #define PM3ByApertureMode_FORMAT_RAW (0<<3) | 59 | #define PM3ByApertureMode_FORMAT_RAW (0 << 3) |
60 | #define PM3ByApertureMode_FORMAT_YUYV (1<<3) | 60 | #define PM3ByApertureMode_FORMAT_YUYV (1 << 3) |
61 | #define PM3ByApertureMode_FORMAT_UYVY (2<<3) | 61 | #define PM3ByApertureMode_FORMAT_UYVY (2 << 3) |
62 | #define PM3ByApertureMode_PIXELSIZE_8BIT (0<<5) | 62 | #define PM3ByApertureMode_PIXELSIZE_8BIT (0 << 5) |
63 | #define PM3ByApertureMode_PIXELSIZE_16BIT (1<<5) | 63 | #define PM3ByApertureMode_PIXELSIZE_16BIT (1 << 5) |
64 | #define PM3ByApertureMode_PIXELSIZE_32BIT (2<<5) | 64 | #define PM3ByApertureMode_PIXELSIZE_32BIT (2 << 5) |
65 | #define PM3ByApertureMode_PIXELSIZE_MASK (3<<5) | 65 | #define PM3ByApertureMode_PIXELSIZE_MASK (3 << 5) |
66 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_1024 (0<<7) | 66 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_1024 (0 << 7) |
67 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_2048 (1<<7) | 67 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_2048 (1 << 7) |
68 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_4096 (2<<7) | 68 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_4096 (2 << 7) |
69 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_8192 (3<<7) | 69 | #define PM3ByApertureMode_EFFECTIVE_STRIDE_8192 (3 << 7) |
70 | #define PM3ByApertureMode_PATCH_OFFSET_X(off) (((off)&7f)<<9) | 70 | #define PM3ByApertureMode_PATCH_OFFSET_X(off) (((off) & 0x7f) << 9) |
71 | #define PM3ByApertureMode_PATCH_OFFSET_Y(off) (((off)&7f)<<16) | 71 | #define PM3ByApertureMode_PATCH_OFFSET_Y(off) (((off) & 0x7f) << 16) |
72 | #define PM3ByApertureMode_FRAMEBUFFER (0<<21) | 72 | #define PM3ByApertureMode_FRAMEBUFFER (0 << 21) |
73 | #define PM3ByApertureMode_LOCALBUFFER (1<<21) | 73 | #define PM3ByApertureMode_LOCALBUFFER (1 << 21) |
74 | #define PM3ByApertureMode_DOUBLE_WRITE_OFF (0<<22) | 74 | #define PM3ByApertureMode_DOUBLE_WRITE_OFF (0 << 22) |
75 | #define PM3ByApertureMode_DOUBLE_WRITE_1MB (1<<22) | 75 | #define PM3ByApertureMode_DOUBLE_WRITE_1MB (1 << 22) |
76 | #define PM3ByApertureMode_DOUBLE_WRITE_2MB (2<<22) | 76 | #define PM3ByApertureMode_DOUBLE_WRITE_2MB (2 << 22) |
77 | #define PM3ByApertureMode_DOUBLE_WRITE_4MB (3<<22) | 77 | #define PM3ByApertureMode_DOUBLE_WRITE_4MB (3 << 22) |
78 | #define PM3ByApertureMode_DOUBLE_WRITE_8MB (4<<22) | 78 | #define PM3ByApertureMode_DOUBLE_WRITE_8MB (4 << 22) |
79 | #define PM3ByApertureMode_DOUBLE_WRITE_16MB (5<<22) | 79 | #define PM3ByApertureMode_DOUBLE_WRITE_16MB (5 << 22) |
80 | #define PM3ByApertureMode_DOUBLE_WRITE_32MB (6<<22) | 80 | #define PM3ByApertureMode_DOUBLE_WRITE_32MB (6 << 22) |
81 | 81 | ||
82 | #define PM3ByAperture2Mode 0x0328 | 82 | #define PM3ByAperture2Mode 0x0328 |
83 | 83 | ||
84 | /********************************************** | 84 | /********************************************** |
85 | * GLINT Permedia3 Memory Control (0x1000) * | 85 | * GLINT Permedia3 Memory Control (0x1000) * |
86 | ***********************************************/ | 86 | ***********************************************/ |
@@ -88,7 +88,7 @@ | |||
88 | #define PM3MemBypassWriteMask 0x1008 | 88 | #define PM3MemBypassWriteMask 0x1008 |
89 | #define PM3MemScratch 0x1010 | 89 | #define PM3MemScratch 0x1010 |
90 | #define PM3LocalMemCaps 0x1018 | 90 | #define PM3LocalMemCaps 0x1018 |
91 | #define PM3LocalMemCaps_NoWriteMask (1 << 28) | 91 | #define PM3LocalMemCaps_NoWriteMask (1 << 28) |
92 | #define PM3LocalMemTimings 0x1020 | 92 | #define PM3LocalMemTimings 0x1020 |
93 | #define PM3LocalMemControl 0x1028 | 93 | #define PM3LocalMemControl 0x1028 |
94 | #define PM3LocalMemRefresh 0x1030 | 94 | #define PM3LocalMemRefresh 0x1030 |
@@ -111,41 +111,41 @@ | |||
111 | #define PM3VsStart 0x3048 | 111 | #define PM3VsStart 0x3048 |
112 | #define PM3VsEnd 0x3050 | 112 | #define PM3VsEnd 0x3050 |
113 | #define PM3VideoControl 0x3058 | 113 | #define PM3VideoControl 0x3058 |
114 | #define PM3VideoControl_ENABLE (1<<0) | 114 | #define PM3VideoControl_ENABLE (1 << 0) |
115 | #define PM3VideoControl_BLANK_ACTIVE_HIGH (0<<1) | 115 | #define PM3VideoControl_BLANK_ACTIVE_HIGH (0 << 1) |
116 | #define PM3VideoControl_BLANK_ACTIVE_LOW (1<<1) | 116 | #define PM3VideoControl_BLANK_ACTIVE_LOW (1 << 1) |
117 | #define PM3VideoControl_LINE_DOUBLE_OFF (0<<2) | 117 | #define PM3VideoControl_LINE_DOUBLE_OFF (0 << 2) |
118 | #define PM3VideoControl_LINE_DOUBLE_ON (1<<2) | 118 | #define PM3VideoControl_LINE_DOUBLE_ON (1 << 2) |
119 | #define PM3VideoControl_HSYNC_FORCE_HIGH (0<<3) | 119 | #define PM3VideoControl_HSYNC_FORCE_HIGH (0 << 3) |
120 | #define PM3VideoControl_HSYNC_ACTIVE_HIGH (1<<3) | 120 | #define PM3VideoControl_HSYNC_ACTIVE_HIGH (1 << 3) |
121 | #define PM3VideoControl_HSYNC_FORCE_LOW (2<<3) | 121 | #define PM3VideoControl_HSYNC_FORCE_LOW (2 << 3) |
122 | #define PM3VideoControl_HSYNC_ACTIVE_LOW (3<<3) | 122 | #define PM3VideoControl_HSYNC_ACTIVE_LOW (3 << 3) |
123 | #define PM3VideoControl_HSYNC_MASK (3<<3) | 123 | #define PM3VideoControl_HSYNC_MASK (3 << 3) |
124 | #define PM3VideoControl_VSYNC_FORCE_HIGH (0<<5) | 124 | #define PM3VideoControl_VSYNC_FORCE_HIGH (0 << 5) |
125 | #define PM3VideoControl_VSYNC_ACTIVE_HIGH (1<<5) | 125 | #define PM3VideoControl_VSYNC_ACTIVE_HIGH (1 << 5) |
126 | #define PM3VideoControl_VSYNC_FORCE_LOW (2<<5) | 126 | #define PM3VideoControl_VSYNC_FORCE_LOW (2 << 5) |
127 | #define PM3VideoControl_VSYNC_ACTIVE_LOW (3<<5) | 127 | #define PM3VideoControl_VSYNC_ACTIVE_LOW (3 << 5) |
128 | #define PM3VideoControl_VSYNC_MASK (3<<5) | 128 | #define PM3VideoControl_VSYNC_MASK (3 << 5) |
129 | #define PM3VideoControl_BYTE_DOUBLE_OFF (0<<7) | 129 | #define PM3VideoControl_BYTE_DOUBLE_OFF (0 << 7) |
130 | #define PM3VideoControl_BYTE_DOUBLE_ON (1<<7) | 130 | #define PM3VideoControl_BYTE_DOUBLE_ON (1 << 7) |
131 | #define PM3VideoControl_BUFFER_SWAP_SYNCON_FRAMEBLANK (0<<9) | 131 | #define PM3VideoControl_BUFFER_SWAP_SYNCON_FRAMEBLANK (0 << 9) |
132 | #define PM3VideoControl_BUFFER_SWAP_FREE_RUNNING (1<<9) | 132 | #define PM3VideoControl_BUFFER_SWAP_FREE_RUNNING (1 << 9) |
133 | #define PM3VideoControl_BUFFER_SWAP_LIMITETO_FRAMERATE (2<<9) | 133 | #define PM3VideoControl_BUFFER_SWAP_LIMITETO_FRAMERATE (2 << 9) |
134 | #define PM3VideoControl_STEREO_ENABLE (1<<11) | 134 | #define PM3VideoControl_STEREO_ENABLE (1 << 11) |
135 | #define PM3VideoControl_RIGHT_EYE_ACTIVE_HIGH (0<<12) | 135 | #define PM3VideoControl_RIGHT_EYE_ACTIVE_HIGH (0 << 12) |
136 | #define PM3VideoControl_RIGHT_EYE_ACTIVE_LOW (1<<12) | 136 | #define PM3VideoControl_RIGHT_EYE_ACTIVE_LOW (1 << 12) |
137 | #define PM3VideoControl_VIDEO_EXT_LOW (0<<14) | 137 | #define PM3VideoControl_VIDEO_EXT_LOW (0 << 14) |
138 | #define PM3VideoControl_VIDEO_EXT_HIGH (1<<14) | 138 | #define PM3VideoControl_VIDEO_EXT_HIGH (1 << 14) |
139 | #define PM3VideoControl_SYNC_MODE_INDEPENDENT (0<<16) | 139 | #define PM3VideoControl_SYNC_MODE_INDEPENDENT (0 << 16) |
140 | #define PM3VideoControl_SYNC_MODE_SYNCTO_VSA (1<<16) | 140 | #define PM3VideoControl_SYNC_MODE_SYNCTO_VSA (1 << 16) |
141 | #define PM3VideoControl_SYNC_MODE_SYNCTO_VSB (2<<16) | 141 | #define PM3VideoControl_SYNC_MODE_SYNCTO_VSB (2 << 16) |
142 | #define PM3VideoControl_PATCH_ENABLE (1<<18) | 142 | #define PM3VideoControl_PATCH_ENABLE (1 << 18) |
143 | #define PM3VideoControl_PIXELSIZE_8BIT (0<<19) | 143 | #define PM3VideoControl_PIXELSIZE_8BIT (0 << 19) |
144 | #define PM3VideoControl_PIXELSIZE_16BIT (1<<19) | 144 | #define PM3VideoControl_PIXELSIZE_16BIT (1 << 19) |
145 | #define PM3VideoControl_PIXELSIZE_32BIT (2<<19) | 145 | #define PM3VideoControl_PIXELSIZE_32BIT (2 << 19) |
146 | #define PM3VideoControl_DISPLAY_ENABLE (1<<21) | 146 | #define PM3VideoControl_DISPLAY_ENABLE (1 << 21) |
147 | #define PM3VideoControl_PATCH_OFFSET_X(off) (((off)&0x3f)<<22) | 147 | #define PM3VideoControl_PATCH_OFFSET_X(off) (((off) & 0x3f) << 22) |
148 | #define PM3VideoControl_PATCH_OFFSET_Y(off) (((off)&0x3f)<<28) | 148 | #define PM3VideoControl_PATCH_OFFSET_Y(off) (((off) & 0x3f) << 28) |
149 | #define PM3InterruptLine 0x3060 | 149 | #define PM3InterruptLine 0x3060 |
150 | #define PM3DisplayData 0x3068 | 150 | #define PM3DisplayData 0x3068 |
151 | #define PM3VerticalLineCount 0x3070 | 151 | #define PM3VerticalLineCount 0x3070 |
@@ -154,78 +154,93 @@ | |||
154 | #define PM3MiscControl 0x3088 | 154 | #define PM3MiscControl 0x3088 |
155 | 155 | ||
156 | #define PM3VideoOverlayUpdate 0x3100 | 156 | #define PM3VideoOverlayUpdate 0x3100 |
157 | #define PM3VideoOverlayUpdate_ENABLE (1<<0) | 157 | #define PM3VideoOverlayUpdate_ENABLE (1 << 0) |
158 | #define PM3VideoOverlayMode 0x3108 | 158 | #define PM3VideoOverlayMode 0x3108 |
159 | #define PM3VideoOverlayMode_ENABLE (1<<0) | 159 | #define PM3VideoOverlayMode_ENABLE (1 << 0) |
160 | #define PM3VideoOverlayMode_BUFFERSYNC_MANUAL (0<<1) | 160 | #define PM3VideoOverlayMode_BUFFERSYNC_MANUAL (0 << 1) |
161 | #define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMA (1<<1) | 161 | #define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMA (1 << 1) |
162 | #define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMB (2<<1) | 162 | #define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMB (2 << 1) |
163 | #define PM3VideoOverlayMode_FIELDPOLARITY_NORMAL (0<<4) | 163 | #define PM3VideoOverlayMode_FIELDPOLARITY_NORMAL (0 << 4) |
164 | #define PM3VideoOverlayMode_FIELDPOLARITY_INVERT (1<<4) | 164 | #define PM3VideoOverlayMode_FIELDPOLARITY_INVERT (1 << 4) |
165 | #define PM3VideoOverlayMode_PIXELSIZE_8BIT (0<<5) | 165 | #define PM3VideoOverlayMode_PIXELSIZE_8BIT (0 << 5) |
166 | #define PM3VideoOverlayMode_PIXELSIZE_16BIT (1<<5) | 166 | #define PM3VideoOverlayMode_PIXELSIZE_16BIT (1 << 5) |
167 | #define PM3VideoOverlayMode_PIXELSIZE_32BIT (2<<5) | 167 | #define PM3VideoOverlayMode_PIXELSIZE_32BIT (2 << 5) |
168 | #define PM3VideoOverlayMode_COLORFORMAT_RGB8888 ((0<<7)|(1<<12)|(2<<5)) | 168 | #define PM3VideoOverlayMode_COLORFORMAT_RGB8888 \ |
169 | #define PM3VideoOverlayMode_COLORFORMAT_RGB4444 ((1<<7)|(1<<12)|(1<<5)) | 169 | ((0 << 7)|(1 << 12)|(2 << 5)) |
170 | #define PM3VideoOverlayMode_COLORFORMAT_RGB5551 ((2<<7)|(1<<12)|(1<<5)) | 170 | #define PM3VideoOverlayMode_COLORFORMAT_RGB4444 \ |
171 | #define PM3VideoOverlayMode_COLORFORMAT_RGB565 ((3<<7)|(1<<12)|(1<<5)) | 171 | ((1 << 7)|(1 << 12)|(1 << 5)) |
172 | #define PM3VideoOverlayMode_COLORFORMAT_RGB332 ((4<<7)|(1<<12)|(0<<5)) | 172 | #define PM3VideoOverlayMode_COLORFORMAT_RGB5551 \ |
173 | #define PM3VideoOverlayMode_COLORFORMAT_BGR8888 ((0<<7)|(2<<5)) | 173 | ((2 << 7)|(1 << 12)|(1 << 5)) |
174 | #define PM3VideoOverlayMode_COLORFORMAT_BGR4444 ((1<<7)|(1<<5)) | 174 | #define PM3VideoOverlayMode_COLORFORMAT_RGB565 \ |
175 | #define PM3VideoOverlayMode_COLORFORMAT_BGR5551 ((2<<7)|(1<<5)) | 175 | ((3 << 7)|(1 << 12)|(1 << 5)) |
176 | #define PM3VideoOverlayMode_COLORFORMAT_BGR565 ((3<<7)|(1<<5)) | 176 | #define PM3VideoOverlayMode_COLORFORMAT_RGB332 \ |
177 | #define PM3VideoOverlayMode_COLORFORMAT_BGR332 ((4<<7)|(0<<5)) | 177 | ((4 << 7)|(1 << 12)|(0 << 5)) |
178 | #define PM3VideoOverlayMode_COLORFORMAT_CI8 ((5<<7)|(1<<12)|(0<<5)) | 178 | #define PM3VideoOverlayMode_COLORFORMAT_BGR8888 \ |
179 | #define PM3VideoOverlayMode_COLORFORMAT_VUY444 ((2<<10)|(1<<12)|(2<<5)) | 179 | ((0 << 7)|(2 << 5)) |
180 | #define PM3VideoOverlayMode_COLORFORMAT_YUV444 ((2<<10)|(2<<5)) | 180 | #define PM3VideoOverlayMode_COLORFORMAT_BGR4444 \ |
181 | #define PM3VideoOverlayMode_COLORFORMAT_VUY422 ((1<<10)|(1<<12)|(1<<5)) | 181 | ((1 << 7)|(1 << 5)) |
182 | #define PM3VideoOverlayMode_COLORFORMAT_YUV422 ((1<<10)|(1<<5)) | 182 | #define PM3VideoOverlayMode_COLORFORMAT_BGR5551 \ |
183 | #define PM3VideoOverlayMode_COLORORDER_BGR (0<<12) | 183 | ((2 << 7)|(1 << 5)) |
184 | #define PM3VideoOverlayMode_COLORORDER_RGB (1<<12) | 184 | #define PM3VideoOverlayMode_COLORFORMAT_BGR565 \ |
185 | #define PM3VideoOverlayMode_LINEARCOLOREXT_OFF (0<<13) | 185 | ((3 << 7)|(1 << 5)) |
186 | #define PM3VideoOverlayMode_LINEARCOLOREXT_ON (1<<13) | 186 | #define PM3VideoOverlayMode_COLORFORMAT_BGR332 \ |
187 | #define PM3VideoOverlayMode_FILTER_MASK (3<<14) | 187 | ((4 << 7)|(0 << 5)) |
188 | #define PM3VideoOverlayMode_FILTER_OFF (0<<14) | 188 | #define PM3VideoOverlayMode_COLORFORMAT_CI8 \ |
189 | #define PM3VideoOverlayMode_FILTER_FULL (1<<14) | 189 | ((5 << 7)|(1 << 12)|(0 << 5)) |
190 | #define PM3VideoOverlayMode_FILTER_PARTIAL (2<<14) | 190 | #define PM3VideoOverlayMode_COLORFORMAT_VUY444 \ |
191 | #define PM3VideoOverlayMode_DEINTERLACE_OFF (0<<16) | 191 | ((2 << 10)|(1 << 12)|(2 << 5)) |
192 | #define PM3VideoOverlayMode_DEINTERLACE_BOB (1<<16) | 192 | #define PM3VideoOverlayMode_COLORFORMAT_YUV444 \ |
193 | #define PM3VideoOverlayMode_PATCHMODE_OFF (0<<18) | 193 | ((2 << 10)|(2 << 5)) |
194 | #define PM3VideoOverlayMode_PATCHMODE_ON (1<<18) | 194 | #define PM3VideoOverlayMode_COLORFORMAT_VUY422 \ |
195 | #define PM3VideoOverlayMode_FLIP_VIDEO (0<<20) | 195 | ((1 << 10)|(1 << 12)|(1 << 5)) |
196 | #define PM3VideoOverlayMode_FLIP_VIDEOSTREAMA (1<<20) | 196 | #define PM3VideoOverlayMode_COLORFORMAT_YUV422 \ |
197 | #define PM3VideoOverlayMode_FLIP_VIDEOSTREAMB (2<<20) | 197 | ((1 << 10)|(1 << 5)) |
198 | #define PM3VideoOverlayMode_MIRROR_MASK (3<<23) | 198 | #define PM3VideoOverlayMode_COLORORDER_BGR (0 << 12) |
199 | #define PM3VideoOverlayMode_MIRRORX_OFF (0<<23) | 199 | #define PM3VideoOverlayMode_COLORORDER_RGB (1 << 12) |
200 | #define PM3VideoOverlayMode_MIRRORX_ON (1<<23) | 200 | #define PM3VideoOverlayMode_LINEARCOLOREXT_OFF (0 << 13) |
201 | #define PM3VideoOverlayMode_MIRRORY_OFF (0<<24) | 201 | #define PM3VideoOverlayMode_LINEARCOLOREXT_ON (1 << 13) |
202 | #define PM3VideoOverlayMode_MIRRORY_ON (1<<24) | 202 | #define PM3VideoOverlayMode_FILTER_MASK (3 << 14) |
203 | #define PM3VideoOverlayMode_FILTER_OFF (0 << 14) | ||
204 | #define PM3VideoOverlayMode_FILTER_FULL (1 << 14) | ||
205 | #define PM3VideoOverlayMode_FILTER_PARTIAL (2 << 14) | ||
206 | #define PM3VideoOverlayMode_DEINTERLACE_OFF (0 << 16) | ||
207 | #define PM3VideoOverlayMode_DEINTERLACE_BOB (1 << 16) | ||
208 | #define PM3VideoOverlayMode_PATCHMODE_OFF (0 << 18) | ||
209 | #define PM3VideoOverlayMode_PATCHMODE_ON (1 << 18) | ||
210 | #define PM3VideoOverlayMode_FLIP_VIDEO (0 << 20) | ||
211 | #define PM3VideoOverlayMode_FLIP_VIDEOSTREAMA (1 << 20) | ||
212 | #define PM3VideoOverlayMode_FLIP_VIDEOSTREAMB (2 << 20) | ||
213 | #define PM3VideoOverlayMode_MIRROR_MASK (3 << 23) | ||
214 | #define PM3VideoOverlayMode_MIRRORX_OFF (0 << 23) | ||
215 | #define PM3VideoOverlayMode_MIRRORX_ON (1 << 23) | ||
216 | #define PM3VideoOverlayMode_MIRRORY_OFF (0 << 24) | ||
217 | #define PM3VideoOverlayMode_MIRRORY_ON (1 << 24) | ||
203 | #define PM3VideoOverlayFifoControl 0x3110 | 218 | #define PM3VideoOverlayFifoControl 0x3110 |
204 | #define PM3VideoOverlayIndex 0x3118 | 219 | #define PM3VideoOverlayIndex 0x3118 |
205 | #define PM3VideoOverlayBase0 0x3120 | 220 | #define PM3VideoOverlayBase0 0x3120 |
206 | #define PM3VideoOverlayBase1 0x3128 | 221 | #define PM3VideoOverlayBase1 0x3128 |
207 | #define PM3VideoOverlayBase2 0x3130 | 222 | #define PM3VideoOverlayBase2 0x3130 |
208 | #define PM3VideoOverlayStride 0x3138 | 223 | #define PM3VideoOverlayStride 0x3138 |
209 | #define PM3VideoOverlayStride_STRIDE(s) (((s)&0xfff)<<0) | 224 | #define PM3VideoOverlayStride_STRIDE(s) (((s) & 0xfff) << 0) |
210 | #define PM3VideoOverlayWidth 0x3140 | 225 | #define PM3VideoOverlayWidth 0x3140 |
211 | #define PM3VideoOverlayWidth_WIDTH(w) (((w)&0xfff)<<0) | 226 | #define PM3VideoOverlayWidth_WIDTH(w) (((w) & 0xfff) << 0) |
212 | #define PM3VideoOverlayHeight 0x3148 | 227 | #define PM3VideoOverlayHeight 0x3148 |
213 | #define PM3VideoOverlayHeight_HEIGHT(h) (((h)&0xfff)<<0) | 228 | #define PM3VideoOverlayHeight_HEIGHT(h) (((h) & 0xfff) << 0) |
214 | #define PM3VideoOverlayOrigin 0x3150 | 229 | #define PM3VideoOverlayOrigin 0x3150 |
215 | #define PM3VideoOverlayOrigin_XORIGIN(x) (((x)&0xfff)<<0) | 230 | #define PM3VideoOverlayOrigin_XORIGIN(x) (((x) & 0xfff) << 0) |
216 | #define PM3VideoOverlayOrigin_YORIGIN(y) (((y)&0xfff)<<16) | 231 | #define PM3VideoOverlayOrigin_YORIGIN(y) (((y) & 0xfff) << 16) |
217 | #define PM3VideoOverlayShrinkXDelta 0x3158 | 232 | #define PM3VideoOverlayShrinkXDelta 0x3158 |
218 | #define PM3VideoOverlayShrinkXDelta_NONE (1<<16) | 233 | #define PM3VideoOverlayShrinkXDelta_NONE (1 << 16) |
219 | #define PM3VideoOverlayShrinkXDelta_DELTA(s,d) \ | 234 | #define PM3VideoOverlayShrinkXDelta_DELTA(s,d) \ |
220 | ((((s)<<16)/(d))&0x0ffffff0) | 235 | ((((s) << 16)/(d)) & 0x0ffffff0) |
221 | #define PM3VideoOverlayZoomXDelta 0x3160 | 236 | #define PM3VideoOverlayZoomXDelta 0x3160 |
222 | #define PM3VideoOverlayZoomXDelta_NONE (1<<16) | 237 | #define PM3VideoOverlayZoomXDelta_NONE (1 << 16) |
223 | #define PM3VideoOverlayZoomXDelta_DELTA(s,d) \ | 238 | #define PM3VideoOverlayZoomXDelta_DELTA(s,d) \ |
224 | ((((s)<<16)/(d))&0x0001fff0) | 239 | ((((s) << 16)/(d)) & 0x0001fff0) |
225 | #define PM3VideoOverlayYDelta 0x3168 | 240 | #define PM3VideoOverlayYDelta 0x3168 |
226 | #define PM3VideoOverlayYDelta_NONE (1<<16) | 241 | #define PM3VideoOverlayYDelta_NONE (1 << 16) |
227 | #define PM3VideoOverlayYDelta_DELTA(s,d) \ | 242 | #define PM3VideoOverlayYDelta_DELTA(s,d) \ |
228 | ((((s)<<16)/(d))&0x0ffffff0) | 243 | ((((s) << 16)/(d)) & 0x0ffffff0) |
229 | #define PM3VideoOverlayFieldOffset 0x3170 | 244 | #define PM3VideoOverlayFieldOffset 0x3170 |
230 | #define PM3VideoOverlayStatus 0x3178 | 245 | #define PM3VideoOverlayStatus 0x3178 |
231 | 246 | ||
@@ -242,82 +257,82 @@ | |||
242 | #define PM3RD_IndexHigh 0x4028 | 257 | #define PM3RD_IndexHigh 0x4028 |
243 | #define PM3RD_IndexedData 0x4030 | 258 | #define PM3RD_IndexedData 0x4030 |
244 | #define PM3RD_IndexControl 0x4038 | 259 | #define PM3RD_IndexControl 0x4038 |
245 | #define PM3RD_IndexControl_AUTOINCREMENT_ENABLE (1<<0) | 260 | #define PM3RD_IndexControl_AUTOINCREMENT_ENABLE (1 << 0) |
246 | 261 | ||
247 | /* Indirect Registers */ | 262 | /* Indirect Registers */ |
248 | #define PM3RD_MiscControl 0x000 | 263 | #define PM3RD_MiscControl 0x000 |
249 | #define PM3RD_MiscControl_HIGHCOLOR_RES_ENABLE (1<<0) | 264 | #define PM3RD_MiscControl_HIGHCOLOR_RES_ENABLE (1 << 0) |
250 | #define PM3RD_MiscControl_PIXELDOUBLE_ENABLE (1<<1) | 265 | #define PM3RD_MiscControl_PIXELDOUBLE_ENABLE (1 << 1) |
251 | #define PM3RD_MiscControl_LASTREAD_ADDR_ENABLE (1<<2) | 266 | #define PM3RD_MiscControl_LASTREAD_ADDR_ENABLE (1 << 2) |
252 | #define PM3RD_MiscControl_DIRECTCOLOR_ENABLE (1<<3) | 267 | #define PM3RD_MiscControl_DIRECTCOLOR_ENABLE (1 << 3) |
253 | #define PM3RD_MiscControl_OVERLAY_ENABLE (1<<4) | 268 | #define PM3RD_MiscControl_OVERLAY_ENABLE (1 << 4) |
254 | #define PM3RD_MiscControl_PIXELDOUBLE_BUFFER_ENABLE (1<<5) | 269 | #define PM3RD_MiscControl_PIXELDOUBLE_BUFFER_ENABLE (1 << 5) |
255 | #define PM3RD_MiscControl_VSB_OUTPUT_ENABLE (1<<6) | 270 | #define PM3RD_MiscControl_VSB_OUTPUT_ENABLE (1 << 6) |
256 | #define PM3RD_MiscControl_STEREODOUBLE_BUFFER_ENABLE (1<<7) | 271 | #define PM3RD_MiscControl_STEREODOUBLE_BUFFER_ENABLE (1 << 7) |
257 | #define PM3RD_SyncControl 0x001 | 272 | #define PM3RD_SyncControl 0x001 |
258 | #define PM3RD_SyncControl_HSYNC_ACTIVE_LOW (0<<0) | 273 | #define PM3RD_SyncControl_HSYNC_ACTIVE_LOW (0 << 0) |
259 | #define PM3RD_SyncControl_HSYNC_ACTIVE_HIGH (1<<0) | 274 | #define PM3RD_SyncControl_HSYNC_ACTIVE_HIGH (1 << 0) |
260 | #define PM3RD_SyncControl_HSYNC_FORCE_ACTIVE (3<<0) | 275 | #define PM3RD_SyncControl_HSYNC_FORCE_ACTIVE (3 << 0) |
261 | #define PM3RD_SyncControl_HSYNC_FORCE_INACTIVE (4<<0) | 276 | #define PM3RD_SyncControl_HSYNC_FORCE_INACTIVE (4 << 0) |
262 | #define PM3RD_SyncControl_HSYNC_TRI_STATE (2<<0) | 277 | #define PM3RD_SyncControl_HSYNC_TRI_STATE (2 << 0) |
263 | #define PM3RD_SyncControl_VSYNC_ACTIVE_LOW (0<<3) | 278 | #define PM3RD_SyncControl_VSYNC_ACTIVE_LOW (0 << 3) |
264 | #define PM3RD_SyncControl_VSYNC_ACTIVE_HIGH (1<<3) | 279 | #define PM3RD_SyncControl_VSYNC_ACTIVE_HIGH (1 << 3) |
265 | #define PM3RD_SyncControl_VSYNC_TRI_STATE (2<<3) | 280 | #define PM3RD_SyncControl_VSYNC_TRI_STATE (2 << 3) |
266 | #define PM3RD_SyncControl_VSYNC_FORCE_ACTIVE (3<<3) | 281 | #define PM3RD_SyncControl_VSYNC_FORCE_ACTIVE (3 << 3) |
267 | #define PM3RD_SyncControl_VSYNC_FORCE_INACTIVE (4<<3) | 282 | #define PM3RD_SyncControl_VSYNC_FORCE_INACTIVE (4 << 3) |
268 | #define PM3RD_SyncControl_HSYNC_OVERRIDE_SETBY_HSYNC (0<<6) | 283 | #define PM3RD_SyncControl_HSYNC_OVERRIDE_SETBY_HSYNC (0 << 6) |
269 | #define PM3RD_SyncControl_HSYNC_OVERRIDE_FORCE_HIGH (1<<6) | 284 | #define PM3RD_SyncControl_HSYNC_OVERRIDE_FORCE_HIGH (1 << 6) |
270 | #define PM3RD_SyncControl_VSYNC_OVERRIDE_SETBY_VSYNC (0<<7) | 285 | #define PM3RD_SyncControl_VSYNC_OVERRIDE_SETBY_VSYNC (0 << 7) |
271 | #define PM3RD_SyncControl_VSYNC_OVERRIDE_FORCE_HIGH (1<<7) | 286 | #define PM3RD_SyncControl_VSYNC_OVERRIDE_FORCE_HIGH (1 << 7) |
272 | #define PM3RD_DACControl 0x002 | 287 | #define PM3RD_DACControl 0x002 |
273 | #define PM3RD_DACControl_DAC_POWER_ON (0<<0) | 288 | #define PM3RD_DACControl_DAC_POWER_ON (0 << 0) |
274 | #define PM3RD_DACControl_DAC_POWER_OFF (1<<0) | 289 | #define PM3RD_DACControl_DAC_POWER_OFF (1 << 0) |
275 | #define PM3RD_DACControl_SYNC_ON_GREEN_ENABLE (1<<3) | 290 | #define PM3RD_DACControl_SYNC_ON_GREEN_ENABLE (1 << 3) |
276 | #define PM3RD_DACControl_BLANK_RED_DAC_ENABLE (1<<4) | 291 | #define PM3RD_DACControl_BLANK_RED_DAC_ENABLE (1 << 4) |
277 | #define PM3RD_DACControl_BLANK_GREEN_DAC_ENABLE (1<<5) | 292 | #define PM3RD_DACControl_BLANK_GREEN_DAC_ENABLE (1 << 5) |
278 | #define PM3RD_DACControl_BLANK_BLUE_DAC_ENABLE (1<<6) | 293 | #define PM3RD_DACControl_BLANK_BLUE_DAC_ENABLE (1 << 6) |
279 | #define PM3RD_DACControl_BLANK_PEDESTAL_ENABLE (1<<7) | 294 | #define PM3RD_DACControl_BLANK_PEDESTAL_ENABLE (1 << 7) |
280 | #define PM3RD_PixelSize 0x003 | 295 | #define PM3RD_PixelSize 0x003 |
281 | #define PM3RD_PixelSize_24_BIT_PIXELS (4<<0) | 296 | #define PM3RD_PixelSize_24_BIT_PIXELS (4 << 0) |
282 | #define PM3RD_PixelSize_32_BIT_PIXELS (2<<0) | 297 | #define PM3RD_PixelSize_32_BIT_PIXELS (2 << 0) |
283 | #define PM3RD_PixelSize_16_BIT_PIXELS (1<<0) | 298 | #define PM3RD_PixelSize_16_BIT_PIXELS (1 << 0) |
284 | #define PM3RD_PixelSize_8_BIT_PIXELS (0<<0) | 299 | #define PM3RD_PixelSize_8_BIT_PIXELS (0 << 0) |
285 | #define PM3RD_ColorFormat 0x004 | 300 | #define PM3RD_ColorFormat 0x004 |
286 | #define PM3RD_ColorFormat_LINEAR_COLOR_EXT_ENABLE (1<<6) | 301 | #define PM3RD_ColorFormat_LINEAR_COLOR_EXT_ENABLE (1 << 6) |
287 | #define PM3RD_ColorFormat_COLOR_ORDER_BLUE_LOW (1<<5) | 302 | #define PM3RD_ColorFormat_COLOR_ORDER_BLUE_LOW (1 << 5) |
288 | #define PM3RD_ColorFormat_COLOR_ORDER_RED_LOW (0<<5) | 303 | #define PM3RD_ColorFormat_COLOR_ORDER_RED_LOW (0 << 5) |
289 | #define PM3RD_ColorFormat_COLOR_FORMAT_MASK (0x1f<<0) | 304 | #define PM3RD_ColorFormat_COLOR_FORMAT_MASK (0x1f << 0) |
290 | #define PM3RD_ColorFormat_8888_COLOR (0<<0) | 305 | #define PM3RD_ColorFormat_8888_COLOR (0 << 0) |
291 | #define PM3RD_ColorFormat_5551_FRONT_COLOR (1<<0) | 306 | #define PM3RD_ColorFormat_5551_FRONT_COLOR (1 << 0) |
292 | #define PM3RD_ColorFormat_4444_COLOR (2<<0) | 307 | #define PM3RD_ColorFormat_4444_COLOR (2 << 0) |
293 | #define PM3RD_ColorFormat_332_FRONT_COLOR (5<<0) | 308 | #define PM3RD_ColorFormat_332_FRONT_COLOR (5 << 0) |
294 | #define PM3RD_ColorFormat_332_BACK_COLOR (6<<0) | 309 | #define PM3RD_ColorFormat_332_BACK_COLOR (6 << 0) |
295 | #define PM3RD_ColorFormat_2321_FRONT_COLOR (9<<0) | 310 | #define PM3RD_ColorFormat_2321_FRONT_COLOR (9 << 0) |
296 | #define PM3RD_ColorFormat_2321_BACK_COLOR (10<<0) | 311 | #define PM3RD_ColorFormat_2321_BACK_COLOR (10 << 0) |
297 | #define PM3RD_ColorFormat_232_FRONTOFF_COLOR (11<<0) | 312 | #define PM3RD_ColorFormat_232_FRONTOFF_COLOR (11 << 0) |
298 | #define PM3RD_ColorFormat_232_BACKOFF_COLOR (12<<0) | 313 | #define PM3RD_ColorFormat_232_BACKOFF_COLOR (12 << 0) |
299 | #define PM3RD_ColorFormat_5551_BACK_COLOR (13<<0) | 314 | #define PM3RD_ColorFormat_5551_BACK_COLOR (13 << 0) |
300 | #define PM3RD_ColorFormat_CI8_COLOR (14<<0) | 315 | #define PM3RD_ColorFormat_CI8_COLOR (14 << 0) |
301 | #define PM3RD_ColorFormat_565_FRONT_COLOR (16<<0) | 316 | #define PM3RD_ColorFormat_565_FRONT_COLOR (16 << 0) |
302 | #define PM3RD_ColorFormat_565_BACK_COLOR (17<<0) | 317 | #define PM3RD_ColorFormat_565_BACK_COLOR (17 << 0) |
303 | #define PM3RD_CursorMode 0x005 | 318 | #define PM3RD_CursorMode 0x005 |
304 | #define PM3RD_CursorMode_CURSOR_ENABLE (1<<0) | 319 | #define PM3RD_CursorMode_CURSOR_ENABLE (1 << 0) |
305 | #define PM3RD_CursorMode_FORMAT_64x64_2BPE_P0123 (0<<2) | 320 | #define PM3RD_CursorMode_FORMAT_64x64_2BPE_P0123 (0 << 2) |
306 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P0 (1<<2) | 321 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P0 (1 << 2) |
307 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P1 (2<<2) | 322 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P1 (2 << 2) |
308 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P2 (3<<2) | 323 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P2 (3 << 2) |
309 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P3 (4<<2) | 324 | #define PM3RD_CursorMode_FORMAT_32x32_2BPE_P3 (4 << 2) |
310 | #define PM3RD_CursorMode_FORMAT_32x32_4BPE_P01 (5<<2) | 325 | #define PM3RD_CursorMode_FORMAT_32x32_4BPE_P01 (5 << 2) |
311 | #define PM3RD_CursorMode_FORMAT_32x32_4BPE_P23 (6<<2) | 326 | #define PM3RD_CursorMode_FORMAT_32x32_4BPE_P23 (6 << 2) |
312 | #define PM3RD_CursorMode_TYPE_MS (0<<4) | 327 | #define PM3RD_CursorMode_TYPE_MS (0 << 4) |
313 | #define PM3RD_CursorMode_TYPE_X (1<<4) | 328 | #define PM3RD_CursorMode_TYPE_X (1 << 4) |
314 | #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_ENABLE (1<<6) | 329 | #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_ENABLE (1 << 6) |
315 | #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_3_COLOR (2<<6) | 330 | #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_3_COLOR (2 << 6) |
316 | #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_15_COLOR (3<<6) | 331 | #define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_15_COLOR (3 << 6) |
317 | #define PM3RD_CursorControl 0x006 | 332 | #define PM3RD_CursorControl 0x006 |
318 | #define PM3RD_CursorControl_DOUBLE_X_ENABLED (1<<0) | 333 | #define PM3RD_CursorControl_DOUBLE_X_ENABLED (1 << 0) |
319 | #define PM3RD_CursorControl_DOUBLE_Y_ENABLED (1<<1) | 334 | #define PM3RD_CursorControl_DOUBLE_Y_ENABLED (1 << 1) |
320 | #define PM3RD_CursorControl_READBACK_POS_ENABLED (1<<2) | 335 | #define PM3RD_CursorControl_READBACK_POS_ENABLED (1 << 2) |
321 | 336 | ||
322 | #define PM3RD_CursorXLow 0x007 | 337 | #define PM3RD_CursorXLow 0x007 |
323 | #define PM3RD_CursorXHigh 0x008 | 338 | #define PM3RD_CursorXHigh 0x008 |
@@ -327,13 +342,13 @@ | |||
327 | #define PM3RD_CursorHotSpotY 0x00c | 342 | #define PM3RD_CursorHotSpotY 0x00c |
328 | #define PM3RD_OverlayKey 0x00d | 343 | #define PM3RD_OverlayKey 0x00d |
329 | #define PM3RD_Pan 0x00e | 344 | #define PM3RD_Pan 0x00e |
330 | #define PM3RD_Pan_ENABLE (1<<0) | 345 | #define PM3RD_Pan_ENABLE (1 << 0) |
331 | #define PM3RD_Pan_GATE_ENABLE (1<<1) | 346 | #define PM3RD_Pan_GATE_ENABLE (1 << 1) |
332 | #define PM3RD_Sense 0x00f | 347 | #define PM3RD_Sense 0x00f |
333 | 348 | ||
334 | #define PM3RD_CheckControl 0x018 | 349 | #define PM3RD_CheckControl 0x018 |
335 | #define PM3RD_CheckControl_PIXEL_ENABLED (1<<0) | 350 | #define PM3RD_CheckControl_PIXEL_ENABLED (1 << 0) |
336 | #define PM3RD_CheckControl_LUT_ENABLED (1<<1) | 351 | #define PM3RD_CheckControl_LUT_ENABLED (1 << 1) |
337 | #define PM3RD_CheckPixelRed 0x019 | 352 | #define PM3RD_CheckPixelRed 0x019 |
338 | #define PM3RD_CheckPixelGreen 0x01a | 353 | #define PM3RD_CheckPixelGreen 0x01a |
339 | #define PM3RD_CheckPixelBlue 0x01b | 354 | #define PM3RD_CheckPixelBlue 0x01b |
@@ -343,17 +358,17 @@ | |||
343 | #define PM3RD_Scratch 0x01f | 358 | #define PM3RD_Scratch 0x01f |
344 | 359 | ||
345 | #define PM3RD_VideoOverlayControl 0x020 | 360 | #define PM3RD_VideoOverlayControl 0x020 |
346 | #define PM3RD_VideoOverlayControl_ENABLE (1<<0) | 361 | #define PM3RD_VideoOverlayControl_ENABLE (1 << 0) |
347 | #define PM3RD_VideoOverlayControl_MODE_MASK (3<<1) | 362 | #define PM3RD_VideoOverlayControl_MODE_MASK (3 << 1) |
348 | #define PM3RD_VideoOverlayControl_MODE_MAINKEY (0<<1) | 363 | #define PM3RD_VideoOverlayControl_MODE_MAINKEY (0 << 1) |
349 | #define PM3RD_VideoOverlayControl_MODE_OVERLAYKEY (1<<1) | 364 | #define PM3RD_VideoOverlayControl_MODE_OVERLAYKEY (1 << 1) |
350 | #define PM3RD_VideoOverlayControl_MODE_ALWAYS (2<<1) | 365 | #define PM3RD_VideoOverlayControl_MODE_ALWAYS (2 << 1) |
351 | #define PM3RD_VideoOverlayControl_MODE_BLEND (3<<1) | 366 | #define PM3RD_VideoOverlayControl_MODE_BLEND (3 << 1) |
352 | #define PM3RD_VideoOverlayControl_DIRECTCOLOR_ENABLED (1<<3) | 367 | #define PM3RD_VideoOverlayControl_DIRECTCOLOR_ENABLED (1 << 3) |
353 | #define PM3RD_VideoOverlayControl_BLENDSRC_MAIN (0<<4) | 368 | #define PM3RD_VideoOverlayControl_BLENDSRC_MAIN (0 << 4) |
354 | #define PM3RD_VideoOverlayControl_BLENDSRC_REGISTER (1<<4) | 369 | #define PM3RD_VideoOverlayControl_BLENDSRC_REGISTER (1 << 4) |
355 | #define PM3RD_VideoOverlayControl_KEY_COLOR (0<<5) | 370 | #define PM3RD_VideoOverlayControl_KEY_COLOR (0 << 5) |
356 | #define PM3RD_VideoOverlayControl_KEY_ALPHA (1<<5) | 371 | #define PM3RD_VideoOverlayControl_KEY_ALPHA (1 << 5) |
357 | #define PM3RD_VideoOverlayXStartLow 0x021 | 372 | #define PM3RD_VideoOverlayXStartLow 0x021 |
358 | #define PM3RD_VideoOverlayXStartHigh 0x022 | 373 | #define PM3RD_VideoOverlayXStartHigh 0x022 |
359 | #define PM3RD_VideoOverlayYStartLow 0x023 | 374 | #define PM3RD_VideoOverlayYStartLow 0x023 |
@@ -366,10 +381,10 @@ | |||
366 | #define PM3RD_VideoOverlayKeyG 0x02a | 381 | #define PM3RD_VideoOverlayKeyG 0x02a |
367 | #define PM3RD_VideoOverlayKeyB 0x02b | 382 | #define PM3RD_VideoOverlayKeyB 0x02b |
368 | #define PM3RD_VideoOverlayBlend 0x02c | 383 | #define PM3RD_VideoOverlayBlend 0x02c |
369 | #define PM3RD_VideoOverlayBlend_FACTOR_0_PERCENT (0<<6) | 384 | #define PM3RD_VideoOverlayBlend_FACTOR_0_PERCENT (0 << 6) |
370 | #define PM3RD_VideoOverlayBlend_FACTOR_25_PERCENT (1<<6) | 385 | #define PM3RD_VideoOverlayBlend_FACTOR_25_PERCENT (1 << 6) |
371 | #define PM3RD_VideoOverlayBlend_FACTOR_75_PERCENT (2<<6) | 386 | #define PM3RD_VideoOverlayBlend_FACTOR_75_PERCENT (2 << 6) |
372 | #define PM3RD_VideoOverlayBlend_FACTOR_100_PERCENT (3<<6) | 387 | #define PM3RD_VideoOverlayBlend_FACTOR_100_PERCENT (3 << 6) |
373 | 388 | ||
374 | #define PM3RD_DClkSetup1 0x1f0 | 389 | #define PM3RD_DClkSetup1 0x1f0 |
375 | #define PM3RD_DClkSetup2 0x1f1 | 390 | #define PM3RD_DClkSetup2 0x1f1 |
@@ -377,20 +392,20 @@ | |||
377 | #define PM3RD_KClkSetup2 0x1f3 | 392 | #define PM3RD_KClkSetup2 0x1f3 |
378 | 393 | ||
379 | #define PM3RD_DClkControl 0x200 | 394 | #define PM3RD_DClkControl 0x200 |
380 | #define PM3RD_DClkControl_SOURCE_PLL (0<<4) | 395 | #define PM3RD_DClkControl_SOURCE_PLL (0 << 4) |
381 | #define PM3RD_DClkControl_SOURCE_VSA (1<<4) | 396 | #define PM3RD_DClkControl_SOURCE_VSA (1 << 4) |
382 | #define PM3RD_DClkControl_SOURCE_VSB (2<<4) | 397 | #define PM3RD_DClkControl_SOURCE_VSB (2 << 4) |
383 | #define PM3RD_DClkControl_SOURCE_EXT (3<<4) | 398 | #define PM3RD_DClkControl_SOURCE_EXT (3 << 4) |
384 | #define PM3RD_DClkControl_STATE_RUN (2<<2) | 399 | #define PM3RD_DClkControl_STATE_RUN (2 << 2) |
385 | #define PM3RD_DClkControl_STATE_HIGH (1<<2) | 400 | #define PM3RD_DClkControl_STATE_HIGH (1 << 2) |
386 | #define PM3RD_DClkControl_STATE_LOW (0<<2) | 401 | #define PM3RD_DClkControl_STATE_LOW (0 << 2) |
387 | #define PM3RD_DClkControl_LOCKED (1<<1) | 402 | #define PM3RD_DClkControl_LOCKED (1 << 1) |
388 | #define PM3RD_DClkControl_NOT_LOCKED (0<<1) | 403 | #define PM3RD_DClkControl_NOT_LOCKED (0 << 1) |
389 | #define PM3RD_DClkControl_ENABLE (1<<0) | 404 | #define PM3RD_DClkControl_ENABLE (1 << 0) |
390 | #define PM3RD_DClk0PreScale 0x201 | 405 | #define PM3RD_DClk0PreScale 0x201 |
391 | #define PM3RD_DClk0FeedbackScale 0x202 | 406 | #define PM3RD_DClk0FeedbackScale 0x202 |
392 | #define PM3RD_DClk0PostScale 0x203 | 407 | #define PM3RD_DClk0PostScale 0x203 |
393 | #define PM3_REF_CLOCK 14318 | 408 | #define PM3_REF_CLOCK 14318 |
394 | #define PM3RD_DClk1PreScale 0x204 | 409 | #define PM3RD_DClk1PreScale 0x204 |
395 | #define PM3RD_DClk1FeedbackScale 0x205 | 410 | #define PM3RD_DClk1FeedbackScale 0x205 |
396 | #define PM3RD_DClk1PostScale 0x206 | 411 | #define PM3RD_DClk1PostScale 0x206 |
@@ -401,56 +416,56 @@ | |||
401 | #define PM3RD_DClk3FeedbackScale 0x20b | 416 | #define PM3RD_DClk3FeedbackScale 0x20b |
402 | #define PM3RD_DClk3PostScale 0x20c | 417 | #define PM3RD_DClk3PostScale 0x20c |
403 | #define PM3RD_KClkControl 0x20d | 418 | #define PM3RD_KClkControl 0x20d |
404 | #define PM3RD_KClkControl_ENABLE (1<<0) | 419 | #define PM3RD_KClkControl_ENABLE (1 << 0) |
405 | #define PM3RD_KClkControl_NOT_LOCKED (0<<1) | 420 | #define PM3RD_KClkControl_NOT_LOCKED (0 << 1) |
406 | #define PM3RD_KClkControl_LOCKED (1<<1) | 421 | #define PM3RD_KClkControl_LOCKED (1 << 1) |
407 | #define PM3RD_KClkControl_STATE_LOW (0<<2) | 422 | #define PM3RD_KClkControl_STATE_LOW (0 << 2) |
408 | #define PM3RD_KClkControl_STATE_HIGH (1<<2) | 423 | #define PM3RD_KClkControl_STATE_HIGH (1 << 2) |
409 | #define PM3RD_KClkControl_STATE_RUN (2<<2) | 424 | #define PM3RD_KClkControl_STATE_RUN (2 << 2) |
410 | #define PM3RD_KClkControl_STATE_LOW_POWER (3<<2) | 425 | #define PM3RD_KClkControl_STATE_LOW_POWER (3 << 2) |
411 | #define PM3RD_KClkControl_SOURCE_PCLK (0<<4) | 426 | #define PM3RD_KClkControl_SOURCE_PCLK (0 << 4) |
412 | #define PM3RD_KClkControl_SOURCE_HALF_PCLK (1<<4) | 427 | #define PM3RD_KClkControl_SOURCE_HALF_PCLK (1 << 4) |
413 | #define PM3RD_KClkControl_SOURCE_PLL (2<<4) | 428 | #define PM3RD_KClkControl_SOURCE_PLL (2 << 4) |
414 | #define PM3RD_KClkPreScale 0x20e | 429 | #define PM3RD_KClkPreScale 0x20e |
415 | #define PM3RD_KClkFeedbackScale 0x20f | 430 | #define PM3RD_KClkFeedbackScale 0x20f |
416 | #define PM3RD_KClkPostScale 0x210 | 431 | #define PM3RD_KClkPostScale 0x210 |
417 | #define PM3RD_MClkControl 0x211 | 432 | #define PM3RD_MClkControl 0x211 |
418 | #define PM3RD_MClkControl_ENABLE (1<<0) | 433 | #define PM3RD_MClkControl_ENABLE (1 << 0) |
419 | #define PM3RD_MClkControl_NOT_LOCKED (0<<1) | 434 | #define PM3RD_MClkControl_NOT_LOCKED (0 << 1) |
420 | #define PM3RD_MClkControl_LOCKED (1<<1) | 435 | #define PM3RD_MClkControl_LOCKED (1 << 1) |
421 | #define PM3RD_MClkControl_STATE_LOW (0<<2) | 436 | #define PM3RD_MClkControl_STATE_LOW (0 << 2) |
422 | #define PM3RD_MClkControl_STATE_HIGH (1<<2) | 437 | #define PM3RD_MClkControl_STATE_HIGH (1 << 2) |
423 | #define PM3RD_MClkControl_STATE_RUN (2<<2) | 438 | #define PM3RD_MClkControl_STATE_RUN (2 << 2) |
424 | #define PM3RD_MClkControl_STATE_LOW_POWER (3<<2) | 439 | #define PM3RD_MClkControl_STATE_LOW_POWER (3 << 2) |
425 | #define PM3RD_MClkControl_SOURCE_PCLK (0<<4) | 440 | #define PM3RD_MClkControl_SOURCE_PCLK (0 << 4) |
426 | #define PM3RD_MClkControl_SOURCE_HALF_PCLK (1<<4) | 441 | #define PM3RD_MClkControl_SOURCE_HALF_PCLK (1 << 4) |
427 | #define PM3RD_MClkControl_SOURCE_HALF_EXT (3<<4) | 442 | #define PM3RD_MClkControl_SOURCE_HALF_EXT (3 << 4) |
428 | #define PM3RD_MClkControl_SOURCE_EXT (4<<4) | 443 | #define PM3RD_MClkControl_SOURCE_EXT (4 << 4) |
429 | #define PM3RD_MClkControl_SOURCE_HALF_KCLK (5<<4) | 444 | #define PM3RD_MClkControl_SOURCE_HALF_KCLK (5 << 4) |
430 | #define PM3RD_MClkControl_SOURCE_KCLK (6<<4) | 445 | #define PM3RD_MClkControl_SOURCE_KCLK (6 << 4) |
431 | #define PM3RD_MClkPreScale 0x212 | 446 | #define PM3RD_MClkPreScale 0x212 |
432 | #define PM3RD_MClkFeedbackScale 0x213 | 447 | #define PM3RD_MClkFeedbackScale 0x213 |
433 | #define PM3RD_MClkPostScale 0x214 | 448 | #define PM3RD_MClkPostScale 0x214 |
434 | #define PM3RD_SClkControl 0x215 | 449 | #define PM3RD_SClkControl 0x215 |
435 | #define PM3RD_SClkControl_ENABLE (1<<0) | 450 | #define PM3RD_SClkControl_ENABLE (1 << 0) |
436 | #define PM3RD_SClkControl_NOT_LOCKED (0<<1) | 451 | #define PM3RD_SClkControl_NOT_LOCKED (0 << 1) |
437 | #define PM3RD_SClkControl_LOCKED (1<<1) | 452 | #define PM3RD_SClkControl_LOCKED (1 << 1) |
438 | #define PM3RD_SClkControl_STATE_LOW (0<<2) | 453 | #define PM3RD_SClkControl_STATE_LOW (0 << 2) |
439 | #define PM3RD_SClkControl_STATE_HIGH (1<<2) | 454 | #define PM3RD_SClkControl_STATE_HIGH (1 << 2) |
440 | #define PM3RD_SClkControl_STATE_RUN (2<<2) | 455 | #define PM3RD_SClkControl_STATE_RUN (2 << 2) |
441 | #define PM3RD_SClkControl_STATE_LOW_POWER (3<<2) | 456 | #define PM3RD_SClkControl_STATE_LOW_POWER (3 << 2) |
442 | #define PM3RD_SClkControl_SOURCE_PCLK (0<<4) | 457 | #define PM3RD_SClkControl_SOURCE_PCLK (0 << 4) |
443 | #define PM3RD_SClkControl_SOURCE_HALF_PCLK (1<<4) | 458 | #define PM3RD_SClkControl_SOURCE_HALF_PCLK (1 << 4) |
444 | #define PM3RD_SClkControl_SOURCE_HALF_EXT (3<<4) | 459 | #define PM3RD_SClkControl_SOURCE_HALF_EXT (3 << 4) |
445 | #define PM3RD_SClkControl_SOURCE_EXT (4<<4) | 460 | #define PM3RD_SClkControl_SOURCE_EXT (4 << 4) |
446 | #define PM3RD_SClkControl_SOURCE_HALF_KCLK (5<<4) | 461 | #define PM3RD_SClkControl_SOURCE_HALF_KCLK (5 << 4) |
447 | #define PM3RD_SClkControl_SOURCE_KCLK (6<<4) | 462 | #define PM3RD_SClkControl_SOURCE_KCLK (6 << 4) |
448 | #define PM3RD_SClkPreScale 0x216 | 463 | #define PM3RD_SClkPreScale 0x216 |
449 | #define PM3RD_SClkFeedbackScale 0x217 | 464 | #define PM3RD_SClkFeedbackScale 0x217 |
450 | #define PM3RD_SClkPostScale 0x218 | 465 | #define PM3RD_SClkPostScale 0x218 |
451 | 466 | ||
452 | #define PM3RD_CursorPalette(p) (0x303+(p)) | 467 | #define PM3RD_CursorPalette(p) (0x303 + (p)) |
453 | #define PM3RD_CursorPattern(p) (0x400+(p)) | 468 | #define PM3RD_CursorPattern(p) (0x400 + (p)) |
454 | /****************************************************** | 469 | /****************************************************** |
455 | * GLINT Permedia3 Video Streaming Registers (0x5000) * | 470 | * GLINT Permedia3 Video Streaming Registers (0x5000) * |
456 | *******************************************************/ | 471 | *******************************************************/ |
@@ -484,10 +499,10 @@ | |||
484 | #define PM3ColorDDAModeOr 0xabe8 | 499 | #define PM3ColorDDAModeOr 0xabe8 |
485 | #define PM3CommandInterrupt 0xa990 | 500 | #define PM3CommandInterrupt 0xa990 |
486 | #define PM3ConstantColorDDA 0xafb0 | 501 | #define PM3ConstantColorDDA 0xafb0 |
487 | #define PM3ConstantColorDDA_R(r) ((r)&0xff) | 502 | #define PM3ConstantColorDDA_R(r) ((r) & 0xff) |
488 | #define PM3ConstantColorDDA_G(g) (((g)&0xff)<<8) | 503 | #define PM3ConstantColorDDA_G(g) (((g) & 0xff) << 8) |
489 | #define PM3ConstantColorDDA_B(b) (((b)&0xff)<<16) | 504 | #define PM3ConstantColorDDA_B(b) (((b) & 0xff) << 16) |
490 | #define PM3ConstantColorDDA_A(a) (((a)&0xff)<<24) | 505 | #define PM3ConstantColorDDA_A(a) (((a) & 0xff) << 24) |
491 | #define PM3ContextData 0x8dd0 | 506 | #define PM3ContextData 0x8dd0 |
492 | #define PM3ContextDump 0x8dc0 | 507 | #define PM3ContextDump 0x8dc0 |
493 | #define PM3ContextRestore 0x8dc8 | 508 | #define PM3ContextRestore 0x8dc8 |
@@ -531,59 +546,59 @@ | |||
531 | #define PM3FBDestReadBufferOffset1 0xaea8 | 546 | #define PM3FBDestReadBufferOffset1 0xaea8 |
532 | #define PM3FBDestReadBufferOffset2 0xaeb0 | 547 | #define PM3FBDestReadBufferOffset2 0xaeb0 |
533 | #define PM3FBDestReadBufferOffset3 0xaeb8 | 548 | #define PM3FBDestReadBufferOffset3 0xaeb8 |
534 | #define PM3FBDestReadBufferOffset_XOffset(x) ((x)&0xffff) | 549 | #define PM3FBDestReadBufferOffset_XOffset(x) ((x) & 0xffff) |
535 | #define PM3FBDestReadBufferOffset_YOffset(y) (((y)&0xffff)<<16) | 550 | #define PM3FBDestReadBufferOffset_YOffset(y) (((y) & 0xffff) << 16) |
536 | #define PM3FBDestReadBufferWidth0 0xaec0 | 551 | #define PM3FBDestReadBufferWidth0 0xaec0 |
537 | #define PM3FBDestReadBufferWidth1 0xaec8 | 552 | #define PM3FBDestReadBufferWidth1 0xaec8 |
538 | #define PM3FBDestReadBufferWidth2 0xaed0 | 553 | #define PM3FBDestReadBufferWidth2 0xaed0 |
539 | #define PM3FBDestReadBufferWidth3 0xaed8 | 554 | #define PM3FBDestReadBufferWidth3 0xaed8 |
540 | #define PM3FBDestReadBufferWidth_Width(w) ((w)&0x0fff) | 555 | #define PM3FBDestReadBufferWidth_Width(w) ((w) & 0x0fff) |
541 | 556 | ||
542 | #define PM3FBDestReadEnables 0xaee8 | 557 | #define PM3FBDestReadEnables 0xaee8 |
543 | #define PM3FBDestReadEnablesAnd 0xad20 | 558 | #define PM3FBDestReadEnablesAnd 0xad20 |
544 | #define PM3FBDestReadEnablesOr 0xad28 | 559 | #define PM3FBDestReadEnablesOr 0xad28 |
545 | #define PM3FBDestReadEnables_E(e) ((e)&0xff) | 560 | #define PM3FBDestReadEnables_E(e) ((e) & 0xff) |
546 | #define PM3FBDestReadEnables_E0 1<<0 | 561 | #define PM3FBDestReadEnables_E0 (1 << 0) |
547 | #define PM3FBDestReadEnables_E1 1<<1 | 562 | #define PM3FBDestReadEnables_E1 (1 << 1) |
548 | #define PM3FBDestReadEnables_E2 1<<2 | 563 | #define PM3FBDestReadEnables_E2 (1 << 2) |
549 | #define PM3FBDestReadEnables_E3 1<<3 | 564 | #define PM3FBDestReadEnables_E3 (1 << 3) |
550 | #define PM3FBDestReadEnables_E4 1<<4 | 565 | #define PM3FBDestReadEnables_E4 (1 << 4) |
551 | #define PM3FBDestReadEnables_E5 1<<5 | 566 | #define PM3FBDestReadEnables_E5 (1 << 5) |
552 | #define PM3FBDestReadEnables_E6 1<<6 | 567 | #define PM3FBDestReadEnables_E6 (1 << 6) |
553 | #define PM3FBDestReadEnables_E7 1<<7 | 568 | #define PM3FBDestReadEnables_E7 (1 << 7) |
554 | #define PM3FBDestReadEnables_R(r) (((r)&0xff)<<8) | 569 | #define PM3FBDestReadEnables_R(r) (((r) & 0xff) << 8) |
555 | #define PM3FBDestReadEnables_R0 1<<8 | 570 | #define PM3FBDestReadEnables_R0 (1 << 8) |
556 | #define PM3FBDestReadEnables_R1 1<<9 | 571 | #define PM3FBDestReadEnables_R1 (1 << 9) |
557 | #define PM3FBDestReadEnables_R2 1<<10 | 572 | #define PM3FBDestReadEnables_R2 (1 << 10) |
558 | #define PM3FBDestReadEnables_R3 1<<11 | 573 | #define PM3FBDestReadEnables_R3 (1 << 11) |
559 | #define PM3FBDestReadEnables_R4 1<<12 | 574 | #define PM3FBDestReadEnables_R4 (1 << 12) |
560 | #define PM3FBDestReadEnables_R5 1<<13 | 575 | #define PM3FBDestReadEnables_R5 (1 << 13) |
561 | #define PM3FBDestReadEnables_R6 1<<14 | 576 | #define PM3FBDestReadEnables_R6 (1 << 14) |
562 | #define PM3FBDestReadEnables_R7 1<<15 | 577 | #define PM3FBDestReadEnables_R7 (1 << 15) |
563 | #define PM3FBDestReadEnables_ReferenceAlpha(a) (((a)&0xff)<<24) | 578 | #define PM3FBDestReadEnables_ReferenceAlpha(a) (((a) & 0xff) << 24) |
564 | 579 | ||
565 | #define PM3FBDestReadMode 0xaee0 | 580 | #define PM3FBDestReadMode 0xaee0 |
566 | #define PM3FBDestReadModeAnd 0xac90 | 581 | #define PM3FBDestReadModeAnd 0xac90 |
567 | #define PM3FBDestReadModeOr 0xac98 | 582 | #define PM3FBDestReadModeOr 0xac98 |
568 | #define PM3FBDestReadMode_ReadDisable 0<<0 | 583 | #define PM3FBDestReadMode_ReadDisable (0 << 0) |
569 | #define PM3FBDestReadMode_ReadEnable 1<<0 | 584 | #define PM3FBDestReadMode_ReadEnable (1 << 0) |
570 | #define PM3FBDestReadMode_StripePitch(sp) (((sp)&0x7)<<2) | 585 | #define PM3FBDestReadMode_StripePitch(sp) (((sp) & 0x7) << 2) |
571 | #define PM3FBDestReadMode_StripeHeight(sh) (((sh)&0x7)<<7) | 586 | #define PM3FBDestReadMode_StripeHeight(sh) (((sh) & 0x7) << 7) |
572 | #define PM3FBDestReadMode_Enable0 1<<8 | 587 | #define PM3FBDestReadMode_Enable0 (1 << 8) |
573 | #define PM3FBDestReadMode_Enable1 1<<9 | 588 | #define PM3FBDestReadMode_Enable1 (1 << 9) |
574 | #define PM3FBDestReadMode_Enable2 1<<10 | 589 | #define PM3FBDestReadMode_Enable2 (1 << 10) |
575 | #define PM3FBDestReadMode_Enable3 1<<11 | 590 | #define PM3FBDestReadMode_Enable3 (1 << 11) |
576 | #define PM3FBDestReadMode_Layout0(l) (((l)&0x3)<<12) | 591 | #define PM3FBDestReadMode_Layout0(l) (((l) & 0x3) << 12) |
577 | #define PM3FBDestReadMode_Layout1(l) (((l)&0x3)<<14) | 592 | #define PM3FBDestReadMode_Layout1(l) (((l) & 0x3) << 14) |
578 | #define PM3FBDestReadMode_Layout2(l) (((l)&0x3)<<16) | 593 | #define PM3FBDestReadMode_Layout2(l) (((l) & 0x3) << 16) |
579 | #define PM3FBDestReadMode_Layout3(l) (((l)&0x3)<<18) | 594 | #define PM3FBDestReadMode_Layout3(l) (((l) & 0x3) << 18) |
580 | #define PM3FBDestReadMode_Origin0 1<<20 | 595 | #define PM3FBDestReadMode_Origin0 (1 << 20) |
581 | #define PM3FBDestReadMode_Origin1 1<<21 | 596 | #define PM3FBDestReadMode_Origin1 (1 << 21) |
582 | #define PM3FBDestReadMode_Origin2 1<<22 | 597 | #define PM3FBDestReadMode_Origin2 (1 << 22) |
583 | #define PM3FBDestReadMode_Origin3 1<<23 | 598 | #define PM3FBDestReadMode_Origin3 (1 << 23) |
584 | #define PM3FBDestReadMode_Blocking 1<<24 | 599 | #define PM3FBDestReadMode_Blocking (1 << 24) |
585 | #define PM3FBDestReadMode_UseReadEnabled 1<<26 | 600 | #define PM3FBDestReadMode_UseReadEnabled (1 << 26) |
586 | #define PM3FBDestReadMode_AlphaFiltering 1<<27 | 601 | #define PM3FBDestReadMode_AlphaFiltering (1 << 27) |
587 | 602 | ||
588 | #define PM3FBHardwareWriteMask 0x8ac0 | 603 | #define PM3FBHardwareWriteMask 0x8ac0 |
589 | #define PM3FBSoftwareWriteMask 0x8820 | 604 | #define PM3FBSoftwareWriteMask 0x8820 |
@@ -591,65 +606,65 @@ | |||
591 | #define PM3FBSourceData 0x8aa8 | 606 | #define PM3FBSourceData 0x8aa8 |
592 | #define PM3FBSourceReadBufferAddr 0xaf08 | 607 | #define PM3FBSourceReadBufferAddr 0xaf08 |
593 | #define PM3FBSourceReadBufferOffset 0xaf10 | 608 | #define PM3FBSourceReadBufferOffset 0xaf10 |
594 | #define PM3FBSourceReadBufferOffset_XOffset(x) ((x)&0xffff) | 609 | #define PM3FBSourceReadBufferOffset_XOffset(x) ((x) & 0xffff) |
595 | #define PM3FBSourceReadBufferOffset_YOffset(y) (((y)&0xffff)<<16) | 610 | #define PM3FBSourceReadBufferOffset_YOffset(y) (((y) & 0xffff) << 16) |
596 | #define PM3FBSourceReadBufferWidth 0xaf18 | 611 | #define PM3FBSourceReadBufferWidth 0xaf18 |
597 | #define PM3FBSourceReadBufferWidth_Width(w) ((w)&0x0fff) | 612 | #define PM3FBSourceReadBufferWidth_Width(w) ((w) & 0x0fff) |
598 | #define PM3FBSourceReadMode 0xaf00 | 613 | #define PM3FBSourceReadMode 0xaf00 |
599 | #define PM3FBSourceReadModeAnd 0xaca0 | 614 | #define PM3FBSourceReadModeAnd 0xaca0 |
600 | #define PM3FBSourceReadModeOr 0xaca8 | 615 | #define PM3FBSourceReadModeOr 0xaca8 |
601 | #define PM3FBSourceReadMode_ReadDisable (0<<0) | 616 | #define PM3FBSourceReadMode_ReadDisable (0 << 0) |
602 | #define PM3FBSourceReadMode_ReadEnable (1<<0) | 617 | #define PM3FBSourceReadMode_ReadEnable (1 << 0) |
603 | #define PM3FBSourceReadMode_StripePitch(sp) (((sp)&0x7)<<2) | 618 | #define PM3FBSourceReadMode_StripePitch(sp) (((sp) & 0x7) << 2) |
604 | #define PM3FBSourceReadMode_StripeHeight(sh) (((sh)&0x7)<<7) | 619 | #define PM3FBSourceReadMode_StripeHeight(sh) (((sh) & 0x7) << 7) |
605 | #define PM3FBSourceReadMode_Layout(l) (((l)&0x3)<<8) | 620 | #define PM3FBSourceReadMode_Layout(l) (((l) & 0x3) << 8) |
606 | #define PM3FBSourceReadMode_Origin 1<<10 | 621 | #define PM3FBSourceReadMode_Origin (1 << 10) |
607 | #define PM3FBSourceReadMode_Blocking 1<<11 | 622 | #define PM3FBSourceReadMode_Blocking (1 << 11) |
608 | #define PM3FBSourceReadMode_UserTexelCoord 1<<13 | 623 | #define PM3FBSourceReadMode_UserTexelCoord (1 << 13) |
609 | #define PM3FBSourceReadMode_WrapXEnable 1<<14 | 624 | #define PM3FBSourceReadMode_WrapXEnable (1 << 14) |
610 | #define PM3FBSourceReadMode_WrapYEnable 1<<15 | 625 | #define PM3FBSourceReadMode_WrapYEnable (1 << 15) |
611 | #define PM3FBSourceReadMode_WrapX(w) (((w)&0xf)<<16) | 626 | #define PM3FBSourceReadMode_WrapX(w) (((w) & 0xf) << 16) |
612 | #define PM3FBSourceReadMode_WrapY(w) (((w)&0xf)<<20) | 627 | #define PM3FBSourceReadMode_WrapY(w) (((w) & 0xf) << 20) |
613 | #define PM3FBSourceReadMode_ExternalSourceData 1<<24 | 628 | #define PM3FBSourceReadMode_ExternalSourceData (1 << 24) |
614 | #define PM3FBWriteBufferAddr0 0xb000 | 629 | #define PM3FBWriteBufferAddr0 0xb000 |
615 | #define PM3FBWriteBufferAddr1 0xb008 | 630 | #define PM3FBWriteBufferAddr1 0xb008 |
616 | #define PM3FBWriteBufferAddr2 0xb010 | 631 | #define PM3FBWriteBufferAddr2 0xb010 |
617 | #define PM3FBWriteBufferAddr3 0xb018 | 632 | #define PM3FBWriteBufferAddr3 0xb018 |
618 | 633 | ||
619 | #define PM3FBWriteBufferOffset0 0xb020 | 634 | #define PM3FBWriteBufferOffset0 0xb020 |
620 | #define PM3FBWriteBufferOffset1 0xb028 | 635 | #define PM3FBWriteBufferOffset1 0xb028 |
621 | #define PM3FBWriteBufferOffset2 0xb030 | 636 | #define PM3FBWriteBufferOffset2 0xb030 |
622 | #define PM3FBWriteBufferOffset3 0xb038 | 637 | #define PM3FBWriteBufferOffset3 0xb038 |
623 | #define PM3FBWriteBufferOffset_XOffset(x) ((x)&0xffff) | 638 | #define PM3FBWriteBufferOffset_XOffset(x) ((x) & 0xffff) |
624 | #define PM3FBWriteBufferOffset_YOffset(y) (((y)&0xffff)<<16) | 639 | #define PM3FBWriteBufferOffset_YOffset(y) (((y) & 0xffff) << 16) |
625 | 640 | ||
626 | #define PM3FBWriteBufferWidth0 0xb040 | 641 | #define PM3FBWriteBufferWidth0 0xb040 |
627 | #define PM3FBWriteBufferWidth1 0xb048 | 642 | #define PM3FBWriteBufferWidth1 0xb048 |
628 | #define PM3FBWriteBufferWidth2 0xb050 | 643 | #define PM3FBWriteBufferWidth2 0xb050 |
629 | #define PM3FBWriteBufferWidth3 0xb058 | 644 | #define PM3FBWriteBufferWidth3 0xb058 |
630 | #define PM3FBWriteBufferWidth_Width(w) ((w)&0x0fff) | 645 | #define PM3FBWriteBufferWidth_Width(w) ((w) & 0x0fff) |
631 | 646 | ||
632 | #define PM3FBWriteMode 0x8ab8 | 647 | #define PM3FBWriteMode 0x8ab8 |
633 | #define PM3FBWriteModeAnd 0xacf0 | 648 | #define PM3FBWriteModeAnd 0xacf0 |
634 | #define PM3FBWriteModeOr 0xacf8 | 649 | #define PM3FBWriteModeOr 0xacf8 |
635 | #define PM3FBWriteMode_WriteDisable 0<<0 | 650 | #define PM3FBWriteMode_WriteDisable (0 << 0) |
636 | #define PM3FBWriteMode_WriteEnable 1<<0 | 651 | #define PM3FBWriteMode_WriteEnable (1 << 0) |
637 | #define PM3FBWriteMode_Replicate 1<<4 | 652 | #define PM3FBWriteMode_Replicate (1 << 4) |
638 | #define PM3FBWriteMode_OpaqueSpan 1<<5 | 653 | #define PM3FBWriteMode_OpaqueSpan (1 << 5) |
639 | #define PM3FBWriteMode_StripePitch(p) (((p)&0x7)<<6) | 654 | #define PM3FBWriteMode_StripePitch(p) (((p) & 0x7) << 6) |
640 | #define PM3FBWriteMode_StripeHeight(h) (((h)&0x7)<<9) | 655 | #define PM3FBWriteMode_StripeHeight(h) (((h) & 0x7) << 9) |
641 | #define PM3FBWriteMode_Enable0 1<<12 | 656 | #define PM3FBWriteMode_Enable0 (1 << 12) |
642 | #define PM3FBWriteMode_Enable1 1<<13 | 657 | #define PM3FBWriteMode_Enable1 (1 << 13) |
643 | #define PM3FBWriteMode_Enable2 1<<14 | 658 | #define PM3FBWriteMode_Enable2 (1 << 14) |
644 | #define PM3FBWriteMode_Enable3 1<<15 | 659 | #define PM3FBWriteMode_Enable3 (1 << 15) |
645 | #define PM3FBWriteMode_Layout0(l) (((l)&0x3)<<16) | 660 | #define PM3FBWriteMode_Layout0(l) (((l) & 0x3) << 16) |
646 | #define PM3FBWriteMode_Layout1(l) (((l)&0x3)<<18) | 661 | #define PM3FBWriteMode_Layout1(l) (((l) & 0x3) << 18) |
647 | #define PM3FBWriteMode_Layout2(l) (((l)&0x3)<<20) | 662 | #define PM3FBWriteMode_Layout2(l) (((l) & 0x3) << 20) |
648 | #define PM3FBWriteMode_Layout3(l) (((l)&0x3)<<22) | 663 | #define PM3FBWriteMode_Layout3(l) (((l) & 0x3) << 22) |
649 | #define PM3FBWriteMode_Origin0 1<<24 | 664 | #define PM3FBWriteMode_Origin0 (1 << 24) |
650 | #define PM3FBWriteMode_Origin1 1<<25 | 665 | #define PM3FBWriteMode_Origin1 (1 << 25) |
651 | #define PM3FBWriteMode_Origin2 1<<26 | 666 | #define PM3FBWriteMode_Origin2 (1 << 26) |
652 | #define PM3FBWriteMode_Origin3 1<<27 | 667 | #define PM3FBWriteMode_Origin3 (1 << 27) |
653 | #define PM3ForegroundColor 0xb0c0 | 668 | #define PM3ForegroundColor 0xb0c0 |
654 | /* ... */ | 669 | /* ... */ |
655 | #define PM3GIDMode 0xb538 | 670 | #define PM3GIDMode 0xb538 |
@@ -664,55 +679,55 @@ | |||
664 | #define PM3LBDestReadMode 0xb500 | 679 | #define PM3LBDestReadMode 0xb500 |
665 | #define PM3LBDestReadModeAnd 0xb580 | 680 | #define PM3LBDestReadModeAnd 0xb580 |
666 | #define PM3LBDestReadModeOr 0xb588 | 681 | #define PM3LBDestReadModeOr 0xb588 |
667 | #define PM3LBDestReadMode_Disable 0<<0 | 682 | #define PM3LBDestReadMode_Disable (0 << 0) |
668 | #define PM3LBDestReadMode_Enable 1<<0 | 683 | #define PM3LBDestReadMode_Enable (1 << 0) |
669 | #define PM3LBDestReadMode_StripePitch(p) (((p)&0x7)<<2) | 684 | #define PM3LBDestReadMode_StripePitch(p) (((p) & 0x7) << 2) |
670 | #define PM3LBDestReadMode_StripeHeight(h) (((h)&0x7)<<5) | 685 | #define PM3LBDestReadMode_StripeHeight(h) (((h) & 0x7) << 5) |
671 | #define PM3LBDestReadMode_Layout 1<<8 | 686 | #define PM3LBDestReadMode_Layout (1 << 8) |
672 | #define PM3LBDestReadMode_Origin 1<<9 | 687 | #define PM3LBDestReadMode_Origin (1 << 9) |
673 | #define PM3LBDestReadMode_UserReadEnables 1<<10 | 688 | #define PM3LBDestReadMode_UserReadEnables (1 << 10) |
674 | #define PM3LBDestReadMode_Packed16 1<<11 | 689 | #define PM3LBDestReadMode_Packed16 (1 << 11) |
675 | #define PM3LBDestReadMode_Width(w) (((w)&0xfff)<<12) | 690 | #define PM3LBDestReadMode_Width(w) (((w) & 0xfff) << 12) |
676 | #define PM3LBReadFormat 0x8888 | 691 | #define PM3LBReadFormat 0x8888 |
677 | #define PM3LBReadFormat_DepthWidth(w) (((w)&0x3)<<0) | 692 | #define PM3LBReadFormat_DepthWidth(w) (((w) & 0x3) << 0) |
678 | #define PM3LBReadFormat_StencilWidth(w) (((w)&0xf)<<2) | 693 | #define PM3LBReadFormat_StencilWidth(w) (((w) & 0xf) << 2) |
679 | #define PM3LBReadFormat_StencilPosition(p) (((p)&0x1f)<<6) | 694 | #define PM3LBReadFormat_StencilPosition(p) (((p) & 0x1f) << 6) |
680 | #define PM3LBReadFormat_FCPWidth(w) (((w)&0xf)<<11) | 695 | #define PM3LBReadFormat_FCPWidth(w) (((w) & 0xf) << 11) |
681 | #define PM3LBReadFormat_FCPPosition(p) (((p)&0x1f)<<15) | 696 | #define PM3LBReadFormat_FCPPosition(p) (((p) & 0x1f) << 15) |
682 | #define PM3LBReadFormat_GIDWidth(w) (((w)&0x7)<<20) | 697 | #define PM3LBReadFormat_GIDWidth(w) (((w) & 0x7) << 20) |
683 | #define PM3LBReadFormat_GIDPosition(p) (((p)&0x1f)<<23) | 698 | #define PM3LBReadFormat_GIDPosition(p) (((p) & 0x1f) << 23) |
684 | #define PM3LBSourceReadBufferAddr 0xb528 | 699 | #define PM3LBSourceReadBufferAddr 0xb528 |
685 | #define PM3LBSourceReadBufferOffset 0xb530 | 700 | #define PM3LBSourceReadBufferOffset 0xb530 |
686 | #define PM3LBSourceReadMode 0xb520 | 701 | #define PM3LBSourceReadMode 0xb520 |
687 | #define PM3LBSourceReadModeAnd 0xb5a0 | 702 | #define PM3LBSourceReadModeAnd 0xb5a0 |
688 | #define PM3LBSourceReadModeOr 0xb5a8 | 703 | #define PM3LBSourceReadModeOr 0xb5a8 |
689 | #define PM3LBSourceReadMode_Enable 1<<0 | 704 | #define PM3LBSourceReadMode_Enable (1 << 0) |
690 | #define PM3LBSourceReadMode_StripePitch(p) (((p)&0x7)<<2) | 705 | #define PM3LBSourceReadMode_StripePitch(p) (((p) & 0x7) << 2) |
691 | #define PM3LBSourceReadMode_StripeHeight(h) (((h)&0x7)<<5) | 706 | #define PM3LBSourceReadMode_StripeHeight(h) (((h) & 0x7) << 5) |
692 | #define PM3LBSourceReadMode_Layout 1<<8 | 707 | #define PM3LBSourceReadMode_Layout (1 << 8) |
693 | #define PM3LBSourceReadMode_Origin 1<<9 | 708 | #define PM3LBSourceReadMode_Origin (1 << 9) |
694 | #define PM3LBSourceReadMode_Packed16 1<<10 | 709 | #define PM3LBSourceReadMode_Packed16 (1 << 10) |
695 | #define PM3LBSourceReadMode_Width(w) (((w)&0xfff)<<11) | 710 | #define PM3LBSourceReadMode_Width(w) (((w) & 0xfff) << 11) |
696 | #define PM3LBStencil 0x88a8 | 711 | #define PM3LBStencil 0x88a8 |
697 | #define PM3LBWriteBufferAddr 0xb540 | 712 | #define PM3LBWriteBufferAddr 0xb540 |
698 | #define PM3LBWriteBufferOffset 0xb548 | 713 | #define PM3LBWriteBufferOffset 0xb548 |
699 | #define PM3LBWriteFormat 0x88c8 | 714 | #define PM3LBWriteFormat 0x88c8 |
700 | #define PM3LBWriteFormat_DepthWidth(w) (((w)&0x3)<<0) | 715 | #define PM3LBWriteFormat_DepthWidth(w) (((w) & 0x3) << 0) |
701 | #define PM3LBWriteFormat_StencilWidth(w) (((w)&0xf)<<2) | 716 | #define PM3LBWriteFormat_StencilWidth(w) (((w) & 0xf) << 2) |
702 | #define PM3LBWriteFormat_StencilPosition(p) (((p)&0x1f)<<6) | 717 | #define PM3LBWriteFormat_StencilPosition(p) (((p) & 0x1f) << 6) |
703 | #define PM3LBWriteFormat_GIDWidth(w) (((w)&0x7)<<20) | 718 | #define PM3LBWriteFormat_GIDWidth(w) (((w) & 0x7) << 20) |
704 | #define PM3LBWriteFormat_GIDPosition(p) (((p)&0x1f)<<23) | 719 | #define PM3LBWriteFormat_GIDPosition(p) (((p) & 0x1f) << 23) |
705 | #define PM3LBWriteMode 0x88c0 | 720 | #define PM3LBWriteMode 0x88c0 |
706 | #define PM3LBWriteModeAnd 0xac80 | 721 | #define PM3LBWriteModeAnd 0xac80 |
707 | #define PM3LBWriteModeOr 0xac88 | 722 | #define PM3LBWriteModeOr 0xac88 |
708 | #define PM3LBWriteMode_WriteDisable 0<<0 | 723 | #define PM3LBWriteMode_WriteDisable (0 << 0) |
709 | #define PM3LBWriteMode_WriteEnable 1<<0 | 724 | #define PM3LBWriteMode_WriteEnable (1 << 0) |
710 | #define PM3LBWriteMode_StripePitch(p) (((p)&0x7)<<3) | 725 | #define PM3LBWriteMode_StripePitch(p) (((p) & 0x7) << 3) |
711 | #define PM3LBWriteMode_StripeHeight(h) (((h)&0x7)<<6) | 726 | #define PM3LBWriteMode_StripeHeight(h) (((h) & 0x7) << 6) |
712 | #define PM3LBWriteMode_Layout 1<<9 | 727 | #define PM3LBWriteMode_Layout (1 << 9) |
713 | #define PM3LBWriteMode_Origin 1<<10 | 728 | #define PM3LBWriteMode_Origin (1 << 10) |
714 | #define PM3LBWriteMode_Packed16 1<<11 | 729 | #define PM3LBWriteMode_Packed16 (1 << 11) |
715 | #define PM3LBWriteMode_Width(w) (((w)&0xfff)<<12) | 730 | #define PM3LBWriteMode_Width(w) (((w) & 0xfff) << 12) |
716 | /* ... */ | 731 | /* ... */ |
717 | #define PM3LineStippleMode 0x81a8 | 732 | #define PM3LineStippleMode 0x81a8 |
718 | #define PM3LineStippleModeAnd 0xabc0 | 733 | #define PM3LineStippleModeAnd 0xabc0 |
@@ -722,19 +737,16 @@ | |||
722 | #define PM3LogicalOpMode 0x8828 | 737 | #define PM3LogicalOpMode 0x8828 |
723 | #define PM3LogicalOpModeAnd 0xace0 | 738 | #define PM3LogicalOpModeAnd 0xace0 |
724 | #define PM3LogicalOpModeOr 0xace8 | 739 | #define PM3LogicalOpModeOr 0xace8 |
725 | #define PM3LogicalOpMode_Disable (0<<0) | 740 | #define PM3LogicalOpMode_Disable (0 << 0) |
726 | #define PM3LogicalOpMode_Enable (1<<0) | 741 | #define PM3LogicalOpMode_Enable (1 << 0) |
727 | #define PM3LogicalOpMode_LogicOp(op) (((op)&0xf)<<1) | 742 | #define PM3LogicalOpMode_LogicOp(op) (((op) & 0xf) << 1) |
728 | #define PM3LogicalOpMode_UseConstantWriteData_Disable (0<<5) | 743 | #define PM3LogicalOpMode_UseConstantWriteData_Disable (0 << 5) |
729 | #define PM3LogicalOpMode_UseConstantWriteData_Enable (1<<5) | 744 | #define PM3LogicalOpMode_UseConstantWriteData_Enable (1 << 5) |
730 | #define PM3LogicalOpMode_Background_Disable (0<<6) | 745 | #define PM3LogicalOpMode_Background_Disable (0 << 6) |
731 | #define PM3LogicalOpMode_Background_Enable (1<<6) | 746 | #define PM3LogicalOpMode_Background_Enable (1 << 6) |
732 | #define PM3LogicalOpMode_Background_LogicOp(op) (((op)&0xf)<<7) | 747 | #define PM3LogicalOpMode_Background_LogicOp(op) (((op) & 0xf) << 7) |
733 | #define PM3LogicalOpMode_UseConstantSource_Disable (0<<11) | 748 | #define PM3LogicalOpMode_UseConstantSource_Disable (0 << 11) |
734 | #define PM3LogicalOpMode_UseConstantSource_Enable (1<<11) | 749 | #define PM3LogicalOpMode_UseConstantSource_Enable (1 << 11) |
735 | |||
736 | /* ... */ | ||
737 | #define PM3LUT 0x8e80 | ||
738 | /* ... */ | 750 | /* ... */ |
739 | #define PM3LUT 0x8e80 | 751 | #define PM3LUT 0x8e80 |
740 | #define PM3LUTAddress 0x84d0 | 752 | #define PM3LUTAddress 0x84d0 |
@@ -746,75 +758,74 @@ | |||
746 | #define PM3LUTTransfer 0x84d8 | 758 | #define PM3LUTTransfer 0x84d8 |
747 | /* ... */ | 759 | /* ... */ |
748 | #define PM3PixelSize 0x80c0 | 760 | #define PM3PixelSize 0x80c0 |
749 | #define PM3PixelSize_GLOBAL_32BIT (0<<0) | 761 | #define PM3PixelSize_GLOBAL_32BIT (0 << 0) |
750 | #define PM3PixelSize_GLOBAL_16BIT (1<<0) | 762 | #define PM3PixelSize_GLOBAL_16BIT (1 << 0) |
751 | #define PM3PixelSize_GLOBAL_8BIT (2<<0) | 763 | #define PM3PixelSize_GLOBAL_8BIT (2 << 0) |
752 | #define PM3PixelSize_RASTERIZER_32BIT (0<<2) | 764 | #define PM3PixelSize_RASTERIZER_32BIT (0 << 2) |
753 | #define PM3PixelSize_RASTERIZER_16BIT (1<<2) | 765 | #define PM3PixelSize_RASTERIZER_16BIT (1 << 2) |
754 | #define PM3PixelSize_RASTERIZER_8BIT (2<<2) | 766 | #define PM3PixelSize_RASTERIZER_8BIT (2 << 2) |
755 | #define PM3PixelSize_SCISSOR_AND_STIPPLE_32BIT (0<<4) | 767 | #define PM3PixelSize_SCISSOR_AND_STIPPLE_32BIT (0 << 4) |
756 | #define PM3PixelSize_SCISSOR_AND_STIPPLE_16BIT (1<<4) | 768 | #define PM3PixelSize_SCISSOR_AND_STIPPLE_16BIT (1 << 4) |
757 | #define PM3PixelSize_SCISSOR_AND_STIPPLE_8BIT (2<<4) | 769 | #define PM3PixelSize_SCISSOR_AND_STIPPLE_8BIT (2 << 4) |
758 | #define PM3PixelSize_TEXTURE_32BIT (0<<6) | 770 | #define PM3PixelSize_TEXTURE_32BIT (0 << 6) |
759 | #define PM3PixelSize_TEXTURE_16BIT (1<<6) | 771 | #define PM3PixelSize_TEXTURE_16BIT (1 << 6) |
760 | #define PM3PixelSize_TEXTURE_8BIT (2<<6) | 772 | #define PM3PixelSize_TEXTURE_8BIT (2 << 6) |
761 | #define PM3PixelSize_LUT_32BIT (0<<8) | 773 | #define PM3PixelSize_LUT_32BIT (0 << 8) |
762 | #define PM3PixelSize_LUT_16BIT (1<<8) | 774 | #define PM3PixelSize_LUT_16BIT (1 << 8) |
763 | #define PM3PixelSize_LUT_8BIT (2<<8) | 775 | #define PM3PixelSize_LUT_8BIT (2 << 8) |
764 | #define PM3PixelSize_FRAMEBUFFER_32BIT (0<<10) | 776 | #define PM3PixelSize_FRAMEBUFFER_32BIT (0 << 10) |
765 | #define PM3PixelSize_FRAMEBUFFER_16BIT (1<<10) | 777 | #define PM3PixelSize_FRAMEBUFFER_16BIT (1 << 10) |
766 | #define PM3PixelSize_FRAMEBUFFER_8BIT (2<<10) | 778 | #define PM3PixelSize_FRAMEBUFFER_8BIT (2 << 10) |
767 | #define PM3PixelSize_LOGICAL_OP_32BIT (0<<12) | 779 | #define PM3PixelSize_LOGICAL_OP_32BIT (0 << 12) |
768 | #define PM3PixelSize_LOGICAL_OP_16BIT (1<<12) | 780 | #define PM3PixelSize_LOGICAL_OP_16BIT (1 << 12) |
769 | #define PM3PixelSize_LOGICAL_OP_8BIT (2<<12) | 781 | #define PM3PixelSize_LOGICAL_OP_8BIT (2 << 12) |
770 | #define PM3PixelSize_LOCALBUFFER_32BIT (0<<14) | 782 | #define PM3PixelSize_LOCALBUFFER_32BIT (0 << 14) |
771 | #define PM3PixelSize_LOCALBUFFER_16BIT (1<<14) | 783 | #define PM3PixelSize_LOCALBUFFER_16BIT (1 << 14) |
772 | #define PM3PixelSize_LOCALBUFFER_8BIT (2<<14) | 784 | #define PM3PixelSize_LOCALBUFFER_8BIT (2 << 14) |
773 | #define PM3PixelSize_SETUP_32BIT (0<<16) | 785 | #define PM3PixelSize_SETUP_32BIT (0 << 16) |
774 | #define PM3PixelSize_SETUP_16BIT (1<<16) | 786 | #define PM3PixelSize_SETUP_16BIT (1 << 16) |
775 | #define PM3PixelSize_SETUP_8BIT (2<<16) | 787 | #define PM3PixelSize_SETUP_8BIT (2 << 16) |
776 | #define PM3PixelSize_GLOBAL (0<<31) | 788 | #define PM3PixelSize_GLOBAL (0 << 31) |
777 | #define PM3PixelSize_INDIVIDUAL (1<<31) | 789 | #define PM3PixelSize_INDIVIDUAL (1 << 31) |
778 | /* ... */ | 790 | /* ... */ |
779 | #define PM3Render 0x8038 | 791 | #define PM3Render 0x8038 |
780 | #define PM3Render_AreaStipple_Disable (0<<0) | 792 | #define PM3Render_AreaStipple_Disable (0 << 0) |
781 | #define PM3Render_AreaStipple_Enable (1<<0) | 793 | #define PM3Render_AreaStipple_Enable (1 << 0) |
782 | #define PM3Render_LineStipple_Disable (0<<1) | 794 | #define PM3Render_LineStipple_Disable (0 << 1) |
783 | #define PM3Render_LineStipple_Enable (1<<1) | 795 | #define PM3Render_LineStipple_Enable (1 << 1) |
784 | #define PM3Render_ResetLine_Disable (0<<2) | 796 | #define PM3Render_ResetLine_Disable (0 << 2) |
785 | #define PM3Render_ResetLine_Enable (1<<2) | 797 | #define PM3Render_ResetLine_Enable (1 << 2) |
786 | #define PM3Render_FastFill_Disable (0<<3) | 798 | #define PM3Render_FastFill_Disable (0 << 3) |
787 | #define PM3Render_FastFill_Enable (1<<3) | 799 | #define PM3Render_FastFill_Enable (1 << 3) |
788 | #define PM3Render_Primitive_Line (0<<6) | 800 | #define PM3Render_Primitive_Line (0 << 6) |
789 | #define PM3Render_Primitive_Trapezoid (1<<6) | 801 | #define PM3Render_Primitive_Trapezoid (1 << 6) |
790 | #define PM3Render_Primitive_Point (2<<6) | 802 | #define PM3Render_Primitive_Point (2 << 6) |
791 | #define PM3Render_Antialias_Disable (0<<8) | 803 | #define PM3Render_Antialias_Disable (0 << 8) |
792 | #define PM3Render_Antialias_Enable (1<<8) | 804 | #define PM3Render_Antialias_Enable (1 << 8) |
793 | #define PM3Render_Antialias_SubPixelRes_4x4 (0<<9) | 805 | #define PM3Render_Antialias_SubPixelRes_4x4 (0 << 9) |
794 | #define PM3Render_Antialias_SubPixelRes_8x8 (1<<9) | 806 | #define PM3Render_Antialias_SubPixelRes_8x8 (1 << 9) |
795 | #define PM3Render_UsePointTable_Disable (0<<10) | 807 | #define PM3Render_UsePointTable_Disable (0 << 10) |
796 | #define PM3Render_UsePointTable_Enable (1<<10) | 808 | #define PM3Render_UsePointTable_Enable (1 << 10) |
797 | #define PM3Render_SyncOnbitMask_Disable (0<<11) | 809 | #define PM3Render_SyncOnbitMask_Disable (0 << 11) |
798 | #define PM3Render_SyncOnBitMask_Enable (1<<11) | 810 | #define PM3Render_SyncOnBitMask_Enable (1 << 11) |
799 | #define PM3Render_SyncOnHostData_Disable (0<<12) | 811 | #define PM3Render_SyncOnHostData_Disable (0 << 12) |
800 | #define PM3Render_SyncOnHostData_Enable (1<<12) | 812 | #define PM3Render_SyncOnHostData_Enable (1 << 12) |
801 | #define PM3Render_Texture_Disable (0<<13) | 813 | #define PM3Render_Texture_Disable (0 << 13) |
802 | #define PM3Render_Texture_Enable (1<<13) | 814 | #define PM3Render_Texture_Enable (1 << 13) |
803 | #define PM3Render_Fog_Disable (0<<14) | 815 | #define PM3Render_Fog_Disable (0 << 14) |
804 | #define PM3Render_Fog_Enable (1<<14) | 816 | #define PM3Render_Fog_Enable (1 << 14) |
805 | #define PM3Render_Coverage_Disable (0<<15) | 817 | #define PM3Render_Coverage_Disable (0 << 15) |
806 | #define PM3Render_Coverage_Enable (1<<15) | 818 | #define PM3Render_Coverage_Enable (1 << 15) |
807 | #define PM3Render_SubPixelCorrection_Disable (0<<16) | 819 | #define PM3Render_SubPixelCorrection_Disable (0 << 16) |
808 | #define PM3Render_SubPixelCorrection_Enable (1<<16) | 820 | #define PM3Render_SubPixelCorrection_Enable (1 << 16) |
809 | #define PM3Render_SpanOperation_Disable (0<<18) | 821 | #define PM3Render_SpanOperation_Disable (0 << 18) |
810 | #define PM3Render_SpanOperation_Enable (1<<18) | 822 | #define PM3Render_SpanOperation_Enable (1 << 18) |
811 | #define PM3Render_FBSourceRead_Disable (0<<27) | 823 | #define PM3Render_FBSourceRead_Disable (0 << 27) |
812 | #define PM3Render_FBSourceRead_Enable (1<<27) | 824 | #define PM3Render_FBSourceRead_Enable (1 << 27) |
813 | #define PM3RasterizerMode 0x80a0 | 825 | #define PM3RasterizerMode 0x80a0 |
814 | #define PM3RasterizerModeAnd 0xaba0 | 826 | #define PM3RasterizerModeAnd 0xaba0 |
815 | #define PM3RasterizerModeOr 0xaba8 | 827 | #define PM3RasterizerModeOr 0xaba8 |
816 | #define PM3RectangleHeight 0x94e0 | 828 | #define PM3RectangleHeight 0x94e0 |
817 | #define PM3Render 0x8038 | ||
818 | #define PM3RepeatLine 0x9328 | 829 | #define PM3RepeatLine 0x9328 |
819 | #define PM3ResetPickResult 0x8c20 | 830 | #define PM3ResetPickResult 0x8c20 |
820 | #define PM3RLEMask 0x8c48 | 831 | #define PM3RLEMask 0x8c48 |
@@ -881,31 +892,31 @@ | |||
881 | #define PM3TextureIndexMode1And 0xb3d0 | 892 | #define PM3TextureIndexMode1And 0xb3d0 |
882 | #define PM3TextureIndexMode1Or 0xb3d8 | 893 | #define PM3TextureIndexMode1Or 0xb3d8 |
883 | /* ... */ | 894 | /* ... */ |
884 | #define PM3TextureMapSize 0xb428 | 895 | #define PM3TextureMapSize 0xb428 |
885 | #define PM3TextureMapWidth0 0x8580 | 896 | #define PM3TextureMapWidth0 0x8580 |
886 | #define PM3TextureMapWidth1 0x8588 | 897 | #define PM3TextureMapWidth1 0x8588 |
887 | #define PM3TextureMapWidth_Width(w) ((w&0xfff)<<0) | 898 | #define PM3TextureMapWidth_Width(w) (((w) & 0xfff) << 0) |
888 | #define PM3TextureMapWidth_BorderLayout (1<<12) | 899 | #define PM3TextureMapWidth_BorderLayout (1 << 12) |
889 | #define PM3TextureMapWidth_Layout_Linear (0<<13) | 900 | #define PM3TextureMapWidth_Layout_Linear (0 << 13) |
890 | #define PM3TextureMapWidth_Layout_Patch64 (1<<13) | 901 | #define PM3TextureMapWidth_Layout_Patch64 (1 << 13) |
891 | #define PM3TextureMapWidth_Layout_Patch32_2 (2<<13) | 902 | #define PM3TextureMapWidth_Layout_Patch32_2 (2 << 13) |
892 | #define PM3TextureMapWidth_Layout_Patch2 (3<<13) | 903 | #define PM3TextureMapWidth_Layout_Patch2 (3 << 13) |
893 | #define PM3TextureMapWidth_HostTexture (1<<15) | 904 | #define PM3TextureMapWidth_HostTexture (1 << 15) |
894 | #define PM3TextureReadMode0 0xb400 | 905 | #define PM3TextureReadMode0 0xb400 |
895 | #define PM3TextureReadMode0And 0xac30 | 906 | #define PM3TextureReadMode0And 0xac30 |
896 | #define PM3TextureReadMode0Or 0xac38 | 907 | #define PM3TextureReadMode0Or 0xac38 |
897 | #define PM3TextureReadMode1 0xb408 | 908 | #define PM3TextureReadMode1 0xb408 |
898 | #define PM3TextureReadMode1And 0xad40 | 909 | #define PM3TextureReadMode1And 0xad40 |
899 | #define PM3TextureReadMode1Or 0xad48 | 910 | #define PM3TextureReadMode1Or 0xad48 |
900 | /* ... */ | 911 | /* ... */ |
901 | #define PM3WaitForCompletion 0x80b8 | 912 | #define PM3WaitForCompletion 0x80b8 |
902 | #define PM3Window 0x8980 | 913 | #define PM3Window 0x8980 |
903 | #define PM3Window_ForceLBUpdate 1<<3 | 914 | #define PM3Window_ForceLBUpdate (1 << 3) |
904 | #define PM3Window_LBUpdateSource 1<<4 | 915 | #define PM3Window_LBUpdateSource (1 << 4) |
905 | #define PM3Window_FrameCount(c) (((c)&0xff)<<9) | 916 | #define PM3Window_FrameCount(c) (((c) & 0xff) << 9) |
906 | #define PM3Window_StencilFCP 1<<17 | 917 | #define PM3Window_StencilFCP (1 << 17) |
907 | #define PM3Window_DepthFCP 1<<18 | 918 | #define PM3Window_DepthFCP (1 << 18) |
908 | #define PM3Window_OverrideWriteFiltering 1<<19 | 919 | #define PM3Window_OverrideWriteFiltering (1 << 19) |
909 | #define PM3WindowAnd 0xab80 | 920 | #define PM3WindowAnd 0xab80 |
910 | #define PM3WindowOr 0xab88 | 921 | #define PM3WindowOr 0xab88 |
911 | #define PM3WindowOrigin 0x81c8 | 922 | #define PM3WindowOrigin 0x81c8 |
@@ -920,172 +931,131 @@ | |||
920 | 931 | ||
921 | 932 | ||
922 | /********************************************** | 933 | /********************************************** |
923 | * GLINT Permedia3 2D setup Unit * | 934 | * GLINT Permedia3 2D setup Unit * |
924 | ***********************************************/ | 935 | ***********************************************/ |
925 | #define PM3Config2D 0xb618 | 936 | #define PM3Config2D 0xb618 |
926 | #define PM3Config2D_OpaqueSpan 1<<0 | 937 | #define PM3Config2D_OpaqueSpan (1 << 0) |
927 | #define PM3Config2D_MultiRXBlit 1<<1 | 938 | #define PM3Config2D_MultiRXBlit (1 << 1) |
928 | #define PM3Config2D_UserScissorEnable 1<<2 | 939 | #define PM3Config2D_UserScissorEnable (1 << 2) |
929 | #define PM3Config2D_FBDestReadEnable 1<<3 | 940 | #define PM3Config2D_FBDestReadEnable (1 << 3) |
930 | #define PM3Config2D_AlphaBlendEnable 1<<4 | 941 | #define PM3Config2D_AlphaBlendEnable (1 << 4) |
931 | #define PM3Config2D_DitherEnable 1<<5 | 942 | #define PM3Config2D_DitherEnable (1 << 5) |
932 | #define PM3Config2D_ForegroundROPEnable 1<<6 | 943 | #define PM3Config2D_ForegroundROPEnable (1 << 6) |
933 | #define PM3Config2D_ForegroundROP(rop) (((rop)&0xf)<<7) | 944 | #define PM3Config2D_ForegroundROP(rop) (((rop) & 0xf) << 7) |
934 | #define PM3Config2D_BackgroundROPEnable 1<<11 | 945 | #define PM3Config2D_BackgroundROPEnable (1 << 11) |
935 | #define PM3Config2D_BackgroundROP(rop) (((rop)&0xf)<<12) | 946 | #define PM3Config2D_BackgroundROP(rop) (((rop) & 0xf) << 12) |
936 | #define PM3Config2D_UseConstantSource 1<<16 | 947 | #define PM3Config2D_UseConstantSource (1 << 16) |
937 | #define PM3Config2D_FBWriteEnable 1<<17 | 948 | #define PM3Config2D_FBWriteEnable (1 << 17) |
938 | #define PM3Config2D_Blocking 1<<18 | 949 | #define PM3Config2D_Blocking (1 << 18) |
939 | #define PM3Config2D_ExternalSourceData 1<<19 | 950 | #define PM3Config2D_ExternalSourceData (1 << 19) |
940 | #define PM3Config2D_LUTModeEnable 1<<20 | 951 | #define PM3Config2D_LUTModeEnable (1 << 20) |
941 | #define PM3DownloadGlyphwidth 0xb658 | 952 | #define PM3DownloadGlyphwidth 0xb658 |
942 | #define PM3DownloadGlyphwidth_GlyphWidth(gw) ((gw)&0xffff) | 953 | #define PM3DownloadGlyphwidth_GlyphWidth(gw) ((gw) & 0xffff) |
943 | #define PM3DownloadTarget 0xb650 | 954 | #define PM3DownloadTarget 0xb650 |
944 | #define PM3DownloadTarget_TagName(tag) ((tag)&0x1fff) | 955 | #define PM3DownloadTarget_TagName(tag) ((tag) & 0x1fff) |
945 | #define PM3GlyphData 0xb660 | 956 | #define PM3GlyphData 0xb660 |
946 | #define PM3GlyphPosition 0xb608 | 957 | #define PM3GlyphPosition 0xb608 |
947 | #define PM3GlyphPosition_XOffset(x) ((x)&0xffff) | 958 | #define PM3GlyphPosition_XOffset(x) ((x) & 0xffff) |
948 | #define PM3GlyphPosition_YOffset(y) (((y)&0xffff)<<16) | 959 | #define PM3GlyphPosition_YOffset(y) (((y) & 0xffff) << 16) |
949 | #define PM3Packed4Pixels 0xb668 | 960 | #define PM3Packed4Pixels 0xb668 |
950 | #define PM3Packed8Pixels 0xb630 | 961 | #define PM3Packed8Pixels 0xb630 |
951 | #define PM3Packed16Pixels 0xb638 | 962 | #define PM3Packed16Pixels 0xb638 |
952 | #define PM3RectanglePosition 0xb600 | 963 | #define PM3RectanglePosition 0xb600 |
953 | #define PM3RectanglePosition_XOffset(x) ((x)&0xffff) | 964 | #define PM3RectanglePosition_XOffset(x) ((x) & 0xffff) |
954 | #define PM3RectanglePosition_YOffset(y) (((y)&0xffff)<<16) | 965 | #define PM3RectanglePosition_YOffset(y) (((y) & 0xffff) << 16) |
955 | #define PM3Render2D 0xb640 | 966 | #define PM3Render2D 0xb640 |
956 | #define PM3Render2D_Width(w) ((w)&0x0fff) | 967 | #define PM3Render2D_Width(w) ((w) & 0x0fff) |
957 | #define PM3Render2D_Operation_Normal 0<<12 | 968 | #define PM3Render2D_Operation_Normal (0 << 12) |
958 | #define PM3Render2D_Operation_SyncOnHostData 1<<12 | 969 | #define PM3Render2D_Operation_SyncOnHostData (1 << 12) |
959 | #define PM3Render2D_Operation_SyncOnBitMask 2<<12 | 970 | #define PM3Render2D_Operation_SyncOnBitMask (2 << 12) |
960 | #define PM3Render2D_Operation_PatchOrderRendering 3<<12 | 971 | #define PM3Render2D_Operation_PatchOrderRendering (3 << 12) |
961 | #define PM3Render2D_FBSourceReadEnable 1<<14 | 972 | #define PM3Render2D_FBSourceReadEnable (1 << 14) |
962 | #define PM3Render2D_SpanOperation 1<<15 | 973 | #define PM3Render2D_SpanOperation (1 << 15) |
963 | #define PM3Render2D_Height(h) (((h)&0x0fff)<<16) | 974 | #define PM3Render2D_Height(h) (((h) & 0x0fff) << 16) |
964 | #define PM3Render2D_XPositive 1<<28 | 975 | #define PM3Render2D_XPositive (1 << 28) |
965 | #define PM3Render2D_YPositive 1<<29 | 976 | #define PM3Render2D_YPositive (1 << 29) |
966 | #define PM3Render2D_AreaStippleEnable 1<<30 | 977 | #define PM3Render2D_AreaStippleEnable (1 << 30) |
967 | #define PM3Render2D_TextureEnable 1<<31 | 978 | #define PM3Render2D_TextureEnable (1 << 31) |
968 | #define PM3Render2DGlyph 0xb648 | 979 | #define PM3Render2DGlyph 0xb648 |
969 | #define PM3Render2DGlyph_Width(w) ((w)&0x7f) | 980 | #define PM3Render2DGlyph_Width(w) ((w) & 0x7f) |
970 | #define PM3Render2DGlyph_Height(h) (((h)&0x7f)<<7) | 981 | #define PM3Render2DGlyph_Height(h) (((h) & 0x7f) << 7) |
971 | #define PM3Render2DGlyph_XOffset(x) (((x)&0x1ff)<<14) | 982 | #define PM3Render2DGlyph_XOffset(x) (((x) & 0x1ff) << 14) |
972 | #define PM3Render2DGlyph_YOffset(y) (((y)&0x1ff)<<23) | 983 | #define PM3Render2DGlyph_YOffset(y) (((y) & 0x1ff) << 23) |
973 | #define PM3RenderPatchOffset 0xb610 | 984 | #define PM3RenderPatchOffset 0xb610 |
974 | #define PM3RenderPatchOffset_XOffset(x) ((x)&0xffff) | 985 | #define PM3RenderPatchOffset_XOffset(x) ((x) & 0xffff) |
975 | #define PM3RenderPatchOffset_YOffset(y) (((y)&0xffff)<<16) | 986 | #define PM3RenderPatchOffset_YOffset(y) (((y) & 0xffff) << 16) |
976 | #define PM3RLCount 0xb678 | 987 | #define PM3RLCount 0xb678 |
977 | #define PM3RLCount_Count(c) ((c)&0x0fff) | 988 | #define PM3RLCount_Count(c) ((c) & 0x0fff) |
978 | #define PM3RLData 0xb670 | 989 | #define PM3RLData 0xb670 |
979 | 990 | ||
980 | /********************************************** | 991 | /********************************************** |
981 | * GLINT Permedia3 Alias Register * | 992 | * GLINT Permedia3 Alias Register * |
982 | ***********************************************/ | 993 | ***********************************************/ |
983 | #define PM3FillBackgroundColor 0x8330 | 994 | #define PM3FillBackgroundColor 0x8330 |
984 | #define PM3FillConfig2D0 0x8338 | 995 | #define PM3FillConfig2D0 0x8338 |
985 | #define PM3FillConfig2D1 0x8360 | 996 | #define PM3FillConfig2D1 0x8360 |
986 | #define PM3FillConfig2D_OpaqueSpan 1<<0 | 997 | #define PM3FillConfig2D_OpaqueSpan (1 << 0) |
987 | #define PM3FillConfig2D_MultiRXBlit 1<<1 | 998 | #define PM3FillConfig2D_MultiRXBlit (1 << 1) |
988 | #define PM3FillConfig2D_UserScissorEnable 1<<2 | 999 | #define PM3FillConfig2D_UserScissorEnable (1 << 2) |
989 | #define PM3FillConfig2D_FBDestReadEnable 1<<3 | 1000 | #define PM3FillConfig2D_FBDestReadEnable (1 << 3) |
990 | #define PM3FillConfig2D_AlphaBlendEnable 1<<4 | 1001 | #define PM3FillConfig2D_AlphaBlendEnable (1 << 4) |
991 | #define PM3FillConfig2D_DitherEnable 1<<5 | 1002 | #define PM3FillConfig2D_DitherEnable (1 << 5) |
992 | #define PM3FillConfig2D_ForegroundROPEnable 1<<6 | 1003 | #define PM3FillConfig2D_ForegroundROPEnable (1 << 6) |
993 | #define PM3FillConfig2D_ForegroundROP(rop) (((rop)&0xf)<<7) | 1004 | #define PM3FillConfig2D_ForegroundROP(rop) (((rop) & 0xf) << 7) |
994 | #define PM3FillConfig2D_BackgroundROPEnable 1<<11 | 1005 | #define PM3FillConfig2D_BackgroundROPEnable (1 << 11) |
995 | #define PM3FillConfig2D_BackgroundROP(rop) (((rop)&0xf)<<12) | 1006 | #define PM3FillConfig2D_BackgroundROP(rop) (((rop) & 0xf) << 12) |
996 | #define PM3FillConfig2D_UseConstantSource 1<<16 | 1007 | #define PM3FillConfig2D_UseConstantSource (1 << 16) |
997 | #define PM3FillConfig2D_FBWriteEnable 1<<17 | 1008 | #define PM3FillConfig2D_FBWriteEnable (1 << 17) |
998 | #define PM3FillConfig2D_Blocking 1<<18 | 1009 | #define PM3FillConfig2D_Blocking (1 << 18) |
999 | #define PM3FillConfig2D_ExternalSourceData 1<<19 | 1010 | #define PM3FillConfig2D_ExternalSourceData (1 << 19) |
1000 | #define PM3FillConfig2D_LUTModeEnable 1<<20 | 1011 | #define PM3FillConfig2D_LUTModeEnable (1 << 20) |
1001 | #define PM3FillFBDestReadBufferAddr 0x8310 | 1012 | #define PM3FillFBDestReadBufferAddr 0x8310 |
1002 | #define PM3FillFBSourceReadBufferAddr 0x8308 | 1013 | #define PM3FillFBSourceReadBufferAddr 0x8308 |
1003 | #define PM3FillFBSourceReadBufferOffset 0x8340 | 1014 | #define PM3FillFBSourceReadBufferOffset 0x8340 |
1004 | #define PM3FillFBSourceReadBufferOffset_XOffset(x) ((x)&0xffff) | 1015 | #define PM3FillFBSourceReadBufferOffset_XOffset(x) ((x) & 0xffff) |
1005 | #define PM3FillFBSourceReadBufferOffset_YOffset(y) (((y)&0xffff)<<16) | 1016 | #define PM3FillFBSourceReadBufferOffset_YOffset(y) \ |
1006 | #define PM3FillFBWriteBufferAddr 0x8300 | 1017 | (((y) & 0xffff) << 16) |
1007 | #define PM3FillForegroundColor0 0x8328 | 1018 | #define PM3FillFBWriteBufferAddr 0x8300 |
1008 | #define PM3FillForegroundColor1 0x8358 | 1019 | #define PM3FillForegroundColor0 0x8328 |
1009 | #define PM3FillGlyphPosition 0x8368 | 1020 | #define PM3FillForegroundColor1 0x8358 |
1010 | #define PM3FillGlyphPosition_XOffset(x) ((x)&0xffff) | 1021 | #define PM3FillGlyphPosition 0x8368 |
1011 | #define PM3FillGlyphPosition_YOffset(y) (((y)&0xffff)<<16) | 1022 | #define PM3FillGlyphPosition_XOffset(x) ((x) & 0xffff) |
1012 | #define PM3FillRectanglePosition 0x8348 | 1023 | #define PM3FillGlyphPosition_YOffset(y) (((y) & 0xffff) << 16) |
1013 | #define PM3FillRectanglePosition_XOffset(x) ((x)&0xffff) | 1024 | #define PM3FillRectanglePosition 0x8348 |
1014 | #define PM3FillRectanglePosition_YOffset(y) (((y)&0xffff)<<16) | 1025 | #define PM3FillRectanglePosition_XOffset(x) ((x) & 0xffff) |
1026 | #define PM3FillRectanglePosition_YOffset(y) (((y) & 0xffff) << 16) | ||
1015 | 1027 | ||
1016 | #define PM3_REGS_SIZE 0x10000 | ||
1017 | #define PM3_MAX_PIXCLOCK 300000 | ||
1018 | /* a few more useful registers & regs value... */ | 1028 | /* a few more useful registers & regs value... */ |
1019 | #define PM3Sync 0x8c40 | 1029 | #define PM3Sync 0x8c40 |
1020 | #define PM3Sync_Tag 0x188 | 1030 | #define PM3Sync_Tag 0x188 |
1021 | #define PM3FilterMode 0x8c00 | 1031 | #define PM3FilterMode 0x8c00 |
1022 | #define PM3FilterModeSync 0x400 | 1032 | #define PM3FilterModeSync 0x400 |
1023 | #define PM3OutputFifo 0x2000 | 1033 | #define PM3OutputFifo 0x2000 |
1024 | #define PM3StatisticMode 0x8c08 | 1034 | #define PM3StatisticMode 0x8c08 |
1025 | #define PM3AreaStippleMode 0x81a0 | 1035 | #define PM3AreaStippleMode 0x81a0 |
1026 | #define AreaStipplePattern0 (0x8200) | 1036 | #define AreaStipplePattern_indexed(i) (0x8200 + ((i) * 0x8)) |
1027 | #define AreaStipplePattern1 (0x8208) | ||
1028 | #define AreaStipplePattern2 (0x8210) | ||
1029 | #define AreaStipplePattern3 (0x8218) | ||
1030 | #define AreaStipplePattern4 (0x8220) | ||
1031 | #define AreaStipplePattern5 (0x8228) | ||
1032 | #define AreaStipplePattern6 (0x8230) | ||
1033 | #define AreaStipplePattern7 (0x8238) | ||
1034 | #define AreaStipplePattern8 (0x8240) | ||
1035 | #define AreaStipplePattern9 (0x8248) | ||
1036 | #define AreaStipplePattern10 (0x8250) | ||
1037 | #define AreaStipplePattern11 (0x8258) | ||
1038 | #define AreaStipplePattern12 (0x8260) | ||
1039 | #define AreaStipplePattern13 (0x8268) | ||
1040 | #define AreaStipplePattern14 (0x8270) | ||
1041 | #define AreaStipplePattern15 (0x8278) | ||
1042 | #define AreaStipplePattern16 (0x8280) | ||
1043 | #define AreaStipplePattern17 (0x8288) | ||
1044 | #define AreaStipplePattern18 (0x8290) | ||
1045 | #define AreaStipplePattern19 (0x8298) | ||
1046 | #define AreaStipplePattern20 (0x82a0) | ||
1047 | #define AreaStipplePattern21 (0x82a8) | ||
1048 | #define AreaStipplePattern22 (0x82b0) | ||
1049 | #define AreaStipplePattern23 (0x82b8) | ||
1050 | #define AreaStipplePattern24 (0x82c0) | ||
1051 | #define AreaStipplePattern25 (0x82c8) | ||
1052 | #define AreaStipplePattern26 (0x82d0) | ||
1053 | #define AreaStipplePattern27 (0x82d8) | ||
1054 | #define AreaStipplePattern28 (0x82eo) | ||
1055 | #define AreaStipplePattern29 (0x82e8) | ||
1056 | #define AreaStipplePattern30 (0x82f0) | ||
1057 | #define AreaStipplePattern31 (0x82f8) | ||
1058 | #define AreaStipplePattern_indexed(i) (0x8200 + ((i) * 0x8)) | ||
1059 | 1037 | ||
1060 | #define PM3DepthMode 0x89a0 | 1038 | #define PM3DepthMode 0x89a0 |
1061 | #define PM3StencilMode 0x8988 | 1039 | #define PM3StencilMode 0x8988 |
1062 | #define PM3StencilData 0x8990 | 1040 | #define PM3StencilData 0x8990 |
1063 | #define PM3TextureReadMode 0x8670 | 1041 | #define PM3TextureReadMode 0x8670 |
1064 | #define PM3FogMode 0x8690 | 1042 | #define PM3FogMode 0x8690 |
1065 | #define PM3ChromaTestMode 0x8f18 | 1043 | #define PM3ChromaTestMode 0x8f18 |
1066 | #define PM3YUVMode 0x8f00 | 1044 | #define PM3YUVMode 0x8f00 |
1067 | #define PM3BitMaskPattern 0x8068 | 1045 | #define PM3BitMaskPattern 0x8068 |
1068 | 1046 | ||
1069 | /* ***************************** */ | 1047 | /* ***************************** */ |
1070 | /* ***** pm3fb IOCTL const ***** */ | 1048 | /* ***** pm3fb IOCTL const ***** */ |
1071 | /* ***************************** */ | 1049 | /* ***************************** */ |
1072 | /* debug-only IOCTL */ | 1050 | #define PM3FBIO_RESETCHIP 0x504D33FF /* 'PM3\377' */ |
1073 | #define PM3FBIO_CLEARMEMORY 0x504D3300 /* 'PM3\000' */ | ||
1074 | #define PM3FBIO_CLEARCMAP 0x504D3301 /* 'PM3\001' */ | ||
1075 | /* common use IOCTL */ | ||
1076 | #define PM3FBIO_RESETCHIP 0x504D33FF /* 'PM3\377' */ | ||
1077 | 1051 | ||
1078 | /* ***************************************** */ | 1052 | /* ***************************************** */ |
1079 | /* ***** pm3fb useful define and macro ***** */ | 1053 | /* ***** pm3fb useful define and macro ***** */ |
1080 | /* ***************************************** */ | 1054 | /* ***************************************** */ |
1081 | 1055 | ||
1082 | /* fifo size in chip */ | 1056 | /* fifo size in chip */ |
1083 | #define PM3_FIFO_SIZE 120 | 1057 | #define PM3_FIFO_SIZE 120 |
1084 | 1058 | #define PM3_REGS_SIZE 0x10000 | |
1085 | /* max size of options */ | 1059 | #define PM3_MAX_PIXCLOCK 300000 |
1086 | #define PM3_OPTIONS_SIZE 256 | ||
1087 | |||
1088 | /* max size of font name */ | ||
1089 | #define PM3_FONTNAME_SIZE 40 | ||
1090 | 1060 | ||
1091 | #endif /* PM3FB_H */ | 1061 | #endif /* PM3FB_H */ |