@@ -67,7 +67,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(LIBDRM_NOUVEAU, [libdrm_nouveau >= 2.4.25])
+PKG_CHECK_MODULES(LIBDRM_NOUVEAU, [libdrm_nouveau >= 2.4.34])
AC_SUBST(LIBDRM_NOUVEAU_CFLAGS)
AC_SUBST(LIBDRM_NOUVEAU_LIBS)
@@ -754,6 +754,7 @@ nouveau_dri2_init(ScreenPtr pScreen)
{ "nouveau", "nouveau" },
{ "nouveau_vieux", "nouveau_vieux" }
};
+ char *device_name = NULL;
if (pNv->Architecture >= NV_ARCH_30)
dri2.driverNames = drivernames[0];
@@ -788,6 +789,16 @@ nouveau_dri2_init(ScreenPtr pScreen)
dri2.DestroyBuffer2 = nouveau_dri2_destroy_buffer2;
dri2.CopyRegion2 = nouveau_dri2_copy_region2;
#endif
+
+#if DRI2INFOREC_VERSION >= 10
+ dri2.version = 10;
+
+ /* try to use the render node if available */
+ device_name = drmGetSameDeviceButType(pNv->drm_device_name, DRM_NODE_RENDER_ONLY);
+ if (device_name)
+ dri2.deviceName = device_name;
+ dri2.device_requires_auth = (device_name == NULL);
+#endif
return DRI2ScreenInit(pScreen, &dri2);
}