diff options
author | Luc Verhaegen <libv@skynet.be> | 2006-03-19 18:00:29 +0000 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2006-03-19 18:00:29 +0000 |
commit | 016f058c674efccd8e9a79ee7f3eeead4d10ab75 (patch) | |
tree | d1c2123e2b5c9edbe21f9fbc594de4f62bdbc130 | |
parent | c7745b77b5f6150415b38a5ae6c120a650afeb6c (diff) |
Move pATI->VGAAdapter to pATI->IsVGA. Kill atiadapter.c/h.
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/atiaccel.c | 1 | ||||
-rw-r--r-- | src/atiadapter.c | 58 | ||||
-rw-r--r-- | src/atiadapter.h | 60 | ||||
-rw-r--r-- | src/atibus.c | 4 | ||||
-rw-r--r-- | src/aticlock.c | 7 | ||||
-rw-r--r-- | src/aticonfig.c | 1 | ||||
-rw-r--r-- | src/aticonsole.c | 1 | ||||
-rw-r--r-- | src/aticursor.c | 1 | ||||
-rw-r--r-- | src/atii2c.c | 1 | ||||
-rw-r--r-- | src/atilock.c | 7 | ||||
-rw-r--r-- | src/atimode.c | 11 | ||||
-rw-r--r-- | src/atipreinit.c | 41 | ||||
-rw-r--r-- | src/atiprint.c | 10 | ||||
-rw-r--r-- | src/atistruct.h | 2 | ||||
-rw-r--r-- | src/ativalid.c | 1 | ||||
-rw-r--r-- | src/ativga.c | 1 | ||||
-rw-r--r-- | src/atividmem.c | 6 | ||||
-rw-r--r-- | src/atixv.c | 1 |
20 files changed, 58 insertions, 190 deletions
@@ -1,5 +1,31 @@ 2006-03-19 Luc Verhaegen <libv@skynet.be> + * configure.ac: + * src/Makefile.am: + * src/atiaccel.c: + * src/atiadapter.c: + * src/atiadapter.h: + * src/atibus.c: (ATIClaimResources): + * src/aticlock.c: (ATIClockPreInit): + * src/aticonfig.c: + * src/aticonsole.c: + * src/aticursor.c: + * src/atii2c.c: + * src/atilock.c: (ATIUnlock), (ATILock): + * src/atimode.c: (ATIModePreInit), (ATIModeSave), (ATIModeSet): + * src/atipreinit.c: (ATIMach64Probe), (ATIPreInit): + * src/atiprint.c: (ATIPrintRegisters): + * src/atistruct.h: + * src/ativalid.c: + * src/ativga.c: + * src/atividmem.c: (ATIMapApertures): + * src/atixv.c: + + Move pATI->VGAAdapter to pATI->IsVGA. + Kill atiadapter.c/h. + +2006-03-19 Luc Verhaegen <libv@skynet.be> + * src/atiaccel.c: (ATIInitializeAcceleration): * src/atibus.c: (ATIClaimResources): * src/aticlock.c: (ATIMatchClockLine), (ATIClockPreInit), diff --git a/src/Makefile.am b/src/Makefile.am index 0dbe3f6..887c50b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,10 +44,9 @@ mach64_drv_la_LTLIBRARIES = mach64_drv.la mach64_drv_la_LDFLAGS = -module -avoid-version mach64_drv_ladir = @moduledir@/drivers mach64_drv_la_SOURCES = \ - atiadapter.c atibus.c atichip.c atioption.c \ - atividmem.c atiaccel.c atiadjust.c atiaudio.c aticlock.c \ - aticonfig.c aticonsole.c aticursor.c atidac.c atidecoder.c \ - atidsp.c atii2c.c atilock.c atimach64.c atimach64accel.c \ + atibus.c atichip.c atioption.c atividmem.c atiaccel.c atiadjust.c \ + atiaudio.c aticlock.c aticonfig.c aticonsole.c aticursor.c atidac.c \ + atidecoder.c atidsp.c atii2c.c atilock.c atimach64.c atimach64accel.c \ atimach64cursor.c atimach64i2c.c atimach64io.c atimach64xv.c \ atimode.c atipreinit.c atiprint.c atirgb514.c atiscreen.c \ atituner.c atiutil.c ativalid.c atixv.c atiload.c ati.c \ @@ -55,7 +54,6 @@ mach64_drv_la_SOURCES = \ EXTRA_DIST = \ atiaccel.h \ - atiadapter.h \ atiadjust.h \ atiaudio.h \ atibank.h \ diff --git a/src/atiaccel.c b/src/atiaccel.c index d94b816..89c2b59 100644 --- a/src/atiaccel.c +++ b/src/atiaccel.c @@ -29,7 +29,6 @@ #endif #include "atiaccel.h" -#include "atiadapter.h" #include "atimach64accel.h" #include "atistruct.h" diff --git a/src/atiadapter.c b/src/atiadapter.c deleted file mode 100644 index 7dab08a..0000000 --- a/src/atiadapter.c +++ /dev/null @@ -1,58 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiadapter.c,v 1.17 2003/01/01 19:16:30 tsi Exp $ */ -/* - * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org - * - * 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 Marc Aurele La France not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Marc Aurele La France makes no representations - * about the suitability of this software for any purpose. It is provided - * "as-is" without express or implied warranty. - * - * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO - * EVENT SHALL MARC AURELE LA FRANCE 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. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "atiadapter.h" - -/* - * Adapter-related definitions. - */ -const char *ATIAdapterNames[] = -{ - "Unknown", - -#ifndef AVOID_CPIO - - "ATI EGA Wonder800", - "ATI EGA Wonder800+", - "IBM VGA or compatible", - "ATI VGA Basic16", - "ATI VGA Wonder V3", - "ATI VGA Wonder V4", - "ATI VGA Wonder V5", - "ATI VGA Wonder+", - "ATI VGA Wonder XL or XL24", - "ATI VGA Wonder VLB or PCI", - "IBM 8514/A or compatible", - "ATI Mach8", - "ATI Mach32", - -#endif /* AVOID_CPIO */ - - "ATI Mach64", - "ATI Rage128", - "ATI Radeon" -}; diff --git a/src/atiadapter.h b/src/atiadapter.h deleted file mode 100644 index 8db366e..0000000 --- a/src/atiadapter.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiadapter.h,v 1.10 2003/01/01 19:16:30 tsi Exp $ */ -/* - * Copyright 1997 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org - * - * 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 Marc Aurele La France not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Marc Aurele La France makes no representations - * about the suitability of this software for any purpose. It is provided - * "as-is" without express or implied warranty. - * - * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO - * EVENT SHALL MARC AURELE LA FRANCE 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. - */ - -#ifndef ___ATIADAPTER_H___ -#define ___ATIADAPTER_H___ 1 - -/* - * Adapter-related definitions. - */ -typedef enum -{ - ATI_ADAPTER_NONE = 0, - -#ifndef AVOID_CPIO - - ATI_ADAPTER_EGA, - ATI_ADAPTER_EGA_PLUS, - ATI_ADAPTER_VGA, - ATI_ADAPTER_BASIC, - ATI_ADAPTER_V3, - ATI_ADAPTER_V4, - ATI_ADAPTER_V5, - ATI_ADAPTER_PLUS, - ATI_ADAPTER_XL, - ATI_ADAPTER_NONISA, - ATI_ADAPTER_8514A, - ATI_ADAPTER_MACH8, - ATI_ADAPTER_MACH32, - -#endif /* AVOID_CPIO */ - - ATI_ADAPTER_MACH64, - ATI_ADAPTER_RAGE128, - ATI_ADAPTER_RADEON, - ATI_ADAPTER_MAX /* Must be last */ -} ATIAdapterType; - -extern const char *ATIAdapterNames[]; - -#endif /* ___ATIADAPTER_H___ */ diff --git a/src/atibus.c b/src/atibus.c index 33e48b3..2ad130e 100644 --- a/src/atibus.c +++ b/src/atibus.c @@ -26,7 +26,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atibus.h" #include "atichip.h" #include "atiio.h" @@ -73,8 +72,7 @@ ATIClaimResources resRange Resources[2] = {{0, 0, 0}, _END}; /* Claim VGA and VGAWonder resources */ - if ((pATI->VGAAdapter != ATI_ADAPTER_NONE) && (Active || !pATI->SharedVGA)) - { + if ((pATI->IsVGA) && (Active || !pATI->SharedVGA)) { /* * 18800-x's are the only ATI controllers that decode all ISA aliases * of VGA and VGA Wonder I/O ports. Other x8800's do not decode >any< diff --git a/src/aticlock.c b/src/aticlock.c index c9c8948..a9422e1 100644 --- a/src/aticlock.c +++ b/src/aticlock.c @@ -197,7 +197,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atichip.h" #include "atidac.h" #include "atidsp.h" @@ -734,8 +733,7 @@ ProbeClocks: #ifndef AVOID_CPIO - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { /* * The current video state needs to be saved before the clock * probe, and restored after. Video memory corruption and other @@ -941,8 +939,7 @@ ProbeClocks: #ifndef AVOID_CPIO - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { /* Restore video state */ ATIModeSet(pScreenInfo, pATI, &pATI->OldHW); xfree(pATI->OldHW.frame_buffer); diff --git a/src/aticonfig.c b/src/aticonfig.c index 5ae03c7..a4927d1 100644 --- a/src/aticonfig.c +++ b/src/aticonfig.c @@ -29,7 +29,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atichip.h" #include "aticonfig.h" #include "aticursor.h" diff --git a/src/aticonsole.c b/src/aticonsole.c index cb64a91..18a36c6 100644 --- a/src/aticonsole.c +++ b/src/aticonsole.c @@ -30,7 +30,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "aticonsole.h" #include "aticrtc.h" #include "atii2c.h" diff --git a/src/aticursor.c b/src/aticursor.c index cde2c69..237972d 100644 --- a/src/aticursor.c +++ b/src/aticursor.c @@ -25,7 +25,6 @@ #include "config.h" #endif -#include "atiadapter.h" #include "aticursor.h" #include "atimach64cursor.h" #include "atistruct.h" diff --git a/src/atii2c.c b/src/atii2c.c index 3277b20..e231035 100644 --- a/src/atii2c.c +++ b/src/atii2c.c @@ -25,7 +25,6 @@ #include "config.h" #endif -#include "atiadapter.h" #include "atii2c.h" #include "atiload.h" #include "atimach64i2c.h" diff --git a/src/atilock.c b/src/atilock.c index dcf1f84..2d1a77d 100644 --- a/src/atilock.c +++ b/src/atilock.c @@ -26,7 +26,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atichip.h" #include "atilock.h" #include "atimach64io.h" @@ -225,8 +224,7 @@ ATIUnlock } - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { if (pATI->CPIO_VGAWonder) { /* @@ -448,8 +446,7 @@ ATILock #ifndef AVOID_CPIO - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { if (pATI->LCDPanelID >= 0) { if (pATI->Chip == ATI_CHIP_264LT) diff --git a/src/atimode.c b/src/atimode.c index 896a5c6..88e373b 100644 --- a/src/atimode.c +++ b/src/atimode.c @@ -25,7 +25,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atichip.h" #include "atidac.h" #include "atidsp.h" @@ -261,8 +260,7 @@ ATIModePreInit #ifndef AVOID_CPIO - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { /* Fill in VGA data */ ATIVGAPreInit(pATI, pATIHW); @@ -435,8 +433,7 @@ ATIModeSave #ifndef AVOID_CPIO - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { /* Save VGA data */ ATIVGASave(pATI, pATIHW); @@ -527,7 +524,7 @@ ATIModeSave #ifndef AVOID_CPIO - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) + if (pATI->IsVGA) ATIVGASaveScreen(pATI, SCREEN_SAVER_OFF); /* Turn on screen */ #endif /* AVOID_CPIO */ @@ -1282,7 +1279,7 @@ ATIModeSet /* Restore video memory */ ATISwap(pScreenInfo->scrnIndex, pATI, pATIHW, TRUE); - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) + if (pATI->IsVGA) ATIVGASaveScreen(pATI, SCREEN_SAVER_OFF); /* Turn on screen */ #endif /* AVOID_CPIO */ diff --git a/src/atipreinit.c b/src/atipreinit.c index fd4d47e..eadce2f 100644 --- a/src/atipreinit.c +++ b/src/atipreinit.c @@ -27,7 +27,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atiadjust.h" #include "atiaudio.h" #include "atibus.h" @@ -261,16 +260,16 @@ ATIMach64Probe(ATIPtr pATI) IOValue |= CFG_VGA_EN; if (IOValue == (CFG_VGA_EN | CFG_CHIP_EN)) { - pATI->VGAAdapter = ATI_ADAPTER_MACH64; + pATI->IsVGA = TRUE; pATI->CPIO_VGAWonder = 0x01CEU; pATI->VGAOffset = 0x80U; } else - pATI->VGAAdapter = ATI_ADAPTER_NONE; + pATI->IsVGA = FALSE; } else - pATI->VGAAdapter = ATI_ADAPTER_MACH64; + pATI->IsVGA = TRUE; /* Ensure that the VGA isn't in sleep mode. */ - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) { + if (pATI->IsVGA) { outb(GENENA, 0x16U); outb(GENVS, 0x01U); outb(GENENA, 0x0EU); @@ -1561,8 +1560,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags) #ifndef AVOID_CPIO - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { /* * No need for VGA I/O resources during operating state (but they * are still decoded). @@ -1608,8 +1606,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags) if ((pATI->NewHW.crtc == ATI_CRTC_VGA) || !pATI->OptionLinear) { /* VGA is required at this point */ - if (pATI->VGAAdapter == ATI_ADAPTER_NONE) - { + if (!pATI->IsVGA) { xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR, "VGA is not available through this adapter.\n"); ATILock(pATI); @@ -2497,8 +2494,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags) #ifndef AVOID_CPIO /* Set up for a banked aperture */ - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { pATI->UseSmallApertures = TRUE; /* Set banking functions */ @@ -2542,7 +2538,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags) #ifndef AVOID_CPIO - if (pATI->VGAAdapter == ATI_ADAPTER_NONE) + if (!pATI->IsVGA) #endif /* AVOID_CPIO */ @@ -2622,9 +2618,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags) xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "Linear aperture not supported in this configuration.\n"); pATI->OptionLinear = FALSE; - } - else if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + } else if (pATI->IsVGA) { /* * Free VGA memory aperture during operating state (but it is still * decoded). @@ -2701,7 +2695,7 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags) #ifndef AVOID_CPIO - if (pATI->VGAAdapter == ATI_ADAPTER_NONE) + if (!pATI->IsVGA) #endif /* AVOID_CPIO */ @@ -2755,19 +2749,10 @@ ATIPreInit(ScrnInfoPtr pScreenInfo, int flags) pATI->NewHW.nBank = ATIDivide(pATI->VideoRAM, pATI->NewHW.nPlane * pATI->BankInfo.BankSize, 10, 1); - if (pATI->VGAAdapter == ATI_ADAPTER_VGA) - { - pATIHW->SetBank = pATI->NewHW.SetBank = - (ATIBankProcPtr)NoopDDA; - pATIHW->nBank = pATI->NewHW.nBank = 1; - } - else if (!pATI->UseSmallApertures) - { + if (!pATI->UseSmallApertures) { pATIHW->SetBank = pATI->NewHW.SetBank; - } - else if ((pATIHW->crtc == ATI_CRTC_VGA) && - !(pATI->LockData.config_cntl & CFG_MEM_VGA_AP_EN)) - { + } else if ((pATIHW->crtc == ATI_CRTC_VGA) && + !(pATI->LockData.config_cntl & CFG_MEM_VGA_AP_EN)) { pATIHW->SetBank = (ATIBankProcPtr)NoopDDA; pATIHW->nBank = 1; } diff --git a/src/atiprint.c b/src/atiprint.c index 8b81992..9b113ff 100644 --- a/src/atiprint.c +++ b/src/atiprint.c @@ -26,7 +26,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atichip.h" #include "atidac.h" #include "atimach64io.h" @@ -363,12 +362,11 @@ ATIPrintRegisters #ifndef AVOID_CPIO - CARD8 genmo, seq1 = 0; + CARD8 genmo; crtc = ATI_CRTC_VGA; - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { xf86ErrorFVerb(4, "\n Miscellaneous output register value: 0x%02X.\n", genmo = inb(R_GENMO)); @@ -539,7 +537,7 @@ ATIPrintRegisters { if (!(Index & 3)) xf86ErrorFVerb(4, "\n 0x%02X: ", Index); - xf86ErrorFVerb(4, " %08X", ATIMach64GetLCDReg(Index)); + xf86ErrorFVerb(4, " %08lX", ATIMach64GetLCDReg(Index)); } outr(LCD_INDEX, lcd_index); @@ -551,7 +549,7 @@ ATIPrintRegisters { if (!(Index & 3)) xf86ErrorFVerb(4, "\n 0x%02X: ", Index); - xf86ErrorFVerb(4, " %08X", ATIMach64GetTVReg(Index)); + xf86ErrorFVerb(4, " %08lX", ATIMach64GetTVReg(Index)); } outr(TV_OUT_INDEX, tv_out_index); diff --git a/src/atistruct.h b/src/atistruct.h index 1fddcd0..0f46ae1 100644 --- a/src/atistruct.h +++ b/src/atistruct.h @@ -178,7 +178,7 @@ typedef struct _ATIRec { #ifndef AVOID_CPIO - CARD8 VGAAdapter; + Bool IsVGA; #endif /* AVOID_CPIO */ diff --git a/src/ativalid.c b/src/ativalid.c index 15da531..5ff47ed 100644 --- a/src/ativalid.c +++ b/src/ativalid.c @@ -25,7 +25,6 @@ #include "config.h" #endif -#include "atiadapter.h" #include "atichip.h" #include "aticrtc.h" #include "atistruct.h" diff --git a/src/ativga.c b/src/ativga.c index 649c7dd..36ec26f 100644 --- a/src/ativga.c +++ b/src/ativga.c @@ -27,7 +27,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atichip.h" #include "atimono.h" #include "atistruct.h" diff --git a/src/atividmem.c b/src/atividmem.c index f43f32a..f2fb041 100644 --- a/src/atividmem.c +++ b/src/atividmem.c @@ -26,7 +26,6 @@ #endif #include "ati.h" -#include "atiadapter.h" #include "atistruct.h" #include "atividmem.h" @@ -189,7 +188,7 @@ ATIMapApertures #ifndef AVOID_CPIO - if (pATI->VGAAdapter == ATI_ADAPTER_NONE) + if (!pATI->IsVGA) #endif /* AVOID_CPIO */ @@ -208,8 +207,7 @@ ATIMapApertures #ifndef AVOID_CPIO /* Map VGA aperture */ - if (pATI->VGAAdapter != ATI_ADAPTER_NONE) - { + if (pATI->IsVGA) { /* * No relocation, resizing, caching or write-combining of this * aperture is supported. Hence, the hard-coded values here... diff --git a/src/atixv.c b/src/atixv.c index 55a86d4..c0c258c 100644 --- a/src/atixv.c +++ b/src/atixv.c @@ -25,7 +25,6 @@ #include "config.h" #endif -#include "atiadapter.h" #include "atimach64xv.h" #include "atistruct.h" #include "atixv.h" |