diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
commit | 2eab4a4e2b8f2ec2154738f0dd57cf0dc5c7816a (patch) | |
tree | add0e49232de50548191a4243ed0d32cc91d1ec5 /src/atiprobe.c | |
parent | 770358c0804c3e919440d2575e4ef25365f763b6 (diff) |
merge latest (4.3.99.16) from XFree86 (vendor) branch
Diffstat (limited to 'src/atiprobe.c')
-rw-r--r-- | src/atiprobe.c | 71 |
1 files changed, 44 insertions, 27 deletions
diff --git a/src/atiprobe.c b/src/atiprobe.c index 05d2f34..e910eed 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.54 2003/01/01 19:16:33 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/atiprobe.c,v 1.61 2003/11/07 13:45:26 tsi Exp $ */ /* * Copyright 1997 through 2003 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * @@ -206,7 +206,7 @@ ATICheckSparseIOBases /* User might wish to override this decision */ xf86Msg(X_WARNING, - ATI_NAME ": Sparse I/O base 0x%04X not probed.\n", IOBase); + ATI_NAME ": Sparse I/O base 0x%04lX not probed.\n", IOBase); return Allowed; } } @@ -279,7 +279,9 @@ ATIVGAProbe pVGA->Adapter = ATI_ADAPTER_VGA; } else + { pVGA->VGAAdapter = ATI_ADAPTER_NONE; + } return pVGA; } @@ -308,7 +310,7 @@ ATIVGAWonderProbe case 0: xf86Msg(X_WARNING, ATI_NAME ": Expected VGA Wonder capability could not be" - " detected at I/O port 0x%04X because it would conflict with" + " detected at I/O port 0x%04lX because it would conflict with" " a non-video PCI/AGP device.\n", pATI->CPIO_VGAWonder); pATI->CPIO_VGAWonder = 0; break; @@ -316,7 +318,7 @@ ATIVGAWonderProbe case Detected8514A: xf86Msg(X_WARNING, ATI_NAME ": Expected VGA Wonder capability could not be" - " detected at I/O port 0x%04X because it would conflict with" + " detected at I/O port 0x%04lX because it would conflict with" " a %s %s.\n", pATI->CPIO_VGAWonder, ATIBusNames[p8514->BusType], ATIAdapterNames[p8514->Adapter]); pATI->CPIO_VGAWonder = 0; @@ -325,7 +327,7 @@ ATIVGAWonderProbe case DetectedMach64: xf86Msg(X_WARNING, ATI_NAME ": Expected VGA Wonder capability could not be" - " detected at I/O port 0x%04X because it would conflict with" + " detected at I/O port 0x%04lX because it would conflict with" " a Mach64.\n", pATI->CPIO_VGAWonder); pATI->CPIO_VGAWonder = 0; break; @@ -365,14 +367,14 @@ ATIVGAWonderProbe (IOValue6 == 0)) { xf86MsgVerb(X_INFO, 3, - ATI_NAME ": VGA Wonder at I/O port 0x%04X detected.\n", + ATI_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" - " 0x%04X was not detected.\n", pATI->CPIO_VGAWonder); + " 0x%04lX was not detected.\n", pATI->CPIO_VGAWonder); pATI->CPIO_VGAWonder = 0; } break; @@ -525,13 +527,13 @@ ATI8514Probe #endif /* AVOID_CPIO */ /* - * ATIDetectMach64 -- + * ATIMach64Detect -- * * This function determines if a Mach64 is detectable at a particular base * address. */ static Bool -ATIDetectMach64 +ATIMach64Detect ( ATIPtr pATI, const CARD16 ChipType, @@ -662,11 +664,11 @@ ATIMach64Probe { pATI->Block0Base += 0x007FFC00U; if ((pVideo->size[0] >= 23) && - ATIDetectMach64(pATI, ChipType, Chip)) + ATIMach64Detect(pATI, ChipType, Chip)) return pATI; pATI->Block0Base -= 0x00400000U; - if (ATIDetectMach64(pATI, ChipType, Chip)) + if (ATIMach64Detect(pATI, ChipType, Chip)) return pATI; } } @@ -679,7 +681,7 @@ ATIMach64Probe pATI->Block0Base = 0x000BFC00U; LastProbe: - if (ATIDetectMach64(pATI, ChipType, Chip)) + if (ATIMach64Detect(pATI, ChipType, Chip)) return pATI; xfree(pATI); @@ -725,7 +727,7 @@ ATIMach64Probe pATI->CPIODecoding = IODecoding; pATI->PCIInfo = pVideo; - if (!ATIDetectMach64(pATI, ChipType, Chip)) + if (!ATIMach64Detect(pATI, ChipType, Chip)) { xfree(pATI); return NULL; @@ -736,7 +738,9 @@ ATIMach64Probe * controllers. For the GX/CX, it's a board strap. */ if (pATI->Chip >= ATI_CHIP_264CT) + { pATI->VGAAdapter = ATI_ADAPTER_MACH64; + } else { IOValue = inr(CONFIG_STATUS64_0); @@ -1155,11 +1159,10 @@ ATIProbe { for (i = 0; (pVideo = xf86PciVideoInfo[i++]); ) { - if (pVideo->vendor == PCI_VENDOR_ATI) + if ((pVideo->vendor == PCI_VENDOR_ATI) || + !(pPCI = pVideo->thisCard)) continue; - pPCI = pVideo->thisCard; - ATIScanPCIBases(&PCIPorts, &nPCIPort, &pPCI->pci_base0, pVideo->size, (pciReadLong(pPCI->tag, PCI_CMD_STAT_REG) & @@ -1297,7 +1300,7 @@ ATIProbe 4, fChipsets[ATI_CHIPSET_MACH64]) != DoProbe) { xf86MsgVerb(X_INFO, 2, - ATI_NAME ": Unshared Mach64 at PIO base 0x%04X not" + ATI_NAME ": Unshared Mach64 at PIO base 0x%04lX not" " probed.\n", Mach64SparseIOBases[i]); continue; @@ -1307,7 +1310,7 @@ ATIProbe if (!pATI) { xf86MsgVerb(X_INFO, 4, - ATI_NAME ": Unshared Mach64 at PIO base 0x%04X not" + ATI_NAME ": Unshared Mach64 at PIO base 0x%04lX not" " detected.\n", Mach64SparseIOBases[i]); continue; } @@ -1343,10 +1346,10 @@ ATIProbe { if ((pVideo->vendor != PCI_VENDOR_ATI) || (pVideo->chipType == PCI_CHIP_MACH32) || - pVideo->size[1]) + pVideo->size[1] || + !(pPCI = pVideo->thisCard)) continue; - pPCI = pVideo->thisCard; PciReg = pciReadLong(pPCI->tag, PCI_REG_USERCONFIG); /* Possibly fix block I/O indicator */ @@ -1367,7 +1370,7 @@ ATIProbe "Unshared PCI sparse I/O Mach64 in slot %d:%d:%d", pVideo->bus, pVideo->device, pVideo->func); xf86MsgVerb(X_INFO, 3, - ATI_NAME ": %s detected through Block 0 at 0x%08X.\n", + ATI_NAME ": %s detected through Block 0 at 0x%08lX.\n", Identifier, pATI->Block0Base); AddAdapter(pATI); pATI->PCIInfo = pVideo; @@ -1384,11 +1387,10 @@ ATIProbe /* For now, ignore Rage128's and Radeon's */ Chip = ATIChipID(pVideo->chipType, pVideo->chipRev); - if (Chip > ATI_CHIP_Mach64) + if ((Chip > ATI_CHIP_Mach64) || + !(pPCI = pVideo->thisCard)) continue; - pPCI = pVideo->thisCard; - /* * Possibly fix block I/O indicator in PCI configuration space. */ @@ -1521,10 +1523,12 @@ ATIProbe xf86SetPciVideo(pVideo, MEM_IO); if (!(pATI = ATI8514Probe(pVideo))) + { xf86Msg(X_WARNING, ATI_NAME ": PCI Mach32 in slot %d:%d:%d could" " not be detected!\n", pVideo->bus, pVideo->device, pVideo->func); + } else { sprintf(Identifier, @@ -1565,11 +1569,13 @@ ATIProbe PciReg = pciReadLong(pPCI->tag, PCI_REG_USERCONFIG); j = PciReg & 0x03U; if (j == 0x03U) + { xf86Msg(X_WARNING, ATI_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", pVideo->bus, pVideo->device, pVideo->func); + } else switch(ATICheckSparseIOBases(pVideo, ProbeFlags, Mach64SparseIOBases[j], 4, TRUE)) { @@ -1598,7 +1604,7 @@ ATIProbe ATI_NAME ": PCI Mach64 in slot %d:%d:%d will" " not be enabled\n because it conflicts with" " another %s Mach64 at sparse I/O base" - " 0x%04X.\n", + " 0x%04lX.\n", pVideo->bus, pVideo->device, pVideo->func, ATIBusNames[pATI->BusType], Mach64SparseIOBases[j]); @@ -1621,17 +1627,19 @@ ATIProbe pATI = ATIMach64Probe(pVideo, Mach64SparseIOBases[j], SPARSE_IO, Chip); if (!pATI) + { xf86Msg(X_WARNING, ATI_NAME ": PCI Mach64 in slot %d:%d:%d could" " not be detected!\n", pVideo->bus, pVideo->device, pVideo->func); + } else { sprintf(Identifier, "Shared PCI Mach64 in slot %d:%d:%d", pVideo->bus, pVideo->device, pVideo->func); xf86MsgVerb(X_INFO, 3, - ATI_NAME ": %s with sparse PIO base 0x%04X" + ATI_NAME ": %s with sparse PIO base 0x%04lX" " detected.\n", Identifier, Mach64SparseIOBases[j]); AddAdapter(pATI); @@ -1681,7 +1689,7 @@ ATIProbe sprintf(Identifier, "Shared PCI Mach64 in slot %d:%d:%d", pVideo->bus, pVideo->device, pVideo->func); xf86MsgVerb(X_INFO, 3, - ATI_NAME ": %s with Block 0 base 0x%08X detected.\n", + ATI_NAME ": %s with Block 0 base 0x%08lX detected.\n", Identifier, pATI->Block0Base); AddAdapter(pATI); pATI->SharedAccelerator = TRUE; @@ -1731,12 +1739,21 @@ ATIProbe 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; |