diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2008-01-18 18:17:40 +0200 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2008-01-18 18:17:40 +0200 |
commit | 12c00111b68c9cf4872a424258c6f8b7247aac47 (patch) | |
tree | 183e2fa028dd2b56c18b0bac55050f88e8c9be98 /src/ati.c | |
parent | 24c7d134cd450f9e2cca85e4a2fc3253d250be04 (diff) |
use stand-alone drivers for each chip family.
Do not load the ati wrapper when the user specifies the sub-driver name in
the Driver line of xorg.conf. Also, for -configure cause the wrapper to fail
and let each sub-driver speak for themselves.
Diffstat (limited to 'src/ati.c')
-rw-r--r-- | src/ati.c | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -81,6 +81,29 @@ enum ATI_CHIP_FAMILY_Radeon }; +/* + * Record which sub-drivers have already been loaded, and thus have called + * xf86AddDriver(). For those sub-drivers, cause the ati wrapper later to fail + * when probing. + * + * The check is only called once when the ati wrapper is loaded and depends on + * the X server loading all drivers before doing any probes. + */ +static Bool mach64_drv_added = FALSE; +static Bool r128_drv_added = FALSE; +static Bool radeon_drv_added = FALSE; + +void +ati_check_subdriver_added() +{ + if (LoaderSymbol(MACH64_NAME)) + mach64_drv_added = TRUE; + if (LoaderSymbol(R128_NAME)) + r128_drv_added = TRUE; + if (LoaderSymbol(RADEON_NAME)) + radeon_drv_added = TRUE; +} + static int ATIChipID(const CARD16); #ifdef XSERVER_LIBPCIACCESS @@ -142,6 +165,10 @@ ATIProbe Bool DoRage128 = FALSE, DoRadeon = FALSE; int Chip; + /* Let the sub-drivers probe & configure for themselves */ + if (xf86ServerIsOnlyDetecting()) + return FALSE; + #ifndef XSERVER_LIBPCIACCESS xf86PciVideoInfo = xf86GetPciVideoInfo(); @@ -199,6 +226,10 @@ ATIProbe { DriverRec *radeon; + /* If the sub-driver was added, let it probe for itself */ + if (radeon_drv_added) + return FALSE; + if (!LoaderSymbol(RADEON_NAME)) xf86LoadDrvSubModule(pDriver, RADEON_DRIVER_NAME); @@ -222,6 +253,10 @@ ATIProbe { DriverRec *r128; + /* If the sub-driver was added, let it probe for itself */ + if (r128_drv_added) + return FALSE; + if (!LoaderSymbol(R128_NAME)) xf86LoadDrvSubModule(pDriver, R128_DRIVER_NAME); @@ -245,6 +280,10 @@ ATIProbe { DriverRec *mach64; + /* If the sub-driver was added, let it probe for itself */ + if (mach64_drv_added) + return FALSE; + if (!LoaderSymbol(MACH64_NAME)) xf86LoadDrvSubModule(pDriver, MACH64_DRIVER_NAME); |