summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaarten Lankhorst <m.b.lankhorst@gmail.com>2011-10-08 10:33:20 +0200
committerBen Skeggs <bskeggs@redhat.com>2011-10-10 10:59:26 +1000
commitd575a28a5020ff083836d3d1cf50018a99f49c9f (patch)
tree34cff80fca745e4ac495d635412bc9befd771b20 /src
parent656cfe3bdb8b487827b710a0cea35ae1bcd5044e (diff)
dri2: Add vdpau driver name entry
libvdpau has a driver loading mechanism that looks for a dri2 driver first before falling back to nvidia, so lets use that.
Diffstat (limited to 'src')
-rw-r--r--src/nouveau_dri2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 2081ce2..d14443f 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -428,11 +428,17 @@ nouveau_dri2_init(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
NVPtr pNv = NVPTR(pScrn);
DRI2InfoRec dri2 = { 0 };
+ const char *drivernames[2][2] = {
+ { "nouveau", "nouveau" },
+ { "nouveau_vieux", "nouveau_vieux" }
+ };
if (pNv->Architecture >= NV_ARCH_30)
- dri2.driverName = "nouveau";
+ dri2.driverNames = drivernames[0];
else
- dri2.driverName = "nouveau_vieux";
+ dri2.driverNames = drivernames[1];
+ dri2.numDrivers = 2;
+ dri2.driverName = dri2.driverNames[0];
dri2.fd = nouveau_device(pNv->dev)->fd;
dri2.deviceName = pNv->drm_device_name;