summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am3
-rw-r--r--src/atifillin.c47
-rw-r--r--src/atifillin.h41
-rw-r--r--src/atimach64probe.c45
-rw-r--r--src/atiprobe.c1
-rw-r--r--src/r128_driver.c15
-rw-r--r--src/r128_probe.c13
-rw-r--r--src/r128_probe.h2
-rw-r--r--src/radeon_driver.c18
-rw-r--r--src/radeon_probe.c17
-rw-r--r--src/radeon_probe.h2
11 files changed, 55 insertions, 149 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 197c486..1da3740 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -59,7 +59,7 @@ 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 \
+ 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 \
@@ -123,7 +123,6 @@ EXTRA_DIST = \
atidri.h \
atidripriv.h \
atidsp.h \
- atifillin.h \
ati.h \
atii2c.h \
atiload.h \
diff --git a/src/atifillin.c b/src/atifillin.c
deleted file mode 100644
index 41d4964..0000000
--- a/src/atifillin.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2004 Adam Jackson.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * atifillin.c: fill in a ScrnInfoPtr with the relevant information for
- * atimisc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "atifillin.h"
-
-void ATIFillInScreenInfo(ScrnInfoPtr pScreenInfo)
-{
- pScreenInfo->driverVersion = ATI_VERSION_CURRENT;
- pScreenInfo->driverName = ATI_DRIVER_NAME;
- pScreenInfo->name = ATI_NAME;
- pScreenInfo->PreInit = ATIPreInit;
- pScreenInfo->ScreenInit = ATIScreenInit;
- pScreenInfo->SwitchMode = ATISwitchMode;
- pScreenInfo->AdjustFrame = ATIAdjustFrame;
- pScreenInfo->EnterVT = ATIEnterVT;
- pScreenInfo->LeaveVT = ATILeaveVT;
- pScreenInfo->FreeScreen = ATIFreeScreen;
- pScreenInfo->ValidMode = ATIValidMode;
-}
diff --git a/src/atifillin.h b/src/atifillin.h
deleted file mode 100644
index 7d5e54d..0000000
--- a/src/atifillin.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2004 Adam Jackson.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * atifillin.h: header for atifillin.c.
- */
-
-#ifndef ATI_FILLIN_H
-#define ATI_FILLIN_H
-
-/* include headers corresponding to fields touched by ATIFillInScreenInfo() */
-
-#include "ativersion.h"
-#include "atipreinit.h"
-#include "atiscreen.h"
-#include "aticonsole.h"
-#include "atiadjust.h"
-#include "ativalid.h"
-
-extern void ATIFillInScreenInfo(ScrnInfoPtr);
-
-#endif
diff --git a/src/atimach64probe.c b/src/atimach64probe.c
index cff8bfb..043cad9 100644
--- a/src/atimach64probe.c
+++ b/src/atimach64probe.c
@@ -26,13 +26,18 @@
#include "ati.h"
#include "atichip.h"
-#include "atifillin.h"
-#include "atimodule.h"
#include "atimach64io.h"
#include "atimach64probe.h"
#include "atioption.h"
#include "ativersion.h"
+/* include headers corresponding to ScrnInfoPtr fields */
+#include "atipreinit.h"
+#include "atiscreen.h"
+#include "aticonsole.h"
+#include "atiadjust.h"
+#include "ativalid.h"
+
static SymTabRec
Mach64Chipsets[] = {
{ATI_CHIP_88800GXC, "ATI 88800GX-C"},
@@ -135,16 +140,16 @@ Mach64Identify
_X_EXPORT Bool
Mach64Probe(DriverPtr pDriver, int flags)
{
- GDevPtr *devSections;
- int *usedChips;
- int numDevSections;
- int numUsed;
- Bool ProbeSuccess = FALSE;
+ GDevPtr *devSections;
+ int *usedChips;
+ int numDevSections;
+ int numUsed;
+ Bool ProbeSuccess = FALSE;
- if ((numDevSections = xf86MatchDevice(ATI_DRIVER_NAME, &devSections)) <= 0)
+ if (xf86GetPciVideoInfo() == NULL)
return FALSE;
- if (xf86GetPciVideoInfo() == NULL)
+ if ((numDevSections = xf86MatchDevice(ATI_DRIVER_NAME, &devSections)) <= 0)
return FALSE;
numUsed = xf86MatchPciInstances(ATI_DRIVER_NAME, PCI_VENDOR_ATI,
@@ -163,8 +168,6 @@ Mach64Probe(DriverPtr pDriver, int flags)
for (i = 0; i < numUsed; i++) {
ScrnInfoPtr pScrn;
- EntityInfoPtr pEnt;
- pciVideoPtr pVideo;
pScrn = xf86ConfigPciEntity(NULL, 0, usedChips[i], Mach64PciChipsets,
0, 0, 0, 0, NULL);
@@ -172,16 +175,24 @@ Mach64Probe(DriverPtr pDriver, int flags)
if (!pScrn)
continue;
- pEnt = xf86GetEntityInfo(usedChips[i]);
- pVideo = xf86GetPciInfoForEntity(usedChips[i]);
-
- ATIFillInScreenInfo(pScrn);
-
- pScrn->Probe = Mach64Probe;
+ pScrn->driverVersion = ATI_VERSION_CURRENT;
+ pScrn->driverName = ATI_DRIVER_NAME;
+ pScrn->name = ATI_NAME;
+ pScrn->Probe = Mach64Probe;
+ pScrn->PreInit = ATIPreInit;
+ pScrn->ScreenInit = ATIScreenInit;
+ pScrn->SwitchMode = ATISwitchMode;
+ pScrn->AdjustFrame = ATIAdjustFrame;
+ pScrn->EnterVT = ATIEnterVT;
+ pScrn->LeaveVT = ATILeaveVT;
+ pScrn->FreeScreen = ATIFreeScreen;
+ pScrn->ValidMode = ATIValidMode;
ProbeSuccess = TRUE;
}
}
+ xfree(usedChips);
+
return ProbeSuccess;
}
diff --git a/src/atiprobe.c b/src/atiprobe.c
index 4a70f81..5f22032 100644
--- a/src/atiprobe.c
+++ b/src/atiprobe.c
@@ -31,7 +31,6 @@
#include "atibus.h"
#include "atichip.h"
#include "atimach64io.h"
-#include "atimodule.h"
#include "atiprobe.h"
#include "ativersion.h"
#include "atividmem.h"
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 01276e0..b03bd42 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -4605,18 +4605,3 @@ static int r128_set_backlight_enable(ScrnInfoPtr pScrn, int on)
return 0;
}
-
-void R128FillInScreenInfo(ScrnInfoPtr pScrn)
-{
- pScrn->driverVersion = R128_VERSION_CURRENT;
- pScrn->driverName = R128_DRIVER_NAME;
- pScrn->name = R128_NAME;
- pScrn->PreInit = R128PreInit;
- pScrn->ScreenInit = R128ScreenInit;
- pScrn->SwitchMode = R128SwitchMode;
- pScrn->AdjustFrame = R128AdjustFrame;
- pScrn->EnterVT = R128EnterVT;
- pScrn->LeaveVT = R128LeaveVT;
- pScrn->FreeScreen = R128FreeScreen;
- pScrn->ValidMode = R128ValidMode;
-}
diff --git a/src/r128_probe.c b/src/r128_probe.c
index 836f1d0..81ff663 100644
--- a/src/r128_probe.c
+++ b/src/r128_probe.c
@@ -41,7 +41,6 @@
* Modified by Marc Aurele La France <tsi@xfree86.org> for ATI driver merge.
*/
-#include "atimodule.h"
#include "ativersion.h"
#include "r128_probe.h"
@@ -194,8 +193,18 @@ R128Probe(DriverPtr drv, int flags)
if((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
R128PciChipsets, 0, 0, 0, 0, 0)))
{
+ pScrn->driverVersion = R128_VERSION_CURRENT;
+ pScrn->driverName = R128_DRIVER_NAME;
+ pScrn->name = R128_NAME;
pScrn->Probe = R128Probe;
- R128FillInScreenInfo(pScrn);
+ pScrn->PreInit = R128PreInit;
+ pScrn->ScreenInit = R128ScreenInit;
+ pScrn->SwitchMode = R128SwitchMode;
+ pScrn->AdjustFrame = R128AdjustFrame;
+ pScrn->EnterVT = R128EnterVT;
+ pScrn->LeaveVT = R128LeaveVT;
+ pScrn->FreeScreen = R128FreeScreen;
+ pScrn->ValidMode = R128ValidMode;
foundScreen = TRUE;
diff --git a/src/r128_probe.h b/src/r128_probe.h
index 9150296..180e52a 100644
--- a/src/r128_probe.h
+++ b/src/r128_probe.h
@@ -73,6 +73,4 @@ extern ModeStatus R128ValidMode(int, DisplayModePtr, Bool, int);
extern const OptionInfoRec * R128OptionsWeak(void);
-extern void R128FillInScreenInfo(ScrnInfoPtr);
-
#endif /* _R128_PROBE_H_ */
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 0a79483..28580a5 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -7619,21 +7619,3 @@ static void RADEONSetDynamicClock(ScrnInfoPtr pScrn, int mode)
break;
}
}
-
-void RADEONFillInScreenInfo(ScrnInfoPtr pScrn)
-{
- pScrn->driverVersion = RADEON_VERSION_CURRENT;
- pScrn->driverName = RADEON_DRIVER_NAME;
- pScrn->name = RADEON_NAME;
- pScrn->PreInit = RADEONPreInit;
- pScrn->ScreenInit = RADEONScreenInit;
- pScrn->SwitchMode = RADEONSwitchMode;
-#ifdef X_XF86MiscPassMessage
- pScrn->HandleMessage = RADEONHandleMessage;
-#endif
- pScrn->AdjustFrame = RADEONAdjustFrame;
- pScrn->EnterVT = RADEONEnterVT;
- pScrn->LeaveVT = RADEONLeaveVT;
- pScrn->FreeScreen = RADEONFreeScreen;
- pScrn->ValidMode = RADEONValidMode;
-}
diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 4ff11ea..d7ff643 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -40,7 +40,6 @@
* Modified by Marc Aurele La France <tsi@xfree86.org> for ATI driver merge.
*/
-#include "atimodule.h"
#include "ativersion.h"
#include "radeon_probe.h"
@@ -285,8 +284,22 @@ RADEONProbe(DriverPtr drv, int flags)
if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
RADEONPciChipsets, 0, 0, 0,
0, 0))) {
+ pScrn->driverVersion = RADEON_VERSION_CURRENT;
+ pScrn->driverName = RADEON_DRIVER_NAME;
+ pScrn->name = RADEON_NAME;
pScrn->Probe = RADEONProbe;
- RADEONFillInScreenInfo(pScrn);
+ pScrn->PreInit = RADEONPreInit;
+ pScrn->ScreenInit = RADEONScreenInit;
+ pScrn->SwitchMode = RADEONSwitchMode;
+#ifdef X_XF86MiscPassMessage
+ pScrn->HandleMessage = RADEONHandleMessage;
+#endif
+ pScrn->AdjustFrame = RADEONAdjustFrame;
+ pScrn->EnterVT = RADEONEnterVT;
+ pScrn->LeaveVT = RADEONLeaveVT;
+ pScrn->FreeScreen = RADEONFreeScreen;
+ pScrn->ValidMode = RADEONValidMode;
+
foundScreen = TRUE;
}
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index b651e7d..f446516 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -172,6 +172,4 @@ extern ModeStatus RADEONValidMode(int, DisplayModePtr, Bool, int);
extern const OptionInfoRec *RADEONOptionsWeak(void);
-extern void RADEONFillInScreenInfo(ScrnInfoPtr);
-
#endif /* _RADEON_PROBE_H_ */