amdgpu_misc.c revision d6c0b56e
1/*
2 * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of Marc Aurele La France not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission.  Marc Aurele La France makes no representations
11 * about the suitability of this software for any purpose.  It is provided
12 * "as-is" without express or implied warranty.
13 *
14 * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO
16 * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 */
22
23#ifdef HAVE_CONFIG_H
24#include "config.h"
25#endif
26
27#include "amdgpu_probe.h"
28#include "amdgpu_version.h"
29
30#include "xf86.h"
31
32/* Module loader interface for subsidiary driver module */
33
34static XF86ModuleVersionInfo AMDGPUVersionRec = {
35	AMDGPU_DRIVER_NAME,
36	MODULEVENDORSTRING,
37	MODINFOSTRING1,
38	MODINFOSTRING2,
39	XORG_VERSION_CURRENT,
40	AMDGPU_VERSION_MAJOR, AMDGPU_VERSION_MINOR, AMDGPU_VERSION_PATCH,
41	ABI_CLASS_VIDEODRV,
42	ABI_VIDEODRV_VERSION,
43	MOD_CLASS_VIDEODRV,
44	{0, 0, 0, 0}
45};
46
47/*
48 * AMDGPUSetup --
49 *
50 * This function is called every time the module is loaded.
51 */
52static pointer
53AMDGPUSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
54{
55	static Bool Inited = FALSE;
56
57	if (!Inited) {
58		Inited = TRUE;
59		xf86AddDriver(&AMDGPU, Module, HaveDriverFuncs);
60	}
61
62	return (pointer) TRUE;
63}
64
65/* The following record must be called amdgpuModuleData */
66_X_EXPORT XF86ModuleData amdgpuModuleData = {
67	&AMDGPUVersionRec,
68	AMDGPUSetup,
69	NULL
70};
71