Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pci_id_driver_map.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef _PCI_ID_DRIVER_MAP_H_
  2. #define _PCI_ID_DRIVER_MAP_H_
  3. #include <stddef.h>
  4. #ifndef ARRAY_SIZE
  5. #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
  6. #endif
  7. static const int i915_chip_ids[] = {
  8. #define CHIPSET(chip, desc, misc) chip,
  9. #include "pci_ids/i915_pci_ids.h"
  10. #undef CHIPSET
  11. };
  12. static const int i965_chip_ids[] = {
  13. #define CHIPSET(chip, desc, misc) chip,
  14. #include "pci_ids/i965_pci_ids.h"
  15. #undef CHIPSET
  16. };
  17. #ifndef DRIVER_MAP_GALLIUM_ONLY
  18. static const int r100_chip_ids[] = {
  19. #define CHIPSET(chip, name, family) chip,
  20. #include "pci_ids/radeon_pci_ids.h"
  21. #undef CHIPSET
  22. };
  23. static const int r200_chip_ids[] = {
  24. #define CHIPSET(chip, name, family) chip,
  25. #include "pci_ids/r200_pci_ids.h"
  26. #undef CHIPSET
  27. };
  28. #endif
  29. static const int r300_chip_ids[] = {
  30. #define CHIPSET(chip, name, family) chip,
  31. #include "pci_ids/r300_pci_ids.h"
  32. #undef CHIPSET
  33. };
  34. static const int r600_chip_ids[] = {
  35. #define CHIPSET(chip, name, family) chip,
  36. #include "pci_ids/r600_pci_ids.h"
  37. #undef CHIPSET
  38. };
  39. static const int vmwgfx_chip_ids[] = {
  40. #define CHIPSET(chip, name, family) chip,
  41. #include "pci_ids/vmwgfx_pci_ids.h"
  42. #undef CHIPSET
  43. };
  44. static const struct {
  45. int vendor_id;
  46. const char *driver;
  47. const int *chip_ids;
  48. int num_chips_ids;
  49. } driver_map[] = {
  50. { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
  51. { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
  52. #ifndef DRIVER_MAP_GALLIUM_ONLY
  53. { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
  54. { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
  55. #endif
  56. { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
  57. { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
  58. { 0x10de, "nouveau", NULL, -1 },
  59. { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },
  60. { 0x0000, NULL, NULL, 0 },
  61. };
  62. #endif /* _PCI_ID_DRIVER_MAP_H_ */