summaryrefslogtreecommitdiff
path: root/libkms/api.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-01-12 17:53:49 +0000
committerJakob Bornecrantz <jakob@vmware.com>2010-01-12 21:10:12 +0000
commitd920fa9d0b54873d53f03a006d0fe3df11136b74 (patch)
tree43178c3fb49a55920ebbfb66ae111d5e1b735491 /libkms/api.c
parentd207a38701d664ac818829249d4d2566349bb359 (diff)
downloadlibdrm-d920fa9d0b54873d53f03a006d0fe3df11136b74.tar.gz
libdrm-d920fa9d0b54873d53f03a006d0fe3df11136b74.tar.bz2
libdrm-d920fa9d0b54873d53f03a006d0fe3df11136b74.zip
libkms: Use sysfs instead of udev to find driver
Udev code is still there just commented out.
Diffstat (limited to 'libkms/api.c')
-rw-r--r--libkms/api.c28
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)