1117N/A * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and 1117N/A * VA Linux Systems Inc., Fremont, California. 1117N/A * Permission is hereby granted, free of charge, to any person obtaining 1117N/A * a copy of this software and associated documentation files (the 1117N/A * "Software"), to deal in the Software without restriction, including 1117N/A * without limitation on the rights to use, copy, modify, merge, 1117N/A * publish, distribute, sublicense, and/or sell copies of the Software, 1117N/A * and to permit persons to whom the Software is furnished to do so, 1117N/A * subject to the following conditions: 1117N/A * The above copyright notice and this permission notice (including the 1117N/A * next paragraph) shall be included in all copies or substantial 1117N/A * portions of the Software. 1117N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1117N/A * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1117N/A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1117N/A * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR 1117N/A * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 1117N/A * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1117N/A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1117N/A * DEALINGS IN THE SOFTWARE. 1117N/A * Kevin E. Martin <martin@xfree86.org> 1117N/A * Rickard E. Faith <faith@valinux.com> 1117N/A * Alan Hourihane <alanh@fairlite.demon.co.uk> 1117N/A * RAGE 128 VR/ RAGE 128 GL Register Reference Manual (Technical 1117N/A * Reference Manual P/N RRG-G04100-C Rev. 0.04), ATI Technologies: April 1117N/A * RAGE 128 Software Development Manual (Technical Reference Manual P/N 1117N/A * SDK-G04000 Rev. 0.01), ATI Technologies: June 1999. 1117N/A * AND CONTAINS REGISTERS AND REGISTER DEFINITIONS THAT ARE NOT CORRECT 1117N/A * ON THE RADEON. A FULL AUDIT OF THIS CODE IS NEEDED! */ 1117N/A/* #define RADEON_CAP0_DWNSC_XRATIO 0x0978 */ 1117N/A/* #define RADEON_CAP0_XSHARPNESS 0x097C */ 1117N/A/* misc multimedia registers */ 1117N/A/* note: bits 13-5: 32 byte aligned stride of texture map */ 1117N/A /* Registers for CP and Microcode Engine */ 1117N/A/* 78a8 appears to be some kind of (reasonably tolerant) clock? 1117N/A * 78d0 definitely hits the transmitter, definitely clock. */ 1117N/A/* MYSTERY1 This appears to control dithering? */ 1117N/A/* If radeon_mm_i2c is to be believed, this is HALT, NACK, and maybe 1117N/A/* Reading is done 4 bytes at a time: read the bottom 8 bits from 1117N/A * 7d44, four times in a row. 1117N/A * Writing is a little more complex. First write DATA with 1117N/A * 0xnnnnnnzz, then 0xnnnnnnyy, where nnnnnn is some non-deterministic 1117N/A * magic number, zz is, I think, the slave address, and yy is the byte 1117N/A /* Floating point formats */ 1117N/A /* Note - hardware supports both 16 and 32 bit floating point */ 1117N/A /* alpha modes, convenience mostly */ 1117N/A /* if you have alpha, pick constant appropriate to the 1117N/A number of channels (1 for I8, 2 for I8A8, 4 for R8G8B8A8, etc */ 1117N/A /* 2.0*Z, everything above 1.0 is set to 0.0 */ 1117N/A /* 2.0*W, everything above 1.0 is set to 0.0 */ 1117N/A /* Convenience macro to take care of layout and swizzling */