xf86-video-ati: Branch 'master' - 2 commits

George Sapountzis gsap7 at kemper.freedesktop.org
Thu Mar 8 18:38:06 EET 2007


 src/Makefile.am      |   12 +-
 src/ati.c            |  120 +++++++++++++++++++++++-
 src/atibus.h         |    1 
 src/aticonfig.c      |  201 ++++++++++++++++++++++++++++++++++++++++
 src/aticonfig.h      |   32 ------
 src/atidga.c         |    1 
 src/atifillin.c      |    1 
 src/atifillin.h      |    1 
 src/atiident.c       |   50 ----------
 src/atimach64probe.c |  186 +++++++++++++++++++++++++++++++++++++
 src/atimach64probe.h |   11 +-
 src/atimodule.c      |    1 
 src/atioption.c      |  254 ---------------------------------------------------
 src/atioption.h      |    5 -
 src/atipreinit.c     |    4 
 src/atiprobe.c       |  225 ---------------------------------------------
 src/atiprobe.h       |    2 
 17 files changed, 522 insertions(+), 585 deletions(-)

New commits:
diff-tree 50a524445ed1ea3c4fab56de772921ba86a21d35 (from 52684241ba1ffb393cb655ecc09cbd0cef5b1717)
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Thu Mar 8 17:43:48 2007 +0200

    Move atioption.c from ati to atimisc.

diff --git a/src/Makefile.am b/src/Makefile.am
index 24f5516..5c1bee6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -51,7 +51,7 @@ ati_drv_la_LTLIBRARIES = ati_drv.la
 ati_drv_la_LDFLAGS = -module -avoid-version
 ati_drv_ladir = @moduledir@/drivers
 ati_drv_la_SOURCES = \
-	ati.c atichip.c atioption.c atimodule.c atimach64probe.c \
+	ati.c atichip.c atimodule.c atimach64probe.c \
 	radeon_probe.c r128_probe.c
 
 atimisc_drv_la_LTLIBRARIES = atimisc_drv.la
@@ -114,7 +114,6 @@ EXTRA_DIST = \
 	atibus.h \
 	atichip.h \
 	aticlock.h \
-	aticonfig.h \
 	aticonsole.h \
 	aticrtc.h \
 	aticursor.h \
diff --git a/src/ati.c b/src/ati.c
index 4d50aec..e7a5aee 100644
--- a/src/ati.c
+++ b/src/ati.c
@@ -59,7 +59,6 @@
 
 #include "ati.h"
 #include "atichip.h"
-#include "atioption.h"
 #include "ativersion.h"
 #include "atimach64probe.h"
 
@@ -154,6 +153,29 @@ ATIProbe
     return ProbeSuccess;
 }
 
+/*
+ * ATIAvailableOptions --
+ *
+ * Return recognised options that are intended for public consumption.
+ */
+const OptionInfoRec *
+ATIAvailableOptions
+(
+    int ChipId,
+    int BusId
+)
+{
+    const OptionInfoRec *pOptions;
+
+    if ((pOptions = R128AvailableOptions(ChipId, BusId)))
+        return pOptions;
+
+    if ((pOptions = RADEONAvailableOptions(ChipId, BusId)))
+        return pOptions;
+
+    return Mach64AvailableOptions(ChipId, BusId);
+}
+
 /* The root of all evil... */
 _X_EXPORT DriverRec ATI =
 {
diff --git a/src/aticonfig.c b/src/aticonfig.c
index eeb0a70..a4ceddf 100644
--- a/src/aticonfig.c
+++ b/src/aticonfig.c
@@ -31,13 +31,212 @@
 
 #include "ati.h"
 #include "atichip.h"
-#include "aticonfig.h"
 #include "aticursor.h"
 #include "atioption.h"
 #include "atistruct.h"
 
 #include "mach64_common.h"
 
+#ifdef TV_OUT
+
+/*
+ * List of supported TV standard names
+ */
+const char *ATITVStandardNames[ATI_TV_STDS_MAX_VALID+1] = {
+    "NTSC",
+    "PAL",
+    "PAL-M",
+    "PAL-60",
+    "NTSC-J",
+    "PAL-CN",
+    "PAL-N",
+    "Reserved1",
+    "Reserved2",
+    "SCART-PAL",
+    "None",
+    "Invalid"
+};
+
+#endif /* TV_OUT */
+
+/*
+ * Recognised XF86Config options.
+ */
+static const OptionInfoRec ATIPublicOptions[] =
+{
+    {
+        ATI_OPTION_PROBE_SPARSE,
+        "probe_sparse",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_ACCEL,
+        "accel",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_CRT_DISPLAY,
+        "crt_display",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_CSYNC,
+        "composite_sync",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_HWCURSOR,
+        "hw_cursor",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE,
+    },
+
+#ifdef XF86DRI_DEVEL
+
+    {
+        ATI_OPTION_IS_PCI,
+        "force_pci_mode",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE,
+    },
+    {
+        ATI_OPTION_DMA_MODE,
+        "dma_mode",
+        OPTV_STRING,
+        {0, },
+        FALSE,
+    },
+    {
+        ATI_OPTION_AGP_MODE,
+        "agp_mode",
+        OPTV_INTEGER,
+        {0, },
+        FALSE,
+    },
+    {
+        ATI_OPTION_AGP_SIZE,
+        "agp_size",
+        OPTV_INTEGER,
+        {0, },
+        FALSE,
+    },
+    {
+        ATI_OPTION_LOCAL_TEXTURES,
+        "local_textures",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE,
+    },
+    {
+        ATI_OPTION_BUFFER_SIZE,
+        "buffer_size",
+        OPTV_INTEGER,
+        {0, },
+        FALSE,
+    },
+
+#endif /* XF86DRI_DEVEL */
+
+#ifdef TV_OUT
+    {
+        ATI_OPTION_TV_OUT,
+        "tv_out",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_TV_STD,
+        "tv_standard",
+        OPTV_STRING,
+        {0, },
+        FALSE
+    },
+
+#endif /* TV_OUT */
+
+    {
+        ATI_OPTION_MMIO_CACHE,
+        "mmio_cache",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+
+
+    {
+        ATI_OPTION_TEST_MMIO_CACHE,
+        "test_mmio_cache",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_PANEL_DISPLAY,
+        "panel_display",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_REFERENCE_CLOCK,
+        "reference_clock",
+        OPTV_FREQ,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_SHADOW_FB,
+        "shadow_fb",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_SWCURSOR,
+        "sw_cursor",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE,
+    },
+    {
+        ATI_OPTION_ACCELMETHOD,
+        "AccelMethod",
+        OPTV_STRING,
+        {0, },
+        FALSE
+    },
+    {
+        ATI_OPTION_RENDER_ACCEL,
+        "RenderAccel",
+        OPTV_BOOLEAN,
+        {0, },
+        FALSE
+    },
+    {
+        -1,
+        NULL,
+        OPTV_NONE,
+        {0, },
+        FALSE
+    }
+};
+
+static const unsigned long ATIPublicOptionSize = SizeOf(ATIPublicOptions);
+
+_X_EXPORT const OptionInfoRec *
+ATIOptionsWeak(void) { return ATIPublicOptions; }
+
 /*
  * Non-publicised XF86Config options.
  */
diff --git a/src/aticonfig.h b/src/aticonfig.h
deleted file mode 100644
index ec68c31..0000000
--- a/src/aticonfig.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi at 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 ___ATICONFIG_H___
-#define ___ATICONFIG_H___ 1
-
-#include "atipriv.h"
-
-#include "xf86str.h"
-
-extern void ATIProcessOptions(ScrnInfoPtr, ATIPtr);
-
-#endif /* ___ATICONFIG_H___ */
diff --git a/src/atimach64probe.c b/src/atimach64probe.c
index ea01f67..47340a5 100644
--- a/src/atimach64probe.c
+++ b/src/atimach64probe.c
@@ -30,6 +30,7 @@
 #include "atimodule.h"
 #include "atimach64io.h"
 #include "atimach64probe.h"
+#include "atioption.h"
 #include "ativersion.h"
 
 static SymTabRec
@@ -100,6 +101,16 @@ Mach64PciChipsets[] = {
     {-1, -1, RES_UNDEFINED}
 };
 
+const OptionInfoRec *
+Mach64AvailableOptions(int chipid, int busid)
+{
+    /*
+     * Return options defined in the atimisc submodule which will have been
+     * loaded by this point.
+     */
+    return ATIOptionsWeak();
+}
+
 /*
  * Mach64Probe --
  *
diff --git a/src/atimach64probe.h b/src/atimach64probe.h
index 24e85d8..4e474ca 100644
--- a/src/atimach64probe.h
+++ b/src/atimach64probe.h
@@ -25,6 +25,7 @@
 
 #include "xf86str.h"
 
-extern Bool Mach64Probe(DriverPtr, int);
+extern const OptionInfoRec * Mach64AvailableOptions(int, int);
+extern Bool                  Mach64Probe(DriverPtr, int);
 
 #endif /* ___ATIMACH64PROBE_H___ */
diff --git a/src/atimodule.c b/src/atimodule.c
index 39a2eeb..05456e7 100644
--- a/src/atimodule.c
+++ b/src/atimodule.c
@@ -42,6 +42,7 @@ const char *ATISymbols[] =
     "ATILeaveVT",
     "ATIFreeScreen",
     "ATIValidMode",
+    "ATIOptionsWeak",
     "ATIFillInScreenInfo",
     NULL
 };
diff --git a/src/atioption.c b/src/atioption.c
deleted file mode 100644
index 4cb965d..0000000
--- a/src/atioption.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi at 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.
- *
- * DRI support by:
- *    Leif Delgass <ldelgass at retinalburn.net>
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "atioption.h"
-#include "atiutil.h"
-
-#include "radeon_probe.h"
-#include "r128_probe.h"
-
-#ifdef TV_OUT
-
-/*
- * List of supported TV standard names
- */
-const char *ATITVStandardNames[ATI_TV_STDS_MAX_VALID+1] = {
-    "NTSC",
-    "PAL",
-    "PAL-M",
-    "PAL-60",
-    "NTSC-J",
-    "PAL-CN",
-    "PAL-N",
-    "Reserved1",
-    "Reserved2",
-    "SCART-PAL",
-    "None",
-    "Invalid"
-};
-
-#endif /* TV_OUT */
-
-/*
- * Recognised XF86Config options.
- */
-const OptionInfoRec ATIPublicOptions[] =
-{
-    {
-        ATI_OPTION_PROBE_SPARSE,
-        "probe_sparse",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_ACCEL,
-        "accel",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_CRT_DISPLAY,
-        "crt_display",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_CSYNC,
-        "composite_sync",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_HWCURSOR,
-        "hw_cursor",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE,
-    },
-
-#ifdef XF86DRI_DEVEL
-
-    {
-        ATI_OPTION_IS_PCI,
-        "force_pci_mode",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE,
-    },
-    {
-        ATI_OPTION_DMA_MODE,
-        "dma_mode",
-        OPTV_STRING,
-        {0, },
-        FALSE,
-    },
-    {
-        ATI_OPTION_AGP_MODE,
-        "agp_mode",
-        OPTV_INTEGER,
-        {0, },
-        FALSE,
-    },
-    {
-        ATI_OPTION_AGP_SIZE,
-        "agp_size",
-        OPTV_INTEGER,
-        {0, },
-        FALSE,
-    },
-    {
-        ATI_OPTION_LOCAL_TEXTURES,
-        "local_textures",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE,
-    },
-    {
-        ATI_OPTION_BUFFER_SIZE,
-        "buffer_size",
-        OPTV_INTEGER,
-        {0, },
-        FALSE,
-    },
-
-#endif /* XF86DRI_DEVEL */
-
-#ifdef TV_OUT
-    {
-        ATI_OPTION_TV_OUT,
-        "tv_out",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_TV_STD,
-        "tv_standard",
-        OPTV_STRING,
-        {0, },
-        FALSE
-    },
-
-#endif /* TV_OUT */
-
-    {
-        ATI_OPTION_MMIO_CACHE,
-        "mmio_cache",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-
-
-    {
-        ATI_OPTION_TEST_MMIO_CACHE,
-        "test_mmio_cache",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_PANEL_DISPLAY,
-        "panel_display",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_REFERENCE_CLOCK,
-        "reference_clock",
-        OPTV_FREQ,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_SHADOW_FB,
-        "shadow_fb",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_SWCURSOR,
-        "sw_cursor",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE,
-    },
-    {
-        ATI_OPTION_ACCELMETHOD,
-        "AccelMethod",
-        OPTV_STRING,
-        {0, },
-        FALSE
-    },
-    {
-        ATI_OPTION_RENDER_ACCEL,
-        "RenderAccel",
-        OPTV_BOOLEAN,
-        {0, },
-        FALSE
-    },
-    {
-        -1,
-        NULL,
-        OPTV_NONE,
-        {0, },
-        FALSE
-    }
-};
-
-const unsigned long ATIPublicOptionSize = SizeOf(ATIPublicOptions);
-
-/*
- * ATIAvailableOptions --
- *
- * Return recognised options that are intended for public consumption.
- */
-const OptionInfoRec *
-ATIAvailableOptions
-(
-    int ChipId,
-    int BusId
-)
-{
-    const OptionInfoRec *pOptions;
-
-    if ((pOptions = R128AvailableOptions(ChipId, BusId)))
-        return pOptions;
-
-    if ((pOptions = RADEONAvailableOptions(ChipId, BusId)))
-        return pOptions;
-
-    return ATIPublicOptions;
-}
diff --git a/src/atioption.h b/src/atioption.h
index f68f641..37303ef 100644
--- a/src/atioption.h
+++ b/src/atioption.h
@@ -91,9 +91,8 @@ extern const char          * ATITVStanda
 
 #endif /* TV_OUT */
 
-extern const OptionInfoRec   ATIPublicOptions[];
-extern const unsigned long   ATIPublicOptionSize;
+extern const OptionInfoRec * ATIOptionsWeak(void);
 
-extern const OptionInfoRec * ATIAvailableOptions(int, int);
+extern void                  ATIProcessOptions(ScrnInfoPtr, ATIPtr);
 
 #endif /* ___ATIOPTION_H___ */
diff --git a/src/atipreinit.c b/src/atipreinit.c
index 8ca16eb..8f80824 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -32,7 +32,6 @@
 #include "atiaudio.h"
 #include "atibus.h"
 #include "atichip.h"
-#include "aticonfig.h"
 #include "aticursor.h"
 #include "atidac.h"
 #include "atidsp.h"
@@ -43,6 +42,7 @@
 #include "atimach64accel.h"
 #include "atimach64io.h"
 #include "atimode.h"
+#include "atioption.h"
 #include "atipreinit.h"
 #include "atiprint.h"
 #include "atiprobe.h"
diff-tree 52684241ba1ffb393cb655ecc09cbd0cef5b1717 (from 1e270b411cf691c69194932b864ee2c9db292263)
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Thu Mar 8 07:07:02 2007 +0200

    Move atiprobe.c from ati to atimisc.

diff --git a/src/Makefile.am b/src/Makefile.am
index f31c018..24f5516 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,8 +33,7 @@ RADEON_DRI_SRCS = radeon_dri.c
 endif
 
 if ATIMISC_CPIO
-ATI_CPIO_SOURCES = ativgaio.c
-ATIMISC_CPIO_SOURCES = ativga.c atibank.c atiwonder.c atiwonderio.c
+ATIMISC_CPIO_SOURCES = ativga.c ativgaio.c atibank.c atiwonder.c atiwonderio.c
 endif
 
 if ATIMISC_DGA
@@ -52,14 +51,14 @@ ati_drv_la_LTLIBRARIES = ati_drv.la
 ati_drv_la_LDFLAGS = -module -avoid-version
 ati_drv_ladir = @moduledir@/drivers
 ati_drv_la_SOURCES = \
-	ati.c atibus.c atichip.c atiident.c atioption.c \
-	atiprobe.c atividmem.c atimodule.c $(ATI_CPIO_SOURCES) \
+	ati.c atichip.c atioption.c atimodule.c atimach64probe.c \
 	radeon_probe.c r128_probe.c
 
 atimisc_drv_la_LTLIBRARIES = atimisc_drv.la
 atimisc_drv_la_LDFLAGS = -module -avoid-version
 atimisc_drv_ladir = @moduledir@/drivers
 atimisc_drv_la_SOURCES = \
+	atibus.c atiprobe.c atividmem.c \
 	atiadjust.c atiaudio.c aticlock.c aticonfig.c aticonsole.c \
 	atidac.c atidecoder.c atidsp.c atifillin.c atii2c.c \
 	atilock.c atimach64.c atimach64accel.c atimach64cursor.c \
@@ -105,6 +104,7 @@ theatre200_drv_la_SOURCES = \
 	theatre200.c theatre200_module.c
 
 EXTRA_DIST = \
+	atimach64render.c \
 	radeon_render.c \
 	radeon_accelfuncs.c \
 	\
@@ -127,14 +127,13 @@ EXTRA_DIST = \
 	atifillin.h \
 	ati.h \
 	atii2c.h \
-	atiident.h \
 	atiload.h \
 	atilock.h \
 	atimach64accel.h \
 	atimach64.h \
 	atimach64i2c.h \
 	atimach64io.h \
-	atimach64render.c \
+	atimach64probe.h \
 	atimode.h \
 	atimodule.h \
 	atioption.h \
diff --git a/src/ati.c b/src/ati.c
index d9c7441..4d50aec 100644
--- a/src/ati.c
+++ b/src/ati.c
@@ -57,10 +57,102 @@
 #include "config.h"
 #endif
 
-#include "atiident.h"
+#include "ati.h"
+#include "atichip.h"
 #include "atioption.h"
-#include "atiprobe.h"
 #include "ativersion.h"
+#include "atimach64probe.h"
+
+#include "radeon_probe.h"
+#include "radeon_version.h"
+#include "r128_probe.h"
+#include "r128_version.h"
+
+/*
+ * ATIIdentify --
+ *
+ * Print the driver's list of chipset names.
+ */
+static void
+ATIIdentify
+(
+    int flags
+)
+{
+    xf86Msg(X_INFO, "%s: %s\n", ATI_NAME,
+            "ATI driver (version " ATI_VERSION_NAME ") for chipset: mach64");
+    R128Identify(flags);
+    RADEONIdentify(flags);
+}
+
+/*
+ * ATIProbe --
+ *
+ * This function is called once, at the start of the first server generation to
+ * do a minimal probe for supported hardware.
+ */
+static Bool
+ATIProbe
+(
+    DriverPtr pDriver,
+    int       flags
+)
+{
+    pciVideoPtr pVideo, *xf86PciVideoInfo = xf86GetPciVideoInfo();
+    Bool        ProbeSuccess = FALSE;
+    Bool        DoMach64 = FALSE;
+    Bool        DoRage128 = FALSE, DoRadeon = FALSE;
+    int         i;
+    ATIChipType Chip;
+
+    if (!(flags & PROBE_DETECT))
+    {
+        if (xf86MatchDevice(ATI_NAME, NULL) > 0)
+            DoMach64 = TRUE;
+        if (xf86MatchDevice(R128_NAME, NULL) > 0)
+            DoRage128 = TRUE;
+        if (xf86MatchDevice(RADEON_NAME, NULL) > 0)
+            DoRadeon = TRUE;
+    }
+
+    if (xf86PciVideoInfo)
+    {
+        for (i = 0;  (pVideo = xf86PciVideoInfo[i++]);  )
+        {
+            if ((pVideo->vendor != PCI_VENDOR_ATI) ||
+                (pVideo->chipType == PCI_CHIP_MACH32))
+                continue;
+
+            /* Check for Rage128's, Radeon's and later adapters */
+            Chip = ATIChipID(pVideo->chipType, pVideo->chipRev);
+            if (Chip > ATI_CHIP_Mach64)
+            {
+                if (Chip <= ATI_CHIP_Rage128)
+                    DoRage128 = TRUE;
+                else if (Chip <= ATI_CHIP_Radeon)
+                    DoRadeon = TRUE;
+
+                continue;
+            }
+
+            DoMach64 = TRUE;
+        }
+    }
+
+    /* Call Mach64 driver probe */
+    if (DoMach64 && Mach64Probe(pDriver, flags))
+        ProbeSuccess = TRUE;
+
+    /* Call Rage 128 driver probe */
+    if (DoRage128 && R128Probe(pDriver, flags))
+        ProbeSuccess = TRUE;
+
+    /* Call Radeon driver probe */
+    if (DoRadeon && RADEONProbe(pDriver, flags))
+        ProbeSuccess = TRUE;
+
+    return ProbeSuccess;
+}
 
 /* The root of all evil... */
 _X_EXPORT DriverRec ATI =
diff --git a/src/atibus.h b/src/atibus.h
index c5c676e..e5f1afd 100644
--- a/src/atibus.h
+++ b/src/atibus.h
@@ -44,7 +44,6 @@ typedef enum
 
 extern const char *ATIBusNames[];
 
-extern Bool ATIMach64ProbeIO(pciVideoPtr, ATIPtr);
 extern int  ATIClaimBusSlot(Bool, ATIPtr);
 
 #endif /* ___ATIBUS_H___ */
diff --git a/src/atidga.c b/src/atidga.c
index e6783a4..fb6d1d7 100644
--- a/src/atidga.c
+++ b/src/atidga.c
@@ -32,7 +32,6 @@
 #include "atichip.h"
 #include "atidac.h"
 #include "atidga.h"
-#include "atiident.h"
 #include "atimode.h"
 #include "atistruct.h"
 
diff --git a/src/atifillin.c b/src/atifillin.c
index 32e8483..dcbcb3c 100644
--- a/src/atifillin.c
+++ b/src/atifillin.c
@@ -36,7 +36,6 @@ _X_EXPORT void ATIFillInScreenInfo(ScrnI
     pScreenInfo->driverVersion = ATI_VERSION_CURRENT;
     pScreenInfo->driverName    = ATI_DRIVER_NAME;
     pScreenInfo->name          = ATI_NAME;
-    pScreenInfo->Probe         = ATIProbe;
     pScreenInfo->PreInit       = ATIPreInit;
     pScreenInfo->ScreenInit    = ATIScreenInit;
     pScreenInfo->SwitchMode    = ATISwitchMode;
diff --git a/src/atifillin.h b/src/atifillin.h
index 2e9c5d4..7d5e54d 100644
--- a/src/atifillin.h
+++ b/src/atifillin.h
@@ -30,7 +30,6 @@
 /* include headers corresponding to fields touched by ATIFillInScreenInfo() */
 
 #include "ativersion.h"
-#include "atiprobe.h"
 #include "atipreinit.h"
 #include "atiscreen.h"
 #include "aticonsole.h"
diff --git a/src/atiident.c b/src/atiident.c
deleted file mode 100644
index cffa817..0000000
--- a/src/atiident.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi at 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"
-
-#include "r128_probe.h"
-#include "radeon_probe.h"
-
-/*
- * ATIIdentify --
- *
- * Print the driver's list of chipset names.
- */
-void
-ATIIdentify
-(
-    int flags
-)
-{
-    xf86Msg(X_INFO, "%s: %s\n", ATI_NAME,
-            "ATI driver (version " ATI_VERSION_NAME ") for chipset: mach64");
-    R128Identify(flags);
-    RADEONIdentify(flags);
-}
diff --git a/src/atiident.h b/src/atiident.h
deleted file mode 100644
index 38699ec..0000000
--- a/src/atiident.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi at 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
-
-extern void ATIIdentify(int);
-
-#endif /* ___ATIIDENT_H___ */
diff --git a/src/atimach64probe.c b/src/atimach64probe.c
new file mode 100644
index 0000000..ea01f67
--- /dev/null
+++ b/src/atimach64probe.c
@@ -0,0 +1,175 @@
+/*
+ * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi at 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 "atichip.h"
+#include "atifillin.h"
+#include "atimodule.h"
+#include "atimach64io.h"
+#include "atimach64probe.h"
+#include "ativersion.h"
+
+static SymTabRec
+Mach64Chipsets[] = {
+    {ATI_CHIP_88800GXC, "ATI 88800GX-C"},
+    {ATI_CHIP_88800GXD, "ATI 88800GX-D"},
+    {ATI_CHIP_88800GXE, "ATI 88800GX-E"},
+    {ATI_CHIP_88800GXF, "ATI 88800GX-F"},
+    {ATI_CHIP_88800GX,  "ATI 88800GX"},
+    {ATI_CHIP_88800CX,  "ATI 88800CX"},
+    {ATI_CHIP_264CT,    "ATI 264CT"},
+    {ATI_CHIP_264ET,    "ATI 264ET"},
+    {ATI_CHIP_264VT,    "ATI 264VT"},
+    {ATI_CHIP_264VTB,   "ATI 264VT-B"},
+    {ATI_CHIP_264GT,    "ATI 3D Rage"},
+    {ATI_CHIP_264GTB,   "ATI 3D Rage II"},
+    {ATI_CHIP_264VT3,   "ATI 264VT3"},
+    {ATI_CHIP_264GTDVD, "ATI 3D Rage II+DVD"},
+    {ATI_CHIP_264LT,    "ATI 3D Rage LT"},
+    {ATI_CHIP_264VT4,   "ATI 264VT4"},
+    {ATI_CHIP_264GT2C,  "ATI 3D Rage IIc"},
+    {ATI_CHIP_264GTPRO, "ATI 3D Rage Pro"},
+    {ATI_CHIP_264LTPRO, "ATI 3D Rage LT Pro"},
+    {ATI_CHIP_264XL,    "ATI 3D Rage XL or XC"},
+    {ATI_CHIP_MOBILITY, "ATI 3D Rage Mobility"},
+    {-1,      NULL }
+};
+
+/*
+ * This table maps a PCI device ID to a chipset family identifier.
+ */
+static PciChipsets
+Mach64PciChipsets[] = {
+    {ATI_CHIP_88800GX,   PCI_CHIP_MACH64GX,  RES_SHARED_VGA},
+    {ATI_CHIP_88800CX,   PCI_CHIP_MACH64CX,  RES_SHARED_VGA},
+    {ATI_CHIP_264CT,     PCI_CHIP_MACH64CT,  RES_SHARED_VGA},
+    {ATI_CHIP_264ET,     PCI_CHIP_MACH64ET,  RES_SHARED_VGA},
+    {ATI_CHIP_264VT,     PCI_CHIP_MACH64VT,  RES_SHARED_VGA},
+    {ATI_CHIP_264GT,     PCI_CHIP_MACH64GT,  RES_SHARED_VGA},
+    {ATI_CHIP_264VT3,    PCI_CHIP_MACH64VU,  RES_SHARED_VGA},
+    {ATI_CHIP_264GTDVD,  PCI_CHIP_MACH64GU,  RES_SHARED_VGA},
+    {ATI_CHIP_264LT,     PCI_CHIP_MACH64LG,  RES_SHARED_VGA},
+    {ATI_CHIP_264VT4,    PCI_CHIP_MACH64VV,  RES_SHARED_VGA},
+    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GV,  RES_SHARED_VGA},
+    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GW,  RES_SHARED_VGA},
+    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GY,  RES_SHARED_VGA},
+    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GZ,  RES_SHARED_VGA},
+    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GB,  RES_SHARED_VGA},
+    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GD,  RES_SHARED_VGA},
+    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GI,  RES_SHARED_VGA},
+    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GP,  RES_SHARED_VGA},
+    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GQ,  RES_SHARED_VGA},
+    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LB,  RES_SHARED_VGA},
+    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LD,  RES_SHARED_VGA},
+    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LI,  RES_SHARED_VGA},
+    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LP,  RES_SHARED_VGA},
+    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LQ,  RES_SHARED_VGA},
+    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GL,  RES_SHARED_VGA},
+    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GM,  RES_SHARED_VGA},
+    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GN,  RES_SHARED_VGA},
+    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GO,  RES_SHARED_VGA},
+    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GR,  RES_SHARED_VGA},
+    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GS,  RES_SHARED_VGA},
+    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LM,  RES_SHARED_VGA},
+    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LN,  RES_SHARED_VGA},
+    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LR,  RES_SHARED_VGA},
+    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LS,  RES_SHARED_VGA},
+    {-1, -1, RES_UNDEFINED}
+};
+
+/*
+ * Mach64Probe --
+ *
+ * This function is called once, at the start of the first server generation to
+ * do a minimal probe for supported hardware.
+ */
+Bool
+Mach64Probe(DriverPtr pDriver, int flags)
+{
+    GDevPtr  *devSections;
+    int  *usedChips;
+    int  numDevSections;
+    int  numUsed;
+    Bool  ProbeSuccess = FALSE;
+
+    if ((numDevSections = xf86MatchDevice(ATI_DRIVER_NAME, &devSections)) <= 0)
+        return FALSE;
+
+    if (xf86GetPciVideoInfo() == NULL)
+        return FALSE;
+
+    numUsed = xf86MatchPciInstances(ATI_DRIVER_NAME, PCI_VENDOR_ATI,
+                                    Mach64Chipsets, Mach64PciChipsets,
+                                    devSections, numDevSections,
+                                    pDriver, &usedChips);
+    xfree(devSections);
+
+    if (numUsed <= 0)
+        return FALSE;
+
+    if (flags & PROBE_DETECT) {
+        ProbeSuccess = TRUE;
+    } else {
+        int  i;
+
+        for (i = 0; i < numUsed; i++) {
+            ScrnInfoPtr pScrn;
+            EntityInfoPtr pEnt;
+            pciVideoPtr pVideo;
+
+            pScrn = xf86ConfigPciEntity(NULL, 0, usedChips[i], Mach64PciChipsets,
+                                        0, 0, 0, 0, NULL);
+
+            if (!pScrn)
+                continue;
+
+            pEnt = xf86GetEntityInfo(usedChips[i]);
+            pVideo = xf86GetPciInfoForEntity(usedChips[i]);
+
+#ifdef XFree86LOADER
+
+            if (!xf86LoadSubModule(pScrn, "atimisc"))
+            {
+                xf86Msg(X_ERROR,
+                    ATI_NAME ":  Failed to load \"atimisc\" module.\n");
+                xf86DeleteScreen(pScrn->scrnIndex, 0);
+                continue;
+            }
+
+            xf86LoaderReqSymLists(ATISymbols, NULL);
+
+#endif
+
+            ATIFillInScreenInfo(pScrn);
+
+            pScrn->Probe = Mach64Probe;
+
+            ProbeSuccess = TRUE;
+        }
+    }
+
+    return ProbeSuccess;
+}
diff --git a/src/atimach64probe.h b/src/atimach64probe.h
new file mode 100644
index 0000000..24e85d8
--- /dev/null
+++ b/src/atimach64probe.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi at 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 ___ATIMACH64PROBE_H___
+#define ___ATIMACH64PROBE_H___ 1
+
+#include "xf86str.h"
+
+extern Bool Mach64Probe(DriverPtr, int);
+
+#endif /* ___ATIMACH64PROBE_H___ */
diff --git a/src/atipreinit.c b/src/atipreinit.c
index e18e27a..8ca16eb 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"
@@ -46,6 +45,7 @@
 #include "atimode.h"
 #include "atipreinit.h"
 #include "atiprint.h"
+#include "atiprobe.h"
 #include "atividmem.h"
 #include "atiwonderio.h"
 #include "atixv.h"
diff --git a/src/atiprobe.c b/src/atiprobe.c
index e869bf0..4a70f81 100644
--- a/src/atiprobe.c
+++ b/src/atiprobe.c
@@ -28,27 +28,15 @@
 #include <stdio.h>
 
 #include "ati.h"
-#include "atiadjust.h"
 #include "atibus.h"
 #include "atichip.h"
-#include "aticonsole.h"
-#include "atifillin.h"
-#include "atiident.h"
 #include "atimach64io.h"
 #include "atimodule.h"
-#include "atipreinit.h"
 #include "atiprobe.h"
-#include "atiscreen.h"
-#include "ativalid.h"
 #include "ativersion.h"
 #include "atividmem.h"
 #include "atiwonderio.h"
 
-#include "radeon_probe.h"
-#include "radeon_version.h"
-#include "r128_probe.h"
-#include "r128_version.h"
-
 #ifndef AVOID_CPIO
 
 /*
@@ -280,7 +268,7 @@ LastProbe:
  * This function looks for a Mach64 at a particular PIO address and returns an
  * ATIRec if one is found.
  */
-ATIPtr
+static ATIPtr
 ATIMach64Probe
 (
     ATIPtr            pATI,
@@ -530,214 +518,3 @@ SkipSparse:
 
     return ProbeSuccess;
 }
-
-static SymTabRec
-Mach64Chipsets[] = {
-    {ATI_CHIP_88800GXC, "ATI 88800GX-C"},
-    {ATI_CHIP_88800GXD, "ATI 88800GX-D"},
-    {ATI_CHIP_88800GXE, "ATI 88800GX-E"},
-    {ATI_CHIP_88800GXF, "ATI 88800GX-F"},
-    {ATI_CHIP_88800GX,  "ATI 88800GX"},
-    {ATI_CHIP_88800CX,  "ATI 88800CX"},
-    {ATI_CHIP_264CT,    "ATI 264CT"},
-    {ATI_CHIP_264ET,    "ATI 264ET"},
-    {ATI_CHIP_264VT,    "ATI 264VT"},
-    {ATI_CHIP_264VTB,   "ATI 264VT-B"},
-    {ATI_CHIP_264GT,    "ATI 3D Rage"},
-    {ATI_CHIP_264GTB,   "ATI 3D Rage II"},
-    {ATI_CHIP_264VT3,   "ATI 264VT3"},
-    {ATI_CHIP_264GTDVD, "ATI 3D Rage II+DVD"},
-    {ATI_CHIP_264LT,    "ATI 3D Rage LT"},
-    {ATI_CHIP_264VT4,   "ATI 264VT4"},
-    {ATI_CHIP_264GT2C,  "ATI 3D Rage IIc"},
-    {ATI_CHIP_264GTPRO, "ATI 3D Rage Pro"},
-    {ATI_CHIP_264LTPRO, "ATI 3D Rage LT Pro"},
-    {ATI_CHIP_264XL,    "ATI 3D Rage XL or XC"},
-    {ATI_CHIP_MOBILITY, "ATI 3D Rage Mobility"},
-    {-1,      NULL }
-};
-
-/*
- * This table maps a PCI device ID to a chipset family identifier.
- */
-static PciChipsets
-Mach64PciChipsets[] = {
-    {ATI_CHIP_88800GX,   PCI_CHIP_MACH64GX,  RES_SHARED_VGA},
-    {ATI_CHIP_88800CX,   PCI_CHIP_MACH64CX,  RES_SHARED_VGA},
-    {ATI_CHIP_264CT,     PCI_CHIP_MACH64CT,  RES_SHARED_VGA},
-    {ATI_CHIP_264ET,     PCI_CHIP_MACH64ET,  RES_SHARED_VGA},
-    {ATI_CHIP_264VT,     PCI_CHIP_MACH64VT,  RES_SHARED_VGA},
-    {ATI_CHIP_264GT,     PCI_CHIP_MACH64GT,  RES_SHARED_VGA},
-    {ATI_CHIP_264VT3,    PCI_CHIP_MACH64VU,  RES_SHARED_VGA},
-    {ATI_CHIP_264GTDVD,  PCI_CHIP_MACH64GU,  RES_SHARED_VGA},
-    {ATI_CHIP_264LT,     PCI_CHIP_MACH64LG,  RES_SHARED_VGA},
-    {ATI_CHIP_264VT4,    PCI_CHIP_MACH64VV,  RES_SHARED_VGA},
-    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GV,  RES_SHARED_VGA},
-    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GW,  RES_SHARED_VGA},
-    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GY,  RES_SHARED_VGA},
-    {ATI_CHIP_264GT2C,   PCI_CHIP_MACH64GZ,  RES_SHARED_VGA},
-    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GB,  RES_SHARED_VGA},
-    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GD,  RES_SHARED_VGA},
-    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GI,  RES_SHARED_VGA},
-    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GP,  RES_SHARED_VGA},
-    {ATI_CHIP_264GTPRO,  PCI_CHIP_MACH64GQ,  RES_SHARED_VGA},
-    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LB,  RES_SHARED_VGA},
-    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LD,  RES_SHARED_VGA},
-    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LI,  RES_SHARED_VGA},
-    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LP,  RES_SHARED_VGA},
-    {ATI_CHIP_264LTPRO,  PCI_CHIP_MACH64LQ,  RES_SHARED_VGA},
-    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GL,  RES_SHARED_VGA},
-    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GM,  RES_SHARED_VGA},
-    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GN,  RES_SHARED_VGA},
-    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GO,  RES_SHARED_VGA},
-    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GR,  RES_SHARED_VGA},
-    {ATI_CHIP_264XL,     PCI_CHIP_MACH64GS,  RES_SHARED_VGA},
-    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LM,  RES_SHARED_VGA},
-    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LN,  RES_SHARED_VGA},
-    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LR,  RES_SHARED_VGA},
-    {ATI_CHIP_MOBILITY,  PCI_CHIP_MACH64LS,  RES_SHARED_VGA},
-    {-1, -1, RES_UNDEFINED}
-};
-
-/*
- * Mach64Probe --
- *
- * This function is called once, at the start of the first server generation to
- * do a minimal probe for supported hardware.
- */
-static Bool
-Mach64Probe(DriverPtr pDriver, int flags)
-{
-    GDevPtr  *devSections;
-    int  *usedChips;
-    int  numDevSections;
-    int  numUsed;
-    Bool  ProbeSuccess = FALSE;
-
-    if ((numDevSections = xf86MatchDevice(ATI_DRIVER_NAME, &devSections)) <= 0)
-        return FALSE;
-
-    if (xf86GetPciVideoInfo() == NULL)
-        return FALSE;
-
-    numUsed = xf86MatchPciInstances(ATI_DRIVER_NAME, PCI_VENDOR_ATI,
-                                    Mach64Chipsets, Mach64PciChipsets,
-                                    devSections, numDevSections,
-                                    pDriver, &usedChips);
-    xfree(devSections);
-
-    if (numUsed <= 0)
-        return FALSE;
-
-    if (flags & PROBE_DETECT) {
-        ProbeSuccess = TRUE;
-    } else {
-        int  i;
-
-        for (i = 0; i < numUsed; i++) {
-            ScrnInfoPtr pScrn;
-            EntityInfoPtr pEnt;
-            pciVideoPtr pVideo;
-
-            pScrn = xf86ConfigPciEntity(NULL, 0, usedChips[i], Mach64PciChipsets,
-                                        0, 0, 0, 0, NULL);
-
-            if (!pScrn)
-                continue;
-
-            pEnt = xf86GetEntityInfo(usedChips[i]);
-            pVideo = xf86GetPciInfoForEntity(usedChips[i]);
-
-#ifdef XFree86LOADER
-
-            if (!xf86LoadSubModule(pScrn, "atimisc"))
-            {
-                xf86Msg(X_ERROR,
-                    ATI_NAME ":  Failed to load \"atimisc\" module.\n");
-                xf86DeleteScreen(pScrn->scrnIndex, 0);
-                continue;
-            }
-
-            xf86LoaderReqSymLists(ATISymbols, NULL);
-
-#endif
-
-            ATIFillInScreenInfo(pScrn);
-
-            pScrn->Probe = Mach64Probe;
-
-            ProbeSuccess = TRUE;
-        }
-    }
-
-    return ProbeSuccess;
-}
-
-/*
- * ATIProbe --
- *
- * This function is called once, at the start of the first server generation to
- * do a minimal probe for supported hardware.
- */
-Bool
-ATIProbe
-(
-    DriverPtr pDriver,
-    int       flags
-)
-{
-    pciVideoPtr pVideo, *xf86PciVideoInfo = xf86GetPciVideoInfo();
-    Bool        ProbeSuccess = FALSE;
-    Bool        DoMach64 = FALSE;
-    Bool        DoRage128 = FALSE, DoRadeon = FALSE;
-    int         i;
-    ATIChipType Chip;
-
-    if (!(flags & PROBE_DETECT))
-    {
-        if (xf86MatchDevice(ATI_NAME, NULL) > 0)
-            DoMach64 = TRUE;
-        if (xf86MatchDevice(R128_NAME, NULL) > 0)
-            DoRage128 = TRUE;
-        if (xf86MatchDevice(RADEON_NAME, NULL) > 0)
-            DoRadeon = TRUE;
-    }
-
-    if (xf86PciVideoInfo)
-    {
-        for (i = 0;  (pVideo = xf86PciVideoInfo[i++]);  )
-        {
-            if ((pVideo->vendor != PCI_VENDOR_ATI) ||
-                (pVideo->chipType == PCI_CHIP_MACH32))
-                continue;
-
-            /* Check for Rage128's, Radeon's and later adapters */
-            Chip = ATIChipID(pVideo->chipType, pVideo->chipRev);
-            if (Chip > ATI_CHIP_Mach64)
-            {
-                if (Chip <= ATI_CHIP_Rage128)
-                    DoRage128 = TRUE;
-                else if (Chip <= ATI_CHIP_Radeon)
-                    DoRadeon = TRUE;
-
-                continue;
-            }
-
-            DoMach64 = TRUE;
-        }
-    }
-
-    /* Call Mach64 driver probe */
-    if (DoMach64 && Mach64Probe(pDriver, flags))
-        ProbeSuccess = TRUE;
-
-    /* Call Rage 128 driver probe */
-    if (DoRage128 && R128Probe(pDriver, flags))
-        ProbeSuccess = TRUE;
-
-    /* Call Radeon driver probe */
-    if (DoRadeon && RADEONProbe(pDriver, flags))
-        ProbeSuccess = TRUE;
-
-    return ProbeSuccess;
-}
diff --git a/src/atiprobe.h b/src/atiprobe.h
index 4081fb3..6195eb4 100644
--- a/src/atiprobe.h
+++ b/src/atiprobe.h
@@ -25,6 +25,6 @@
 
 #include "xf86str.h"
 
-extern Bool ATIProbe(DriverPtr, int);
+extern Bool ATIMach64ProbeIO(pciVideoPtr, ATIPtr);
 
 #endif /* ___ATIPROBE_H___ */



More information about the xorg-commit mailing list