1209ff23fSmrg/* 2209ff23fSmrg * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org 3209ff23fSmrg * 4209ff23fSmrg * Permission to use, copy, modify, distribute, and sell this software and its 5209ff23fSmrg * documentation for any purpose is hereby granted without fee, provided that 6209ff23fSmrg * the above copyright notice appear in all copies and that both that copyright 7209ff23fSmrg * notice and this permission notice appear in supporting documentation, and 8209ff23fSmrg * that the name of Marc Aurele La France not be used in advertising or 9209ff23fSmrg * publicity pertaining to distribution of the software without specific, 10209ff23fSmrg * written prior permission. Marc Aurele La France makes no representations 11209ff23fSmrg * about the suitability of this software for any purpose. It is provided 12209ff23fSmrg * "as-is" without express or implied warranty. 13209ff23fSmrg * 14209ff23fSmrg * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15209ff23fSmrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 16209ff23fSmrg * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17209ff23fSmrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18209ff23fSmrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19209ff23fSmrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20209ff23fSmrg * PERFORMANCE OF THIS SOFTWARE. 21209ff23fSmrg */ 22209ff23fSmrg 23209ff23fSmrg#ifdef HAVE_CONFIG_H 24209ff23fSmrg#include "config.h" 25209ff23fSmrg#endif 26209ff23fSmrg 27209ff23fSmrg#include "ati.h" 28209ff23fSmrg#include "ativersion.h" 29209ff23fSmrg 30209ff23fSmrg/* Module loader interface */ 31209ff23fSmrg 32209ff23fSmrgstatic XF86ModuleVersionInfo ATIVersionRec = 33209ff23fSmrg{ 34209ff23fSmrg ATI_DRIVER_NAME, 35209ff23fSmrg MODULEVENDORSTRING, 36209ff23fSmrg MODINFOSTRING1, 37209ff23fSmrg MODINFOSTRING2, 38209ff23fSmrg XORG_VERSION_CURRENT, 39209ff23fSmrg ATI_VERSION_MAJOR, ATI_VERSION_MINOR, ATI_VERSION_PATCH, 40209ff23fSmrg ABI_CLASS_VIDEODRV, 41209ff23fSmrg ABI_VIDEODRV_VERSION, 42209ff23fSmrg MOD_CLASS_VIDEODRV, 43209ff23fSmrg {0, 0, 0, 0} 44209ff23fSmrg}; 45209ff23fSmrg 46209ff23fSmrg/* 47209ff23fSmrg * ATISetup -- 48209ff23fSmrg * 49209ff23fSmrg * This function is called every time the module is loaded. 50209ff23fSmrg */ 51209ff23fSmrgstatic pointer 52209ff23fSmrgATISetup 53209ff23fSmrg( 54209ff23fSmrg pointer Module, 55209ff23fSmrg pointer Options, 56209ff23fSmrg int *ErrorMajor, 57209ff23fSmrg int *ErrorMinor 58209ff23fSmrg) 59209ff23fSmrg{ 60209ff23fSmrg static Bool Inited = FALSE; 61209ff23fSmrg 62209ff23fSmrg if (!Inited) 63209ff23fSmrg { 64209ff23fSmrg Inited = TRUE; 65209ff23fSmrg ati_gdev_subdriver(Options); 66209ff23fSmrg } 67209ff23fSmrg 68209ff23fSmrg return (pointer)1; 69209ff23fSmrg} 70209ff23fSmrg 71209ff23fSmrg/* The following record must be called atiModuleData */ 72209ff23fSmrg_X_EXPORT XF86ModuleData atiModuleData = 73209ff23fSmrg{ 74209ff23fSmrg &ATIVersionRec, 75209ff23fSmrg ATISetup, 76209ff23fSmrg NULL 77209ff23fSmrg}; 78