From 7f881c43dfb4f1aeeab3a84125b5c106c191a43f Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 30 May 2011 10:49:55 +0200 Subject: egl_dri2: Use external driver pci list Reviewed-by: Alex Deucher --- include/pci_ids/pci_id_driver_map.h | 77 +++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 include/pci_ids/pci_id_driver_map.h (limited to 'include') diff --git a/include/pci_ids/pci_id_driver_map.h b/include/pci_ids/pci_id_driver_map.h new file mode 100644 index 00000000000..9112efd378b --- /dev/null +++ b/include/pci_ids/pci_id_driver_map.h @@ -0,0 +1,77 @@ +#ifndef _PCI_ID_DRIVER_MAP_H_ +#define _PCI_ID_DRIVER_MAP_H_ + +#include + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) +#endif + +#if !defined(DRIVER_MAP_DRI2_ONLY) && !defined(DRIVER_MAP_GALLIUM_ONLY) +static const int i810_chip_ids[] = { +#define CHIPSET(chip, desc, misc) chip, +#include "pci_ids/i810_pci_ids.h" +#undef CHIPSET +}; +#endif + +static const int i915_chip_ids[] = { +#define CHIPSET(chip, desc, misc) chip, +#include "pci_ids/i915_pci_ids.h" +#undef CHIPSET +}; + +static const int i965_chip_ids[] = { +#define CHIPSET(chip, desc, misc) chip, +#include "pci_ids/i965_pci_ids.h" +#undef CHIPSET +}; + +#ifndef DRIVER_MAP_GALLIUM_ONLY +static const int r100_chip_ids[] = { +#define CHIPSET(chip, name, family) chip, +#include "pci_ids/radeon_pci_ids.h" +#undef CHIPSET +}; + +static const int r200_chip_ids[] = { +#define CHIPSET(chip, name, family) chip, +#include "pci_ids/r200_pci_ids.h" +#undef CHIPSET +}; +#endif + +static const int r300_chip_ids[] = { +#define CHIPSET(chip, name, family) chip, +#include "pci_ids/r300_pci_ids.h" +#undef CHIPSET +}; + +static const int r600_chip_ids[] = { +#define CHIPSET(chip, name, family) chip, +#include "pci_ids/r600_pci_ids.h" +#undef CHIPSET +}; + +static const struct { + int vendor_id; + const char *driver; + const int *chip_ids; + int num_chips_ids; +} driver_map[] = { +#if !defined(DRIVER_MAP_DRI2_ONLY) && !defined(DRIVER_MAP_GALLIUM_ONLY) + { 0x8086, "i810", i810_chip_ids, ARRAY_SIZE(i810_chip_ids) }, +#endif + { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, + { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, +#ifndef DRIVER_MAP_GALLIUM_ONLY + { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, + { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, +#endif + { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, + { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, + { 0x10de, "nouveau", NULL, -1 }, + { 0x0000, NULL, NULL, 0 }, +}; + +#endif /* _PCI_ID_DRIVER_MAP_H_ */ -- cgit v1.2.3