summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-02-14 07:52:26 +1000
committerDave Airlie <airlied@redhat.com>2011-02-14 07:54:28 +1000
commit1f5b67416810f7331fe71db0f767418473083701 (patch)
tree5a61c4dfaffc216827132b75c00dcdde163c631d
parent8fe5da89e33a2408c21dd536d0b2e2178aeaef1e (diff)
egl_dri2: add nouveau support.
but really wtf? all these PCI IDs need to be ripped out of here, its totally unscalable and the drivers already have this info so could export it some better way. tested by Darxus on #wayland.
-rw-r--r--src/egl/drivers/dri2/platform_drm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 42939a57a2a..a25cad6d0c5 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -567,2 +567,3 @@ const struct dri2_driver_map driver_map[] = {
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
+ { 0x10de, "nouveau", NULL, -1 },
};
@@ -607,2 +608,9 @@ dri2_get_driver_for_fd(int fd)
continue;
+ if (driver_map[i].num_chips_ids == -1) {
+ driver = strdup(driver_map[i].driver);
+ _eglLog(_EGL_DEBUG, "pci id for %d: %04x:%04x, driver %s",
+ fd, vendor_id, chip_id, driver);
+ goto out;
+ }
+
for (j = 0; j < driver_map[i].num_chips_ids; j++)