diff options
Diffstat (limited to 'src/sis_dac.h')
-rw-r--r-- | src/sis_dac.h | 81 |
1 files changed, 34 insertions, 47 deletions
diff --git a/src/sis_dac.h b/src/sis_dac.h index 8f4c202..e408ec6 100644 --- a/src/sis_dac.h +++ b/src/sis_dac.h @@ -1,46 +1,42 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dac.h,v 1.11 2003/06/10 16:44:19 twini Exp $ */ +/* $XFree86$ */ +/* $XdotOrg$ */ /* * DAC helper functions (Save/Restore, MemClk, etc) * Definitions and prototypes * - * Copyright 1998,1999 by Alan Hourihane, Wigan, England. - * Copyright 2001, 2002, 2003 by Thomas Winischhofer, Vienna, Austria. + * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria. * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of the provider not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. The provider makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1) Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2) Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3) The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. * - * THE PROVIDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL THE PROVIDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Authors: Alan Hourihane <alanh@fairlite.demon.co.uk> - * Mike Chapman <mike@paranoia.com>, - * Juanjo Santamarta <santamarta@ctv.es>, - * Mitani Hiroshi <hmitani@drl.mei.co.jp> - * David Thomas <davtom@dream.org.uk>. - * Thomas Winischhofer <thomas@winischhofer.net> */ -int SiS_compute_vclk(int Clock, int *out_n, int *out_dn, int *out_div, - int *out_sbit, int *out_scale); +int SiS_compute_vclk(int Clock, int *out_n, int *out_dn, int *out_div, + int *out_sbit, int *out_scale); void SISDACPreInit(ScrnInfoPtr pScrn); -unsigned int SiSddc1Read(ScrnInfoPtr pScrn); void SISLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies, - LOCO *colors, VisualPtr pVisual); + LOCO *colors, VisualPtr pVisual); void SiSCalcClock(ScrnInfoPtr pScrn, int clock, int max_VLD, unsigned int *vclk); - void SiSIODump(ScrnInfoPtr pScrn); int SiSMemBandWidth(ScrnInfoPtr pScrn, BOOLEAN IsForCRT2); int SiSMclk(SISPtr pSiS); @@ -53,11 +49,11 @@ extern unsigned char SiS6326GetXXReg(ScrnInfoPtr pScrn, CARD8 index); extern int SiSCalcVRate(DisplayModePtr mode); -/* TW: Functions from init.c & init301.c */ -extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO,USHORT BaseAddr); -extern void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO,USHORT BaseAddr); -extern void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO,USHORT BaseAddr); -extern void SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO,USHORT BaseAddr); +/* Functions from init.c and init301.c */ +extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO); +extern void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO); +extern void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO); +extern void SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO); extern USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempbx); extern void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempbx); extern USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempbx); @@ -65,7 +61,10 @@ extern void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempbx); extern USHORT SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx); extern void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx); extern void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh); +extern void SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx); +extern USHORT SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx); extern void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime); +extern USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr); extern USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, unsigned long VBFlags, int VGAEngine, USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer); extern void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo); @@ -73,15 +72,3 @@ extern void SiS_DisplayOn(SiS_Private *SiS_Pr); extern unsigned char SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id); extern void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable); extern void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable); -#if 0 -extern void SiS_SetSwitchDDC2(SiS_Private *SiS_Pr); -extern USHORT SiS_I2C_GetByte(SiS_Private *SiS_Pr); -extern Bool SiS_I2C_PutByte(SiS_Private *SiS_Pr, USHORT data); -extern Bool SiS_I2C_Address(SiS_Private *SiS_Pr, USHORT addr); -extern void SiS_I2C_Stop(SiS_Private *SiS_Pr); -#endif - - - - - |