diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2008-01-12 16:17:47 +0200 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2008-01-16 16:15:48 +0200 |
commit | 92f54400d5450b29b3a76d5ecc927cf0d73e156e (patch) | |
tree | 90ca2b48868f9eb0f962f9f9a72baa80b4964b2b | |
parent | 311ec7b6c54a50a4b8a5a445f7283da2b0b2e0f5 (diff) |
mach64: add version (need not match with ati)
similar to r128/radeon
-rw-r--r-- | src/atibus.c | 1 | ||||
-rw-r--r-- | src/atichip.c | 4 | ||||
-rw-r--r-- | src/atidri.c | 8 | ||||
-rw-r--r-- | src/atimach64probe.c | 11 | ||||
-rw-r--r-- | src/atimach64version.h | 59 | ||||
-rw-r--r-- | src/atimisc.c | 38 | ||||
-rw-r--r-- | src/atiprobe.c | 24 |
7 files changed, 88 insertions, 57 deletions
diff --git a/src/atibus.c b/src/atibus.c index 32f02b61..69a30891 100644 --- a/src/atibus.c +++ b/src/atibus.c @@ -31,7 +31,6 @@ #include "atichip.h" #include "atimach64io.h" #include "atistruct.h" -#include "ativersion.h" /* * Definitions related to an adapter's system bus interface. diff --git a/src/atichip.c b/src/atichip.c index 5f8a2216..aac00e67 100644 --- a/src/atichip.c +++ b/src/atichip.c @@ -28,7 +28,7 @@ #include "atibus.h" #include "atichip.h" #include "atimach64io.h" -#include "ativersion.h" +#include "atimach64version.h" const char *ATIFoundryNames[] = { "SGS", "NEC", "KCS", "UMC", "TSMC", "5", "6", "UMC" }; @@ -114,7 +114,7 @@ ATIMach64ChipID pATI->Chip = ATI_CHIP_264GT; else xf86Msg(X_WARNING, - ATI_NAME ": Mach64 chip type probe discrepancy" + MACH64_NAME ": Mach64 chip type probe discrepancy" " detected: PCI=0x%04X; CHIP_ID=0x%04X.\n", ExpectedChipType, pATI->ChipType); } diff --git a/src/atidri.c b/src/atidri.c index 0da1bc59..15d00142 100644 --- a/src/atidri.c +++ b/src/atidri.c @@ -41,9 +41,9 @@ #include "atidri.h" #include "atiregs.h" #include "atistruct.h" -#include "ativersion.h" #include "atimach64io.h" +#include "atimach64version.h" #include "mach64_dri.h" #include "mach64_common.h" #include "mach64_sarea.h" @@ -1244,9 +1244,9 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen ) PCI_DEV_DEV(pATI->PCIInfo), PCI_DEV_FUNC(pATI->PCIInfo) ); } - pDRIInfo->ddxDriverMajorVersion = ATI_VERSION_MAJOR; - pDRIInfo->ddxDriverMinorVersion = ATI_VERSION_MINOR; - pDRIInfo->ddxDriverPatchVersion = ATI_VERSION_PATCH; + pDRIInfo->ddxDriverMajorVersion = MACH64_VERSION_MAJOR; + pDRIInfo->ddxDriverMinorVersion = MACH64_VERSION_MINOR; + pDRIInfo->ddxDriverPatchVersion = MACH64_VERSION_PATCH; pDRIInfo->frameBufferPhysicalAddress = (void *)pATI->LinearBase; pDRIInfo->frameBufferSize = pATI->LinearSize; pDRIInfo->frameBufferStride = (pScreenInfo->displayWidth * diff --git a/src/atimach64probe.c b/src/atimach64probe.c index b365b09f..5ea2ccc8 100644 --- a/src/atimach64probe.c +++ b/src/atimach64probe.c @@ -28,6 +28,7 @@ #include "atichip.h" #include "atimach64io.h" #include "atimach64probe.h" +#include "atimach64version.h" #include "atioption.h" #include "ativersion.h" @@ -127,7 +128,7 @@ Mach64Identify int flags ) { - xf86Msg(X_INFO, "%s: %s\n", ATI_NAME, + xf86Msg(X_INFO, "%s: %s\n", MACH64_NAME, "Driver for ATI Mach64 chipsets"); } @@ -154,7 +155,7 @@ Mach64Probe(DriverPtr pDriver, int flags) if ((numDevSections = xf86MatchDevice(ATI_DRIVER_NAME, &devSections)) <= 0) return FALSE; - numUsed = xf86MatchPciInstances(ATI_DRIVER_NAME, PCI_VENDOR_ATI, + numUsed = xf86MatchPciInstances(MACH64_NAME, PCI_VENDOR_ATI, Mach64Chipsets, Mach64PciChipsets, devSections, numDevSections, pDriver, &usedChips); @@ -177,9 +178,9 @@ Mach64Probe(DriverPtr pDriver, int flags) if (!pScrn) continue; - pScrn->driverVersion = ATI_VERSION_CURRENT; - pScrn->driverName = ATI_DRIVER_NAME; - pScrn->name = ATI_NAME; + pScrn->driverVersion = MACH64_VERSION_CURRENT; + pScrn->driverName = MACH64_DRIVER_NAME; + pScrn->name = MACH64_NAME; pScrn->Probe = Mach64Probe; pScrn->PreInit = ATIPreInit; pScrn->ScreenInit = ATIScreenInit; diff --git a/src/atimach64version.h b/src/atimach64version.h new file mode 100644 index 00000000..c1848bde --- /dev/null +++ b/src/atimach64version.h @@ -0,0 +1,59 @@ +/* + * Copyright 2000 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 _MACH64_VERSION_H_ +#define _MACH64_VERSION_H_ 1 + +#undef MACH64_NAME +#undef MACH64_DRIVER_NAME +#undef MACH64_VERSION_MAJOR +#undef MACH64_VERSION_MINOR +#undef MACH64_VERSION_PATCH +#undef MACH64_VERSION_CURRENT +#undef MACH64_VERSION_EVALUATE +#undef MACH64_VERSION_STRINGIFY +#undef MACH64_VERSION_NAME + +#define MACH64_NAME "MACH64" +#define MACH64_DRIVER_NAME "mach64" + +#define MACH64_VERSION_MAJOR 6 +#define MACH64_VERSION_MINOR 7 +#define MACH64_VERSION_PATCH 0 + +#ifndef MACH64_VERSION_EXTRA +#define MACH64_VERSION_EXTRA "" +#endif + +#define MACH64_VERSION_CURRENT \ + ((MACH64_VERSION_MAJOR << 20) | \ + (MACH64_VERSION_MINOR << 10) | \ + (MACH64_VERSION_PATCH)) + +#define MACH64_VERSION_EVALUATE(__x) #__x +#define MACH64_VERSION_STRINGIFY(_x) MACH64_VERSION_EVALUATE(_x) +#define MACH64_VERSION_NAME \ + MACH64_VERSION_STRINGIFY(MACH64_VERSION_MAJOR) "." \ + MACH64_VERSION_STRINGIFY(MACH64_VERSION_MINOR) "." \ + MACH64_VERSION_STRINGIFY(MACH64_VERSION_MINOR) MACH64_VERSION_EXTRA + +#endif /* _MACH64_VERSION_H_ */ diff --git a/src/atimisc.c b/src/atimisc.c index 7deda6e9..d71b0ad4 100644 --- a/src/atimisc.c +++ b/src/atimisc.c @@ -27,6 +27,8 @@ #include "ati.h" #include "ativersion.h" +#include "atimach64version.h" + /* Module loader interface for subsidiary driver module */ static XF86ModuleVersionInfo ATIVersionRec = @@ -36,7 +38,7 @@ static XF86ModuleVersionInfo ATIVersionRec = MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - ATI_VERSION_MAJOR, ATI_VERSION_MINOR, ATI_VERSION_PATCH, + MACH64_VERSION_MAJOR, MACH64_VERSION_MINOR, MACH64_VERSION_PATCH, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, @@ -62,38 +64,8 @@ ATISetup if (!Inited) { /* Ensure main driver module is loaded, but not as a submodule */ - if (!xf86ServerIsOnlyDetecting()) - { - if (!LoaderSymbol(ATI_NAME)) - xf86LoadOneModule(ATI_DRIVER_NAME, Options); - - /* ati & mach64 module versions must match */ - do - { - XF86ModuleData *pModuleData = LoaderSymbol("atiModuleData"); - - if (pModuleData) - { - XF86ModuleVersionInfo *pModuleInfo = pModuleData->vers; - - if ((pModuleInfo->majorversion == ATI_VERSION_MAJOR) && - (pModuleInfo->minorversion == ATI_VERSION_MINOR) && - (pModuleInfo->patchlevel == ATI_VERSION_PATCH)) - break; - } - - xf86Msg(X_ERROR, - "\"ati\" and \"mach64\" module versions must" - " match.\n"); - - if (ErrorMajor) - *ErrorMajor = (int)LDR_MISMATCH; - if (ErrorMinor) - *ErrorMinor = (int)LDR_MISMATCH; - - return NULL; - } while (0); - } + if (!xf86ServerIsOnlyDetecting() && !LoaderSymbol(ATI_NAME)) + xf86LoadOneModule(ATI_DRIVER_NAME, Options); Inited = TRUE; } diff --git a/src/atiprobe.c b/src/atiprobe.c index 38ce90d0..70e1a4a6 100644 --- a/src/atiprobe.c +++ b/src/atiprobe.c @@ -32,8 +32,8 @@ #include "atibus.h" #include "atichip.h" #include "atimach64io.h" +#include "atimach64version.h" #include "atiprobe.h" -#include "ativersion.h" #include "atividmem.h" #include "atiwonderio.h" @@ -58,7 +58,7 @@ ATIVGAWonderProbe if (!pATI->OptionProbeSparse) { xf86Msg(X_WARNING, - ATI_NAME ": Expected VGA Wonder capability at I/O port" + MACH64_NAME ": Expected VGA Wonder capability at I/O port" " 0x%04lX will not be probed\n" "set option \"probe_sparse\" to force probing.\n", pATI->CPIO_VGAWonder); @@ -96,13 +96,13 @@ ATIVGAWonderProbe (IOValue6 == 0)) { xf86MsgVerb(X_INFO, 3, - ATI_NAME ": VGA Wonder at I/O port 0x%04lX detected.\n", + MACH64_NAME ": VGA Wonder at I/O port 0x%04lX detected.\n", pATI->CPIO_VGAWonder); } else { xf86Msg(X_WARNING, - ATI_NAME ": Expected VGA Wonder capability at I/O port" + MACH64_NAME ": Expected VGA Wonder capability at I/O port" " 0x%04lX was not detected.\n", pATI->CPIO_VGAWonder); pATI->CPIO_VGAWonder = 0; } @@ -398,7 +398,7 @@ ATIMach64ProbeIO if (j == 0x03U) { - xf86Msg(X_WARNING, ATI_NAME ": " + xf86Msg(X_WARNING, MACH64_NAME ": " "PCI Mach64 in slot %d:%d:%d cannot be enabled\n" "because it has neither a block, nor a sparse, I/O base.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); @@ -418,7 +418,7 @@ ATIMach64ProbeIO */ if (!pATI->OptionProbeSparse) { - xf86Msg(X_WARNING, ATI_NAME ": " + xf86Msg(X_WARNING, MACH64_NAME ": " "PCI Mach64 in slot %d:%d:%d will not be probed\n" "set option \"probe_sparse\" to force sparse I/O probing.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); @@ -439,14 +439,14 @@ ATIMach64ProbeIO if (!ATIMach64Probe(pATI, pVideo, pATI->Chip)) { - xf86Msg(X_WARNING, ATI_NAME ": " + xf86Msg(X_WARNING, MACH64_NAME ": " "PCI Mach64 in slot %d:%d:%d could not be detected!\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); } else { ProbeSuccess = TRUE; - xf86Msg(X_INFO, ATI_NAME ": " + xf86Msg(X_INFO, MACH64_NAME ": " "Shared PCI Mach64 in slot %d:%d:%d with sparse PIO base" " 0x%04lX detected.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo), @@ -471,7 +471,7 @@ SkipSparse: if (ATIMach64Probe(pATI, pVideo, pATI->Chip)) { ProbeSuccess = TRUE; - xf86Msg(X_INFO, ATI_NAME ": " + xf86Msg(X_INFO, MACH64_NAME ": " "Shared PCI Mach64 in slot %d:%d:%d with Block 0 base" " 0x%08lX detected.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo), @@ -479,7 +479,7 @@ SkipSparse: } else { - xf86Msg(X_WARNING, ATI_NAME ": " + xf86Msg(X_WARNING, MACH64_NAME ": " "PCI Mach64 in slot %d:%d:%d could not be detected!\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); } @@ -497,7 +497,7 @@ SkipSparse: if (ATIMach64Probe(pATI, pVideo, pATI->Chip)) { ProbeSuccess = TRUE; - xf86Msg(X_INFO, ATI_NAME ": " + xf86Msg(X_INFO, MACH64_NAME ": " "Shared PCI/AGP Mach64 in slot %d:%d:%d detected.\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); @@ -511,7 +511,7 @@ SkipSparse: } else { - xf86Msg(X_WARNING, ATI_NAME ": " + xf86Msg(X_WARNING, MACH64_NAME ": " "PCI/AGP Mach64 in slot %d:%d:%d could not be detected!\n", PCI_DEV_BUS(pVideo), PCI_DEV_DEV(pVideo), PCI_DEV_FUNC(pVideo)); } |