summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2007-03-23 22:19:17 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-03-23 23:27:40 +0200
commitf046a910ca117279fbabc6281b2e23439ec9ea4e (patch)
tree58639541b6be9ab2bd782e786e5fd8bc8594a5cf
parent9cd175d9cd4ed710fccb303664c77519ecaf1e21 (diff)
Drop probing by driver name from "Device" section.
atimisc is PCI-only now, so we only need to scan the PCI space.
-rw-r--r--src/ati.c47
1 files changed, 17 insertions, 30 deletions
diff --git a/src/ati.c b/src/ati.c
index fa7d9e8..4ef53e3 100644
--- a/src/ati.c
+++ b/src/ati.c
@@ -101,44 +101,31 @@ ATIProbe
int flags
)
{
- pciVideoPtr pVideo, *xf86PciVideoInfo = xf86GetPciVideoInfo();
+ pciVideoPtr pVideo;
+ pciVideoPtr *xf86PciVideoInfo;
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;
- }
+ xf86PciVideoInfo = xf86GetPciVideoInfo();
- if (xf86PciVideoInfo)
+ if (xf86PciVideoInfo == NULL)
+ return FALSE;
+
+ while ((pVideo = *xf86PciVideoInfo++) != NULL)
{
- 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;
- }
+ 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)
DoMach64 = TRUE;
- }
+ else if (Chip <= ATI_CHIP_Rage128)
+ DoRage128 = TRUE;
+ else if (Chip <= ATI_CHIP_Radeon)
+ DoRadeon = TRUE;
}
/* Call Radeon driver probe */