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 ___ATICLOCK_H___
     24 #define ___ATICLOCK_H___ 1
     25 
     26 #include "atipriv.h"
     27 
     28 #include "xf86str.h"
     29 
     30 /*
     31  * Definitions related to programmable clock generators.
     32  */
     33 typedef enum
     34 {
     35     ATI_CLOCK_UNKNOWN = -1,
     36     ATI_CLOCK_FIXED = 0,        /* Further described by ATIClockType */
     37     ATI_CLOCK_ICS2595,
     38     ATI_CLOCK_STG1703,
     39     ATI_CLOCK_CH8398,
     40     ATI_CLOCK_INTERNAL,
     41     ATI_CLOCK_ATT20C408,
     42     ATI_CLOCK_IBMRGB514,
     43     ATI_CLOCK_MAX               /* Must be last */
     44 } ATIProgrammableClockType;
     45 
     46 typedef struct
     47 {
     48     CARD16 MinN, MaxN;          /* Feedback divider and ... */
     49     CARD16 NAdjust;             /* ... its adjustment and ... */
     50     CARD16 N1, N2;              /* ... its restrictions */
     51     CARD16 MinM, MaxM;          /* Reference divider and ... */
     52     CARD16 MAdjust;             /* ... its adjustment */
     53     CARD16 NumD, *PostDividers; /* Post-dividers */
     54     const char *ClockName;
     55 } ClockRec, *ClockPtr;
     56 extern ClockRec ATIClockDescriptors[];
     57 
     58 extern void ATIClockPreInit(ScrnInfoPtr, ATIPtr);
     59 extern Bool ATIClockCalculate(int, ATIPtr, ATIHWPtr, DisplayModePtr);
     60 extern void ATIClockSet(ATIPtr, ATIHWPtr);
     61 
     62 #endif /* ___ATICLOCK_H___ */
     63