summaryrefslogtreecommitdiff
path: root/src/atiprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atiprobe.c')
-rw-r--r--src/atiprobe.c76
1 files changed, 31 insertions, 45 deletions
diff --git a/src/atiprobe.c b/src/atiprobe.c
index 221ac33..ec86179 100644
--- a/src/atiprobe.c
+++ b/src/atiprobe.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c,v 1.62 2004/01/05 16:42:04 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c,v 1.62tsi Exp $ */
/*
* Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
*
@@ -214,6 +214,8 @@ ATICheckSparseIOBases
return DoProbe;
}
+#ifndef AVOID_NON_PCI
+
/*
* ATIClaimSparseIOBases --
*
@@ -236,6 +238,8 @@ ATIClaimSparseIOBases
ProbeFlags[FirstPort] = ProbeFlag;
}
+#endif /* AVOID_NON_PCI */
+
/*
* ATIVGAProbe --
*
@@ -803,9 +807,8 @@ ATIAssignVGA
outb(VGA_DAC_MASK, 0xA5U);
if (inb(IBM_DAC_MASK) == 0xA5U)
pATI->VGAAdapter = ATI_ADAPTER_VGA;
+ outb(VGA_DAC_MASK, OldDACMask);
}
-
- outb(VGA_DAC_MASK, OldDACMask);
}
break;
@@ -825,10 +828,9 @@ ATIAssignVGA
outb(VGA_DAC_MASK, 0xA5U);
if (inb(IBM_DAC_MASK) == 0xA5U)
pATI->VGAAdapter = ATI_ADAPTER_VGA;
+ outb(VGA_DAC_MASK, OldDACMask);
}
- outb(VGA_DAC_MASK, OldDACMask);
-
if (ClockSel & DISABPASSTHRU)
outw(CLOCK_SEL, ClockSel);
}
@@ -854,10 +856,9 @@ ATIAssignVGA
outb(VGA_DAC_MASK, 0xA5U);
if (inb(IBM_DAC_MASK) == 0xA5U)
pATI->VGAAdapter = ATI_ADAPTER_MACH32;
+ outb(VGA_DAC_MASK, OldDACMask);
}
- outb(VGA_DAC_MASK, OldDACMask);
-
if (ClockSel & DISABPASSTHRU)
outw(CLOCK_SEL, ClockSel);
if (MiscOptions & (DISABLE_VGA | DISABLE_DAC))
@@ -879,10 +880,9 @@ ATIAssignVGA
outb(VGA_DAC_MASK, 0xA5U);
if (in8(M64_DAC_MASK) == 0xA5U)
pATI->VGAAdapter = ATI_ADAPTER_MACH64;
+ outb(VGA_DAC_MASK, OldDACMask);
}
- outb(VGA_DAC_MASK, OldDACMask);
-
if (!(DACCntl & DAC_VGA_ADR_EN))
outr(DAC_CNTL, DACCntl);
}
@@ -927,6 +927,8 @@ ATIAssignVGA
xf86MsgVerb(X_INFO, 3, ATI_NAME ": VGA assigned to this adapter.\n");
}
+#ifndef AVOID_NON_PCI
+
/*
* ATIClaimVGA --
*
@@ -955,6 +957,8 @@ ATIClaimVGA
ATIClaimSparseIOBases(ProbeFlags, pATI->CPIO_VGAWonder, 2, Detected);
}
+#endif /* AVOID_NON_PCI */
+
/*
* ATIFindVGA --
*
@@ -1217,6 +1221,8 @@ ATIProbe
xfree(PCIPorts);
+#ifndef AVOID_NON_PCI
+
/*
* A note on probe strategy. I/O and memory response by certain PCI
* devices has been disabled by the common layer at this point,
@@ -1328,6 +1334,9 @@ ATIProbe
ATIClaimSparseIOBases(ProbeFlags, Mach64SparseIOBases[i], 4,
DetectedMach64);
}
+
+#endif /* AVOID_NON_PCI */
+
}
#endif /* AVOID_CPIO */
@@ -1493,6 +1502,8 @@ ATIProbe
pVideo->bus, pVideo->device, pVideo->func);
break;
+#ifndef AVOID_NON_PCI
+
case Detected8514A:
if ((p8514->BusType >= ATI_BUS_PCI) && !p8514->PCIInfo)
p8514->PCIInfo = pVideo;
@@ -1514,6 +1525,8 @@ ATIProbe
pVideo->bus, pVideo->device, pVideo->func);
break;
+#endif /* AVOID_NON_PCI */
+
default: /* Must be DoProbe */
if (!xf86CheckPciSlot(pVideo->bus,
pVideo->device,
@@ -1587,6 +1600,8 @@ ATIProbe
pVideo->bus, pVideo->device, pVideo->func);
break;
+#ifndef AVOID_NON_PCI
+
case Detected8514A:
xf86Msg(X_WARNING,
ATI_NAME ": PCI Mach64 in slot %d:%d:%d will not"
@@ -1610,6 +1625,8 @@ ATIProbe
Mach64SparseIOBases[j]);
break;
+#endif /* AVOID_NON_PCI */
+
default: /* Must be DoProbe */
if (!xf86CheckPciSlot(pVideo->bus,
pVideo->device,
@@ -1724,43 +1741,12 @@ ATIProbe
Chip = ATIChipID(pVideo->chipType, pVideo->chipRev);
if (Chip > ATI_CHIP_Mach64)
{
- switch (Chip)
- {
- case ATI_CHIP_RAGE128GL:
- case ATI_CHIP_RAGE128VR:
- case ATI_CHIP_RAGE128PROULTRA:
- case ATI_CHIP_RAGE128PROGL:
- case ATI_CHIP_RAGE128PROVR:
- case ATI_CHIP_RAGE128MOBILITY3:
- case ATI_CHIP_RAGE128MOBILITY4:
- DoRage128 = TRUE;
- continue;
-
- case ATI_CHIP_RADEON:
- case ATI_CHIP_RADEONVE:
- case ATI_CHIP_RADEONMOBILITY6:
- case ATI_CHIP_RS100:
- case ATI_CHIP_RS200:
- case ATI_CHIP_RS250:
- case ATI_CHIP_RADEONMOBILITY7:
- case ATI_CHIP_R200:
- case ATI_CHIP_RV200:
- case ATI_CHIP_RV250:
- case ATI_CHIP_RADEONMOBILITY9:
- case ATI_CHIP_RS300:
- case ATI_CHIP_RV280:
- case ATI_CHIP_RADEONMOBILITY9PLUS:
- case ATI_CHIP_R300:
- case ATI_CHIP_RV350:
- case ATI_CHIP_R350:
- case ATI_CHIP_R360:
- DoRadeon = TRUE;
- continue;
+ if (Chip <= ATI_CHIP_Rage128)
+ DoRage128 = TRUE;
+ else if (Chip <= ATI_CHIP_Radeon)
+ DoRadeon = TRUE;
- case ATI_CHIP_HDTV:
- default:
- continue;
- }
+ continue;
}
if (!nATIGDev)