diff options
author | Luc Verhaegen <libv@skynet.be> | 2006-03-19 14:00:04 +0000 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2006-03-19 14:00:04 +0000 |
commit | dfd1377453b0a84d8ce8df677847adfd502d895e (patch) | |
tree | 4a0bde7f93b77ec8011ca3d65f8911c64df624e6 | |
parent | a792e57b2cb61954676a5f092e170c225f3295cf (diff) |
Remove pATI->Chipset and move ATIIdentify to ati.c. Have ATIIdentify only
mention mach64.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/ati.c | 42 | ||||
-rw-r--r-- | src/atidga.c | 5 | ||||
-rw-r--r-- | src/atiident.c | 129 | ||||
-rw-r--r-- | src/atiident.h | 53 | ||||
-rw-r--r-- | src/atipreinit.c | 67 | ||||
-rw-r--r-- | src/atistruct.h | 5 |
8 files changed, 52 insertions, 265 deletions
@@ -1,3 +1,16 @@ +2006-03-19 Luc Verhaegen <libv@skynet.be> + + * src/Makefile.am: + * src/ati.c: (Mach64Probe), (Mach64Identify): + * src/atidga.c: (ATIDGAInit): + * src/atiident.c: + * src/atiident.h: + * src/atipreinit.c: (ATIGetRec), (ATIPreInit): + * src/atistruct.h: + + Remove pATI->Chipset and move ATIIdentify to ati.c. Have + ATIIdentify to only mention mach6. + 2006-03-17 Luc Verhaegen <libv@skynet.be> * src/Makefile.am: diff --git a/src/Makefile.am b/src/Makefile.am index 7249ee0..0dbe3f6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,7 +44,7 @@ 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 atiident.c atioption.c \ + 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 \ @@ -74,7 +74,6 @@ EXTRA_DIST = \ atidsp.h \ ati.h \ atii2c.h \ - atiident.h \ atiio.h \ atiload.h \ atilock.h \ @@ -60,7 +60,6 @@ #include "xf86Resources.h" -#include "atiident.h" #include "atioption.h" #include "ativersion.h" #include "atichip.h" @@ -72,19 +71,7 @@ #include "atiscreen.h" #include "ativalid.h" -static Bool ATIProbe(DriverPtr pDriver, int flags); - -/* The root of all evil... */ -static DriverRec ATI = -{ - ATI_VERSION_CURRENT, - "ati", - ATIIdentify, - ATIProbe, - ATIAvailableOptions, - NULL, - 0 -}; +static DriverRec ATI; #ifdef XFree86LOADER @@ -377,7 +364,7 @@ Mach64PciChipsets[] = { * do a minimal probe for supported hardware. */ static Bool -ATIProbe(DriverPtr pDriver, int flags) +Mach64Probe(DriverPtr pDriver, int flags) { GDevPtr *devSections; int *usedChips; @@ -418,7 +405,7 @@ ATIProbe(DriverPtr pDriver, int flags) pScrn->driverVersion = ATI_VERSION_CURRENT; pScrn->driverName = ATI_DRIVER_NAME; pScrn->name = ATI_NAME; - pScrn->Probe = ATIProbe; + pScrn->Probe = Mach64Probe; pScrn->PreInit = ATIPreInit; pScrn->ScreenInit = ATIScreenInit; pScrn->SwitchMode = ATISwitchMode; @@ -434,3 +421,26 @@ ATIProbe(DriverPtr pDriver, int flags) return ProbeSuccess; } + +/* + * Print the driver's list of chipset names. + */ +void +Mach64Identify(int flags) +{ + xf86Msg(X_INFO, ATI_NAME ": driver for the ATI Mach64 family of graphics chips.\n"); +} + +/* + * The root of all evil... + */ +static DriverRec ATI = +{ + ATI_VERSION_CURRENT, + "ati", + Mach64Identify, + Mach64Probe, + ATIAvailableOptions, + NULL, + 0 +}; diff --git a/src/atidga.c b/src/atidga.c index 0f8fb8a..e4c20b3 100644 --- a/src/atidga.c +++ b/src/atidga.c @@ -31,7 +31,6 @@ #include "atichip.h" #include "atidac.h" #include "atidga.h" -#include "atiident.h" #include "atimode.h" #include "atistruct.h" @@ -443,9 +442,7 @@ ATIDGAInit ATIDGAAddModes(pScreenInfo, pATI, flags, 8, 8, 0, 0, 0, PseudoColor); - if ((pATI->Chip >= ATI_CHIP_264CT) && - (pATI->Chipset == ATI_CHIPSET_ATI)) - { + if (pATI->Chip >= ATI_CHIP_264CT) { ATIDGAAddModes(pScreenInfo, pATI, flags, 15, 16, 0x7C00U, 0x03E0U, 0x001FU, TrueColor); diff --git a/src/atiident.c b/src/atiident.c deleted file mode 100644 index 99e00c8..0000000 --- a/src/atiident.c +++ /dev/null @@ -1,129 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiident.c,v 1.11 2003/01/01 19:16:32 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 "ati.h" -#include "atiident.h" -#include "atiutil.h" -#include "ativersion.h" - -const char *ATIChipsetNames[] = -{ - "ati", - -#ifndef AVOID_CPIO - - "ativga", - "ibmvga", - "ibm8514", - "vgawonder", - "mach8", - "mach32", - -#endif /* AVOID_CPIO */ - - "mach64", -}; - -static SymTabRec ATIPublicChipsetNames[] = -{ - {ATI_CHIPSET_ATI, "ati"}, - -#ifndef AVOID_CPIO - - {ATI_CHIPSET_ATIVGA, "ativga"}, -#ifdef __MAYBE_NOT__ - {ATI_CHIPSET_IBMVGA, "ibmvga"}, -#endif -#ifdef __NOT_YET__ - {ATI_CHIPSET_IBM8514, "ibm8514"}, -#endif - -#endif /* AVOID_CPIO */ - - {-1, NULL} -}; - -/* - * ATIIdentify -- - * - * Print the driver's list of chipset names. - */ -void -ATIIdentify -( - int flags -) -{ - xf86PrintChipsets(ATI_NAME, - (NumberOf(ATIPublicChipsetNames) <= 2) ? - "ATI driver (version " ATI_VERSION_NAME ") for chipset" : - "ATI driver (version " ATI_VERSION_NAME ") for chipsets", - ATIPublicChipsetNames); -} - -/* - * ATIIdentProbe -- - * - * This function determines if the user specified a chipset name acceptable to - * the driver. It returns an ATIChipsetType or -1. - */ -int -ATIIdentProbe -( - const char *ChipsetName -) -{ - int Chipset; - - static SymTabRec SpecificNames[] = - { - -#ifndef AVOID_CPIO - - {ATI_CHIPSET_VGAWONDER, "vgawonder"}, -#ifdef __NOT_YET__ - {ATI_CHIPSET_MACH8, "mach8"}, -#endif - {ATI_CHIPSET_MACH32, "mach32"}, - -#endif /* AVOID_CPIO */ - - {ATI_CHIPSET_MACH64, "mach64"}, - {-1, NULL} - }; - - /* If no Chipset specification, default to "ati" */ - if (!ChipsetName || !*ChipsetName) - return ATI_CHIPSET_ATI; - - Chipset = xf86StringToToken(ATIPublicChipsetNames, ChipsetName); - if (Chipset != -1) - return Chipset; - - /* Check for some other chipset names */ - return xf86StringToToken(SpecificNames, ChipsetName); -} diff --git a/src/atiident.h b/src/atiident.h deleted file mode 100644 index 0345185..0000000 --- a/src/atiident.h +++ /dev/null @@ -1,53 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiident.h,v 1.10 2003/01/01 19:16:32 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. - */ - -#ifndef ___ATIIDENT_H___ -#define ___ATIIDENT_H___ 1 - -typedef enum -{ - ATI_CHIPSET_ATI, - -#ifndef AVOID_CPIO - - ATI_CHIPSET_ATIVGA, - ATI_CHIPSET_IBMVGA, - ATI_CHIPSET_IBM8514, - ATI_CHIPSET_VGAWONDER, - ATI_CHIPSET_MACH8, - ATI_CHIPSET_MACH32, - -#endif /* AVOID_CPIO */ - - ATI_CHIPSET_MACH64, - ATI_CHIPSET_RAGE128, - ATI_CHIPSET_RADEON, - ATI_CHIPSET_MAX /* Must be last */ -} ATIChipsetType; - -extern const char *ATIChipsetNames[]; - -extern void ATIIdentify(int); -extern int ATIIdentProbe(const char *); - -#endif /* ___ATIIDENT_H___ */ diff --git a/src/atipreinit.c b/src/atipreinit.c index 6ca49c0..18a46bc 100644 --- a/src/atipreinit.c +++ b/src/atipreinit.c @@ -37,7 +37,6 @@ #include "atidac.h" #include "atidsp.h" #include "atii2c.h" -#include "atiident.h" #include "atiload.h" #include "atilock.h" #include "atimach64.h" @@ -303,8 +302,11 @@ ATIMach32videoRam static Bool ATIGetRec(ScrnInfoPtr pScrn) { - if (!pScrn->driverPrivate) + if (!pScrn->driverPrivate) { pScrn->driverPrivate = xnfcalloc(sizeof(ATIRec), 1); + memset(pScrn->driverPrivate, 0, sizeof(ATIRec)); + } + return TRUE; } @@ -719,11 +721,11 @@ ATIPreInit pGDev = pEntity->device; pResources = pEntity->resources; pATI->PCIInfo = xf86GetPciInfoForEntity(pEntity->index); + pATI->iEntity = pEntity->index; xfree(pEntity); pATI->Chip = Mach64ChipsetRevisions(pEntity->chipset, pATI->PCIInfo->chipRev); - pATI->Chipset = ATI_CHIPSET_MACH64; pATI->SharedAccelerator = TRUE; @@ -766,59 +768,15 @@ ATIPreInit ConfiguredMonitor = NULL; (void)memset(BIOS, 0, SizeOf(BIOS)); - if (!(flags & PROBE_DETECT)) - { - xf86DrvMsg(pScreenInfo->scrnIndex, - pATI->Chipset ? X_CONFIG : X_DEFAULT, - "Chipset: \"%s\".\n", ATIChipsetNames[pATI->Chipset]); - - /* Promote chipset specification */ - switch (pATI->Chipset) - { - -#ifndef AVOID_CPIO - - case ATI_CHIPSET_IBMVGA: - if (pATI->Adapter == ATI_ADAPTER_VGA) - break; /* XXX */ - /* Fall through */ - - case ATI_CHIPSET_VGAWONDER: - pATI->Chipset = ATI_CHIPSET_ATIVGA; - break; - - case ATI_CHIPSET_IBM8514: - if (pATI->Adapter == ATI_ADAPTER_8514A) - break; /* XXX */ - /* Fall through */ - - case ATI_CHIPSET_MACH8: - case ATI_CHIPSET_MACH32: - -#endif /* AVOID_CPIO */ - - case ATI_CHIPSET_MACH64: - case ATI_CHIPSET_RAGE128: - case ATI_CHIPSET_RADEON: - pATI->Chipset = ATI_CHIPSET_ATI; - break; - - default: - break; - } - + if (!(flags & PROBE_DETECT)) { /* Set monitor */ pScreenInfo->monitor = pScreenInfo->confScreen->monitor; /* Set depth, bpp, etc. */ - if ((pATI->Chipset != ATI_CHIPSET_ATI) || - (pATI->Chip < ATI_CHIP_264CT)) - { + if (pATI->Chip < ATI_CHIP_264CT) { i = NoDepth24Support; /* No support for >8bpp either */ DefaultDepth = 8; - } - else - { + } else { i = Support24bppFb | Support32bppFb; DefaultDepth = 0; } @@ -1450,8 +1408,7 @@ ATIPreInit */ if ((pATI->ProgrammableClock == ATI_CLOCK_ICS2595) && (pATI->DAC == ATI_DAC_IBMRGB514) && - (pScreenInfo->depth >= 8) && - (pATI->Chipset == ATI_CHIPSET_ATI)) + (pScreenInfo->depth >= 8)) pATI->ProgrammableClock = ATI_CLOCK_IBMRGB514; pATI->ClockDescriptor = @@ -1927,9 +1884,7 @@ ATIPreInit #ifndef AVOID_CPIO - if ((pATI->Chip >= ATI_CHIP_88800GXC) && - (pATI->depth >= 8) && - (pATI->Chipset == ATI_CHIPSET_ATI)) + if ((pATI->Chip >= ATI_CHIP_88800GXC) && (pATI->depth >= 8)) #endif /* AVOID_CPIO */ @@ -3786,7 +3741,7 @@ ATIPreInit ATII2CPreInit(pScreenInfo, pATI); if (!pScreenInfo->chipset || !*pScreenInfo->chipset) - pScreenInfo->chipset = (char *)ATIChipsetNames[0]; + pScreenInfo->chipset = "mach64"; ATILock(pATI); ATIPrintNoiseIfRequested(pATI, BIOS, BIOSSize); diff --git a/src/atistruct.h b/src/atistruct.h index 5943b49..339d6b5 100644 --- a/src/atistruct.h +++ b/src/atistruct.h @@ -177,11 +177,6 @@ typedef struct _ATIHWRec typedef struct _ATIRec { /* - * Definitions related to XF86Config "Chipset" specifications. - */ - CARD8 Chipset; - - /* * Adapter-related definitions. */ CARD8 Adapter; |