diff options
Diffstat (limited to 'libkms/api.c')
-rw-r--r-- | libkms/api.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/libkms/api.c b/libkms/api.c index 12dcd9a1..7696918a 100644 --- a/libkms/api.c +++ b/libkms/api.c @@ -32,35 +32,9 @@ #include <string.h> #include "internal.h" -struct create_record -{ - unsigned vendor; - unsigned chip; - int (*func)(int fd, struct kms_driver **out); -}; - -static struct create_record table[] = { - { 0x8086, 0x2a42, intel_create }, /* i965 */ -#ifdef HAVE_VMWGFX - { 0x15ad, 0x0405, vmwgfx_create }, /* VMware vGPU */ -#endif - { 0, 0, NULL }, -}; - int kms_create(int fd, struct kms_driver **out) { - unsigned vendor_id, chip_id; - int ret, i; - - ret = linux_get_pciid_from_fd(fd, &vendor_id, &chip_id); - if (ret) - return ret; - - for (i = 0; table[i].func; i++) - if (table[i].vendor == vendor_id && table[i].chip == chip_id) - return table[i].func(fd, out); - - return -ENOSYS; + return linux_create(fd, out); } int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) |