Home | History | Annotate | Line # | Download | only in src
      1 /*
      2  * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi (at) xfree86.org
      3  *
      4  * Permission to use, copy, modify, distribute, and sell this software and its
      5  * documentation for any purpose is hereby granted without fee, provided that
      6  * the above copyright notice appear in all copies and that both that copyright
      7  * notice and this permission notice appear in supporting documentation, and
      8  * that the name of Marc Aurele La France not be used in advertising or
      9  * publicity pertaining to distribution of the software without specific,
     10  * written prior permission.  Marc Aurele La France makes no representations
     11  * about the suitability of this software for any purpose.  It is provided
     12  * "as-is" without express or implied warranty.
     13  *
     14  * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
     15  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO
     16  * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
     17  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
     18  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
     19  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     20  * PERFORMANCE OF THIS SOFTWARE.
     21  */
     22 
     23 #ifndef ___ATICHIP_H___
     24 #define ___ATICHIP_H___ 1
     25 
     26 #include "atipriv.h"
     27 #include "atiregs.h"
     28 
     29 #include <X11/Xmd.h>
     30 
     31 /*
     32  * Chip-related definitions.
     33  */
     34 typedef enum
     35 {
     36     ATI_CHIP_NONE = 0,
     37     ATI_CHIP_88800GXC,          /* Mach64 */
     38     ATI_CHIP_88800GXD,          /* Mach64 */
     39     ATI_CHIP_88800GXE,          /* Mach64 */
     40     ATI_CHIP_88800GXF,          /* Mach64 */
     41     ATI_CHIP_88800GX,           /* Mach64 */
     42     ATI_CHIP_88800CX,           /* Mach64 */
     43     ATI_CHIP_264CT,             /* Mach64 */
     44     ATI_CHIP_264ET,             /* Mach64 */
     45     ATI_CHIP_264VT,             /* Mach64 */
     46     ATI_CHIP_264GT,             /* Mach64 */
     47     ATI_CHIP_264VTB,            /* Mach64 */
     48     ATI_CHIP_264GTB,            /* Mach64 */
     49     ATI_CHIP_264VT3,            /* Mach64 */
     50     ATI_CHIP_264GTDVD,          /* Mach64 */
     51     ATI_CHIP_264LT,             /* Mach64 */
     52     ATI_CHIP_264VT4,            /* Mach64 */
     53     ATI_CHIP_264GT2C,           /* Mach64 */
     54     ATI_CHIP_264GTPRO,          /* Mach64 */
     55     ATI_CHIP_264LTPRO,          /* Mach64 */
     56     ATI_CHIP_264XL,             /* Mach64 */
     57     ATI_CHIP_MOBILITY,          /* Mach64 */
     58     ATI_CHIP_Mach64,            /* Last among Mach64's */
     59 } ATIChipType;
     60 
     61 /*
     62  * Foundry codes for 264xT's.
     63  */
     64 typedef enum
     65 {
     66     ATI_FOUNDRY_SGS,    /* SGS-Thompson */
     67     ATI_FOUNDRY_NEC,    /* NEC */
     68     ATI_FOUNDRY_KSC,    /* KSC (?) */
     69     ATI_FOUNDRY_UMC,    /* United Microelectronics Corporation */
     70     ATI_FOUNDRY_TSMC,   /* Taiwan Semiconductor Manufacturing Company */
     71     ATI_FOUNDRY_5,
     72     ATI_FOUNDRY_6,
     73     ATI_FOUNDRY_UMCA    /* UMC alternate */
     74 } ATIFoundryType;
     75 
     76 extern const char *ATIFoundryNames[];
     77 
     78 extern void        ATIMach64ChipID(ATIPtr, const CARD16);
     79 
     80 #define OldChipID(_1, _0) \
     81     (SetBits(_0 - 'A', CHIP_CODE_0) | SetBits(_1 - 'A', CHIP_CODE_1))
     82 
     83 #define NewChipID(_1, _0) \
     84     (SetBits(_0, CFG_CHIP_TYPE0) | SetBits(_1, CFG_CHIP_TYPE1))
     85 
     86 #define OldToNewChipID(_ChipID) \
     87     (SetBits(GetBits(_ChipID, CHIP_CODE_0) + 'A', CFG_CHIP_TYPE0) | \
     88      SetBits(GetBits(_ChipID, CHIP_CODE_1) + 'A', CFG_CHIP_TYPE1))
     89 
     90 #define NewToOldChipID(_ChipID) \
     91     (SetBits(GetBits(_ChipID, CFG_CHIP_TYPE0) - 'A', CHIP_CODE_0) | \
     92     (SetBits(GetBits(_ChipID, CFG_CHIP_TYPE1) - 'A', CHIP_CODE_1))
     93 
     94 #endif /* ___ATICHIP_H___ */
     95