2
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
5
* Permission is hereby granted, free of charge, to any person obtaining a
6
* copy of this software and associated documentation files (the
7
* "Software"), to deal in the Software without restriction, including
8
* without limitation the rights to use, copy, modify, merge, publish,
9
* distribute, sub license, and/or sell copies of the Software, and to
10
* permit persons to whom the Software is furnished to do so, subject to
11
* the following conditions:
13
* The above copyright notice and this permission notice (including the
14
* next paragraph) shall be included in all copies or substantial portions
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20
* IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
21
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
* Author: Alan Hourihane <alanh@tungstengraphics.com>
27
* Author: Jakob Bornecrantz <wallbraker@gmail.com>
28
* Author: Corbin Simpson <MostAwesomedude@gmail.com>
32
#include "../../../../state_trackers/xorg/xorg_winsys.h"
34
static void radeon_xorg_identify(int flags);
35
static Bool radeon_xorg_pci_probe(DriverPtr driver,
37
struct pci_device *device,
40
static const struct pci_id_match radeon_xorg_device_match[] = {
41
{0x1002, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0},
45
static SymTabRec radeon_xorg_chipsets[] = {
46
{PCI_MATCH_ANY, "ATI/AMD Radeon Graphics Chipset"},
50
static PciChipsets radeon_xorg_pci_devices[] = {
51
{PCI_MATCH_ANY, PCI_MATCH_ANY, NULL},
55
static XF86ModuleVersionInfo radeon_xorg_version = {
61
0, 1, 0, /* major, minor, patch */
69
* Xorg driver exported structures
72
_X_EXPORT DriverRec radeong = {
77
xorg_tracker_available_options,
81
radeon_xorg_device_match,
85
static MODULESETUPPROTO(radeon_xorg_setup);
87
_X_EXPORT XF86ModuleData radeongModuleData = {
94
* Xorg driver functions
98
radeon_xorg_setup(pointer module, pointer opts, int *errmaj, int *errmin)
100
static Bool setupDone = 0;
102
/* This module should be loaded only once, but check to be sure.
106
xf86AddDriver(&radeong, module, HaveDriverFuncs);
109
* The return value must be non-NULL on success even though there
110
* is no TearDownProc.
115
*errmaj = LDR_ONCEONLY;
121
radeon_xorg_identify(int flags)
123
xf86PrintChipsets("radeong", "Driver for Radeon Gallium with KMS",
124
radeon_xorg_chipsets);
128
radeon_xorg_pci_probe(DriverPtr driver,
129
int entity_num, struct pci_device *device, intptr_t match_data)
131
ScrnInfoPtr scrn = NULL;
132
EntityInfoPtr entity;
134
scrn = xf86ConfigPciEntity(scrn, 0, entity_num, radeon_xorg_pci_devices,
135
NULL, NULL, NULL, NULL, NULL);
137
scrn->driverVersion = 1;
138
scrn->driverName = "radeong";
139
scrn->name = "radeong";
142
entity = xf86GetEntityInfo(entity_num);
144
/* Use all the functions from the xorg tracker */
145
xorg_tracker_set_functions(scrn);