diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2008-03-12 14:14:45 -0600 |
---|---|---|
committer | Jordan Crouse <jordan.crouse@amd.com> | 2008-03-12 14:19:40 -0600 |
commit | 95159125cb19acdfb23ee5042acf9d8b9d776c7a (patch) | |
tree | 45eff6a7f0c916e54f7815e6c8a9edc23d2d7d3e /src | |
parent | b884e17eb74f6b7f11f4bba71ce0421cd0d28855 (diff) |
amd: Add the 'geode' name in preparation for the renaming
Diffstat (limited to 'src')
-rw-r--r-- | src/amd_driver.c | 85 |
1 files changed, 62 insertions, 23 deletions
diff --git a/src/amd_driver.c b/src/amd_driver.c index c7e7594..1e28e2e 100644 --- a/src/amd_driver.c +++ b/src/amd_driver.c @@ -126,6 +126,25 @@ _X_EXPORT DriverRec AMD = { #endif }; +_X_EXPORT DriverRec GEODE = { + AMD_VERSION_CURRENT, + "geode", + AmdIdentify, +#ifdef XSERVER_LIBPCIACCESS + NULL, +#else + AmdProbe, +#endif + AmdAvailableOptions, + NULL, + 0, + NULL, +#ifdef XSERVER_LIBPCIACCESS + amdDeviceMatch, + AmdPciProbe +#endif +}; + /* Advanced Micro Devices Chip Models */ typedef struct _DEVICE_MODEL { @@ -300,30 +319,46 @@ static XF86ModuleVersionInfo AmdVersionRec = { {0, 0, 0, 0} }; -/* - * This data is accessed by the loader. The name must be the module name - * followed by "ModuleInit". - */ -_X_EXPORT XF86ModuleData amdModuleData = { &AmdVersionRec, AmdSetup, NULL }; +static XF86ModuleVersionInfo GeodeVersionRec = { + "geode", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XORG_VERSION_CURRENT, + GET_MODULE_MAJOR_VERSION(AMD_VERSION_CURRENT), + GET_MODULE_MINOR_VERSION(AMD_VERSION_CURRENT), + (GET_MODULE_PATCHLEVEL(AMD_VERSION_CURRENT) >> 8) * 100 + + (GET_MODULE_PATCHLEVEL(AMD_VERSION_CURRENT) & 0xff), + ABI_CLASS_VIDEODRV, /* This is a video driver */ + ABI_VIDEODRV_VERSION, + MOD_CLASS_VIDEODRV, + {0, 0, 0, 0} +}; + +static pointer +GeodeSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) +{ + static Bool init = FALSE; + int flag = 0; + +#ifdef XSERVER_LIBPCIACCESS + flag = HaveDriverFuncs; +#endif + if (init) { + *ErrorMajor = LDR_ONCEONLY; + return (pointer) NULL; + } + + init = TRUE; + xf86AddDriver(&GEODE, Module, flag); + + LoaderRefSymLists(amdVgahwSymbols, amdVbeSymbols, + amdFbSymbols, amdXaaSymbols, + amdInt10Symbols, amdRamdacSymbols, NULL); + + return (pointer) TRUE; +} -/*------------------------------------------------------------------------- - * AmdSetup. - * - * Description :This function sets up the driver in X list and load the - * module symbols through xf86loader routines.. - * - * Parameters. - * Module :Pointer to the geode module - * options :Driver module options. - * ErrorMajor:Major no - * ErrorMinor:Minor no. - * - * Returns :NULL on success - * - * Comments :Module setup is done by this function - * - *------------------------------------------------------------------------- -*/ static pointer AmdSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) { @@ -353,6 +388,10 @@ AmdSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) *ErrorMajor = LDR_ONCEONLY; return NULL; } + +_X_EXPORT XF86ModuleData amdModuleData = { &AmdVersionRec, AmdSetup, NULL }; +_X_EXPORT XF86ModuleData geodeModuleData = { &GeodeVersionRec, GeodeSetup, NULL }; + #endif /*End of XFree86Loader */ /*------------------------------------------------------------------------- |