Tizen 2.0 Release
[profile/ivi/osmesa.git] / include / pci_ids / pci_id_driver_map.h
1 #ifndef _PCI_ID_DRIVER_MAP_H_
2 #define _PCI_ID_DRIVER_MAP_H_
3
4 #include <stddef.h>
5
6 #ifndef ARRAY_SIZE
7 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
8 #endif
9
10 #if !defined(DRIVER_MAP_DRI2_ONLY) && !defined(DRIVER_MAP_GALLIUM_ONLY)
11 static const int i810_chip_ids[] = {
12 #define CHIPSET(chip, desc, misc) chip,
13 #include "pci_ids/i810_pci_ids.h"
14 #undef CHIPSET
15 };
16 #endif
17
18 static const int i915_chip_ids[] = {
19 #define CHIPSET(chip, desc, misc) chip,
20 #include "pci_ids/i915_pci_ids.h"
21 #undef CHIPSET
22 };
23
24 static const int i965_chip_ids[] = {
25 #define CHIPSET(chip, desc, misc) chip,
26 #include "pci_ids/i965_pci_ids.h"
27 #undef CHIPSET
28 };
29
30 #ifndef DRIVER_MAP_GALLIUM_ONLY
31 static const int r100_chip_ids[] = {
32 #define CHIPSET(chip, name, family) chip,
33 #include "pci_ids/radeon_pci_ids.h"
34 #undef CHIPSET
35 };
36
37 static const int r200_chip_ids[] = {
38 #define CHIPSET(chip, name, family) chip,
39 #include "pci_ids/r200_pci_ids.h"
40 #undef CHIPSET
41 };
42 #endif
43
44 static const int r300_chip_ids[] = {
45 #define CHIPSET(chip, name, family) chip,
46 #include "pci_ids/r300_pci_ids.h"
47 #undef CHIPSET
48 };
49
50 static const int r600_chip_ids[] = {
51 #define CHIPSET(chip, name, family) chip,
52 #include "pci_ids/r600_pci_ids.h"
53 #undef CHIPSET
54 };
55
56 static const struct {
57    int vendor_id;
58    const char *driver;
59    const int *chip_ids;
60    int num_chips_ids;
61 } driver_map[] = {
62 #if !defined(DRIVER_MAP_DRI2_ONLY) && !defined(DRIVER_MAP_GALLIUM_ONLY)
63    { 0x8086, "i810", i810_chip_ids, ARRAY_SIZE(i810_chip_ids) },
64 #endif
65    { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
66    { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
67 #ifndef DRIVER_MAP_GALLIUM_ONLY
68    { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
69    { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
70 #endif
71    { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
72    { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
73    { 0x10de, "nouveau", NULL, -1 },
74    { 0x0000, NULL, NULL, 0 },
75 };
76
77 #endif /* _PCI_ID_DRIVER_MAP_H_ */