1dfe64dd3Smacallan/*
2dfe64dd3Smacallan * DAC helper functions (Save/Restore, MemClk, etc)
3dfe64dd3Smacallan * Definitions and prototypes
4dfe64dd3Smacallan *
5dfe64dd3Smacallan * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria.
6dfe64dd3Smacallan *
7dfe64dd3Smacallan * Redistribution and use in source and binary forms, with or without
8dfe64dd3Smacallan * modification, are permitted provided that the following conditions
9dfe64dd3Smacallan * are met:
10dfe64dd3Smacallan * 1) Redistributions of source code must retain the above copyright
11dfe64dd3Smacallan *    notice, this list of conditions and the following disclaimer.
12dfe64dd3Smacallan * 2) Redistributions in binary form must reproduce the above copyright
13dfe64dd3Smacallan *    notice, this list of conditions and the following disclaimer in the
14dfe64dd3Smacallan *    documentation and/or other materials provided with the distribution.
15dfe64dd3Smacallan * 3) The name of the author may not be used to endorse or promote products
16dfe64dd3Smacallan *    derived from this software without specific prior written permission.
17dfe64dd3Smacallan *
18dfe64dd3Smacallan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
19dfe64dd3Smacallan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20dfe64dd3Smacallan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21dfe64dd3Smacallan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22dfe64dd3Smacallan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23dfe64dd3Smacallan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24dfe64dd3Smacallan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25dfe64dd3Smacallan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26dfe64dd3Smacallan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27dfe64dd3Smacallan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28dfe64dd3Smacallan *
29dfe64dd3Smacallan */
30dfe64dd3Smacallan
31dfe64dd3Smacallanint compute_vclk(int Clock, int *out_n, int *out_dn, int *out_div,
32dfe64dd3Smacallan    int *out_sbit, int *out_scale);
33dfe64dd3Smacallan
34dfe64dd3Smacallanvoid XGIDACPreInit(ScrnInfoPtr pScrn);
35dfe64dd3Smacallan
36dfe64dd3Smacallanvoid XGILoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
37dfe64dd3Smacallan    LOCO *colors, VisualPtr pVisual);
38dfe64dd3Smacallan
39dfe64dd3Smacallanvoid XGICalcClock(ScrnInfoPtr pScrn, int clock, int max_VLD, unsigned *vclk);
40