@@ -115,6 +115,9 @@ if test "$DRI" != no; then
[have_dristruct_h="yes"], [have_dristruct_h="no"],[-])
AC_CHECK_HEADER([damage.h],
[have_damage_h="yes"], [have_damage_h="no"],[-])
+
+ CPPFLAGS="$CPPFLAGS $DRI_LIBS"
+ AC_CHECK_FUNCS([drmCheckModuleAndModesettingSupported])
CPPFLAGS="$save_CPPFLAGS"
fi
@@ -99,7 +99,13 @@ static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci
}
busIdString = DRICreatePCIBusID(pci_dev);
+
+#ifdef HAVE_DRMCHECKMODULEANDMODESETTINGSUPPORTED
+ ret = drmCheckModuleAndModesettingSupported(RADEON_DRIVER_NAME, busIdString);
+#else
+#warning "libdrm doesn't support module loading in KMS check. You should upgrade libdrm to 2.4.19."
ret = drmCheckModesettingSupported(busIdString);
+#endif
xfree(busIdString);
if (ret) {
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,