diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2008-02-15 18:34:56 +0200 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2008-02-15 18:34:56 +0200 |
commit | 665bd7e2f61cac3e029bbad5024034e5136deec1 (patch) | |
tree | d78f686f4f323973f7a334f4144ed2b5e0205662 /src/radeon_probe.c | |
parent | a596c1618f72179a45289a50a1f9e89462ce9667 (diff) |
ati wrapper: translate Device lines
Diffstat (limited to 'src/radeon_probe.c')
-rw-r--r-- | src/radeon_probe.c | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/src/radeon_probe.c b/src/radeon_probe.c index 0cf54b6c..49745309 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -36,12 +36,8 @@ * Authors: * Kevin E. Martin <martin@xfree86.org> * Rickard E. Faith <faith@valinux.com> - * - * Modified by Marc Aurele La France <tsi@xfree86.org> for ATI driver merge. */ -#include "ativersion.h" - #include "radeon_probe.h" #include "radeon_version.h" #include "atipciids.h" @@ -61,19 +57,7 @@ int gRADEONEntityIndex = -1; static const OptionInfoRec * RADEONAvailableOptions(int chipid, int busid) { - int i; - - /* - * Return options defined in the radeon submodule which will have been - * loaded by this point. - */ - if ((chipid >> 16) == PCI_VENDOR_ATI) - chipid -= PCI_VENDOR_ATI << 16; - for (i = 0; RADEONPciChipsets[i].PCIid > 0; i++) { - if (chipid == RADEONPciChipsets[i].PCIid) - return RADEONOptionsWeak(); - } - return NULL; + return RADEONOptionsWeak(); } /* Return the string name for supported chipset 'n'; NULL otherwise. */ @@ -90,9 +74,9 @@ static Bool RADEONProbe(DriverPtr drv, int flags) { int numUsed; - int numDevSections, nATIGDev, nRadeonGDev; + int numDevSections; int *usedChips; - GDevPtr *devSections, *ATIGDevs, *RadeonGDevs; + GDevPtr *devSections; Bool foundScreen = FALSE; int i; @@ -100,29 +84,9 @@ RADEONProbe(DriverPtr drv, int flags) if (!xf86GetPciVideoInfo()) return FALSE; #endif - /* Collect unclaimed device sections for both driver names */ - nATIGDev = xf86MatchDevice(ATI_NAME, &ATIGDevs); - nRadeonGDev = xf86MatchDevice(RADEON_NAME, &RadeonGDevs); + numDevSections = xf86MatchDevice(RADEON_NAME, &devSections); - if (!(numDevSections = nATIGDev + nRadeonGDev)) return FALSE; - - if (!ATIGDevs) { - if (!(devSections = RadeonGDevs)) numDevSections = 1; - else numDevSections = nRadeonGDev; - } if (!RadeonGDevs) { - devSections = ATIGDevs; - numDevSections = nATIGDev; - } else { - /* Combine into one list */ - devSections = xnfalloc((numDevSections + 1) * sizeof(GDevPtr)); - (void)memcpy(devSections, - ATIGDevs, nATIGDev * sizeof(GDevPtr)); - (void)memcpy(devSections + nATIGDev, - RadeonGDevs, nRadeonGDev * sizeof(GDevPtr)); - devSections[numDevSections] = NULL; - xfree(ATIGDevs); - xfree(RadeonGDevs); - } + if (!numDevSections) return FALSE; numUsed = xf86MatchPciInstances(RADEON_NAME, PCI_VENDOR_ATI, |