Path: blob/21.2-virgl/src/loader/pci_id_driver_map.h
4545 views
#ifndef _PCI_ID_DRIVER_MAP_H_1#define _PCI_ID_DRIVER_MAP_H_23#include <stdbool.h>4#include <stddef.h>56#ifndef __IS_LOADER7# error "Only include from loader.c"8#endif910static const int i830_chip_ids[] = {11#define CHIPSET(chip, desc, name) chip,12#include "pci_ids/i830_pci_ids.h"13#undef CHIPSET14};1516static const int i915_chip_ids[] = {17#define CHIPSET(chip, desc, name) chip,18#include "pci_ids/i915_pci_ids.h"19#undef CHIPSET20};2122static const int i965_chip_ids[] = {23#define CHIPSET(chip, family, family_str, name) chip,24#include "pci_ids/i965_pci_ids.h"25#undef CHIPSET26};2728static const int crocus_chip_ids[] = {29#define CHIPSET(chip, family, family_str, name) chip,30#include "pci_ids/crocus_pci_ids.h"31#undef CHIPSET32};3334static const int r100_chip_ids[] = {35#define CHIPSET(chip, name, family) chip,36#include "pci_ids/radeon_pci_ids.h"37#undef CHIPSET38};3940static const int r200_chip_ids[] = {41#define CHIPSET(chip, name, family) chip,42#include "pci_ids/r200_pci_ids.h"43#undef CHIPSET44};4546static const int r300_chip_ids[] = {47#define CHIPSET(chip, name, family) chip,48#include "pci_ids/r300_pci_ids.h"49#undef CHIPSET50};5152static const int r600_chip_ids[] = {53#define CHIPSET(chip, name, family) chip,54#include "pci_ids/r600_pci_ids.h"55#undef CHIPSET56};5758static const int virtio_gpu_chip_ids[] = {59#define CHIPSET(chip, name, family) chip,60#include "pci_ids/virtio_gpu_pci_ids.h"61#undef CHIPSET62};6364static const int vmwgfx_chip_ids[] = {65#define CHIPSET(chip, name, family) chip,66#include "pci_ids/vmwgfx_pci_ids.h"67#undef CHIPSET68};6970bool is_nouveau_vieux(int fd);71bool is_kernel_i915(int fd);7273static const struct {74int vendor_id;75const char *driver;76const int *chip_ids;77int num_chips_ids;78bool (*predicate)(int fd);79} driver_map[] = {80{ 0x8086, "i830", i830_chip_ids, ARRAY_SIZE(i830_chip_ids) },81{ 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },82{ 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },83{ 0x8086, "crocus", crocus_chip_ids, ARRAY_SIZE(crocus_chip_ids) },84{ 0x8086, "iris", NULL, -1, is_kernel_i915 },85{ 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },86{ 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },87{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },88{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },89{ 0x1002, "radeonsi", NULL, -1 },90{ 0x10de, "nouveau_vieux", NULL, -1, is_nouveau_vieux },91{ 0x10de, "nouveau", NULL, -1, },92{ 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) },93{ 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },94};9596#endif /* _PCI_ID_DRIVER_MAP_H_ */979899