3 Dedicated to ATI's hackers.
7 This document will compare ATI chips only from point of DAC and video overlay.
8 There are lots of difference from 3D point, dual-head support, tv-out support
9 and many other things but it's already perfectly different story.
10 This document doesn't include information about ATI AIW (All In Wonder) chips.
12 What are units on modern ATI chips:
13 DAC - (Digital to Analog Convertor) controls CRTC, LCD, DFP monitor's output
15 PLL - (Programable line length) registers
19 DAC2 - controls CRTC, LCD, DFP monitor's output on second head
20 TVDAC - controls Composite Video and Super Video output ports
24 TV format convertor (PAL/NTSC)
25 TVCAP - controls Video-In port
26 MPP - Miscellaneous peripheral port. (includes macrovision's filter - copy
28 OV - Video overlay (YUV BES) (include subpictures, gamma correction and
29 adaptive deinterlacing)
30 CAP0 - Video capturing
31 CAP1 - Video capturing (second unit)
32 RT - Rage theatre: video encoding and mixing
34 MEM - PCI/AGP bus mastering
36 3D - 3D-OpenGL engine (There are lots of stuff)
39 This document is mainly related only with OV unit ;)
40 Video decoding diagram:
42 RAM memory: [ App ] Copies YUV image to overlay memory
43 | <-- (It's possible to program DMA here)
44 overlay memory:[ OV ] performs scaling and YUVtoRGB convertion
47 / [ macrovision ] performs copy protection filtering
48 / \ (unneeded but presented by default thing;)
49 [ CRTC/LCD/DFP DAC ] [ TV DAC ] convert RGB memory to CRTC and NTSC/PAL signals
51 [CRTC/LCD/DFP Monitor] [TV-screen]
55 What is history of ATI's chips? I can be wrong but below is my vision
58 0. I don't know any earlied chips :(
64 It's first chip which has support from side of open
65 source drivers. Set of mach64 chips is:
76 It seems that these chips have fully compatible by GPU with Mach64
77 which is extended by 3D possibilities. Set of 3D rage chips is:
84 3D RAGE PRO (BGA, AGP)
85 3D RAGE PRO (BGA, AGP, 1x only)
86 3D RAGE PRO (BGA, PCI)
87 3D RAGE PRO (PQFP, PCI)
88 3D RAGE PRO (PQFP, PCI, limited 3D)
92 3D RAGE Mobility (PCI)
93 3D RAGE Mobility (AGP)
96 These chips have perfectly new GPU which supports memory mapped IO
97 space for accelerating port access (It's main cause of incompatibility
98 with mach64). Set of Rage128 chips is:
109 Rage128 Mobility M3 LE
110 Rage128 Mobility M3 LF
112 These chips are successors of Rage128 ones.
143 Indeed they could be named Rage256 Pro. (With minor changes is fully
144 compatible with Rage128 chips).
155 Indeed they could be named Rage512 Pro.
159 10. Radeon3 and newest are cooming soon, but I hope that they will be fully
160 compatible with Radeon1 chips.
162 In Radeon famility there were introduced also FX chips: Radeon FX and
163 Radeon2 8700 FX. Probably they have the same possibility as other Radeon
164 but currently it's unknown for me.
166 What about video overlay and DAC?
167 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169 Currently it's known that there is only difference between
170 Mach64 and Rage128 compatible chips:
171 - They have different logic of io ports programming!
172 - They are incompatible by port numbers!
174 - They use the same program logic from register's name point.
175 (Indeed exists slight difference even between Radeon and Rage128
176 chips. AFAIK only Radeon has OV0_SLICE_CNTL register which currently
177 is not used by driver. But I know only its name ;). Also there
178 is difference in slight adjust of BES position but it's configured
183 (The piece of Back-End Scaler programming)
185 Sample for Mach64 compatible chips:
186 ***********************************
188 #define SPARSE_IO_BASE 0x03fcu
189 #define SPARSE_IO_SELECT 0xfc00u
191 #define BLOCK_IO_BASE 0xff00u
192 #define BLOCK_IO_SELECT 0x00fcu
194 #define MM_IO_SELECT 0x03fcu
195 #define BLOCK_SELECT 0x0400u
196 #define DWORD_SELECT (BLOCK_SELECT | MM_IO_SELECT)
198 #define IO_BYTE_SELECT 0x0003u
200 #define SPARSE_IO_PORT (SPARSE_IO_BASE | IO_BYTE_SELECT)
201 #define BLOCK_IO_PORT (BLOCK_IO_BASE | IO_BYTE_SELECT)
203 #define IOPortTag(_SparseIOSelect, _BlockIOSelect) \
204 (SetBits(_SparseIOSelect, SPARSE_IO_SELECT) | \
205 SetBits(_BlockIOSelect, BLOCK_SELECT | MM_IO_SELECT))
206 #define SparseIOTag(_IOSelect) IOPortTag(_IOSelect, 0)
207 #define BlockIOTag(_IOSelect) IOPortTag(0, _IOSelect)
211 #define OVERLAY_Y_X_START BlockIOTag(0x100u)
212 #define OVERLAY_Y_X_END BlockIOTag(0x101u)
216 #define OUTREG(_Register, _Value) \
217 MMIO_OUT32(pATI->pBlock[GetBits(_Register, BLOCK_SELECT)], \
218 (_Register) & MM_IO_SELECT, _Value)
222 OUTREG(OVERLAY_Y_X_START,((drw_x)<<16)|(drw_y)|(1<<31));
223 OUTREG(OVERLAY_Y_X_END,((drw_x+drw_w)<<16)|(drw_y+drw_h));
226 Sample for Rage128 compatible chips:
227 ************************************
229 #define OV0_Y_X_START 0x0400
230 #define OV0_Y_X_END 0x0404
234 #define INREG(addr) readl((rage_mmio_base)+addr)
235 #define OUTREG(addr,val) writel(val, (rage_mmio_base)+addr)
239 rage_mmio_base = ioremap_nocache(pci_resource_start (dev, 2),RAGE_REGSIZE);
249 OUTREG(OV0_Y_X_START,(drw_x+X_ADJUST)|(drw_y<<16));
250 OUTREG(OV0_Y_X_END,(drw_x+drw_w+X_ADJUST)|(drw_y+drw_h)<<16));
252 Thus - these chips have almost the same logic from register's name point.
253 (except the fact that they have swapped 16-bit halfs).
254 Yes - programming of Rage128 is much simpler of Mach64.
257 What about other ATI's chips?
258 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
260 I suggest you have latest copy of GATOS-CVS:
261 http://www.linuxvideo.org
262 GATOS was designed and introduced as General ATI TV and Overlay Sowfware.
263 You will be able to find out there a lots of useful hacking utilities
264 (at location gatos-ati/gatos):
265 gfxdump - Program for dumping graphics chips registers on Linux and Windows 9X.
266 (it's more useful for Win9x to hack their values).
267 xatitv - For working with tv-in (currently is under hard development)
268 atitvout- For working with tv-out
269 and lot of other stuff.
270 BUT: After studing of Gatos and X11 stuffs I've found that they are bad
271 optimized for movie playback.
273 radeon_vid - configures video overlay only once and provides DGA to it.
274 (doesn't require to be MMX optimized)
275 gatos and X11 - configures video overlay at every slice of frame, then
276 performs unoptimized copying of source stuff to video memory
277 often with using CopyMungedData (it's C-analog of YV12_to_YUY2)
278 since there are lacks in yv12 support.
279 (is not MMX optimized that's gladly accepted, but probably
280 will be never optimized due portability).
282 hardware IDCT support diagram:
283 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
285 [ Video parser ] <---------- [ Transport demuxing ] --> [ Audio ]
287 [ Variable length decoder] |D |
289 [ Inverse quantization ] |D |
291 -------|---[ video card ]---------+ |s |
293 [ Run level decode & de-zigzag ] | |b |
297 [ Motion compensation ] | |t |
299 [ Advanced deinterlacing ] | |r |
301 [ Filtered X-Y scaling ] [SUBPIC]-|-----+s [ OSD ]
303 [ 4-bit alpha blending ] <---+ | +-------+
305 [ YUV to RGB conversion ] |
306 -------|--------------------------+
307 TV-screen or CRT-display