132b578d3Smrg/* 232b578d3Smrg * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org 332b578d3Smrg * 432b578d3Smrg * Permission to use, copy, modify, distribute, and sell this software and its 532b578d3Smrg * documentation for any purpose is hereby granted without fee, provided that 632b578d3Smrg * the above copyright notice appear in all copies and that both that copyright 732b578d3Smrg * notice and this permission notice appear in supporting documentation, and 832b578d3Smrg * that the name of Marc Aurele La France not be used in advertising or 932b578d3Smrg * publicity pertaining to distribution of the software without specific, 1032b578d3Smrg * written prior permission. Marc Aurele La France makes no representations 1132b578d3Smrg * about the suitability of this software for any purpose. It is provided 1232b578d3Smrg * "as-is" without express or implied warranty. 1332b578d3Smrg * 1432b578d3Smrg * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 1532b578d3Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 1632b578d3Smrg * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR 1732b578d3Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 1832b578d3Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 1932b578d3Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 2032b578d3Smrg * PERFORMANCE OF THIS SOFTWARE. 2132b578d3Smrg */ 2232b578d3Smrg 2332b578d3Smrg#ifndef ___ATICLOCK_H___ 2432b578d3Smrg#define ___ATICLOCK_H___ 1 2532b578d3Smrg 2632b578d3Smrg#include "atipriv.h" 2732b578d3Smrg 2832b578d3Smrg#include "xf86str.h" 2932b578d3Smrg 3032b578d3Smrg/* 3132b578d3Smrg * Definitions related to programmable clock generators. 3232b578d3Smrg */ 3332b578d3Smrgtypedef enum 3432b578d3Smrg{ 3532b578d3Smrg ATI_CLOCK_UNKNOWN = -1, 3632b578d3Smrg ATI_CLOCK_FIXED = 0, /* Further described by ATIClockType */ 3732b578d3Smrg ATI_CLOCK_ICS2595, 3832b578d3Smrg ATI_CLOCK_STG1703, 3932b578d3Smrg ATI_CLOCK_CH8398, 4032b578d3Smrg ATI_CLOCK_INTERNAL, 4132b578d3Smrg ATI_CLOCK_ATT20C408, 4232b578d3Smrg ATI_CLOCK_IBMRGB514, 4332b578d3Smrg ATI_CLOCK_MAX /* Must be last */ 4432b578d3Smrg} ATIProgrammableClockType; 4532b578d3Smrg 4632b578d3Smrgtypedef struct 4732b578d3Smrg{ 4832b578d3Smrg CARD16 MinN, MaxN; /* Feedback divider and ... */ 4932b578d3Smrg CARD16 NAdjust; /* ... its adjustment and ... */ 5032b578d3Smrg CARD16 N1, N2; /* ... its restrictions */ 5132b578d3Smrg CARD16 MinM, MaxM; /* Reference divider and ... */ 5232b578d3Smrg CARD16 MAdjust; /* ... its adjustment */ 5332b578d3Smrg CARD16 NumD, *PostDividers; /* Post-dividers */ 5432b578d3Smrg const char *ClockName; 5532b578d3Smrg} ClockRec, *ClockPtr; 5632b578d3Smrgextern ClockRec ATIClockDescriptors[]; 5732b578d3Smrg 5832b578d3Smrgextern void ATIClockPreInit(ScrnInfoPtr, ATIPtr); 5932b578d3Smrgextern Bool ATIClockCalculate(int, ATIPtr, ATIHWPtr, DisplayModePtr); 6032b578d3Smrgextern void ATIClockSet(ATIPtr, ATIHWPtr); 6132b578d3Smrg 6232b578d3Smrg#endif /* ___ATICLOCK_H___ */ 63