This prevents ddx from selecting UMS if KMS is enabled but kernel module is not loaded before X.
Signed-off-by: Pauli Nieminen <[email protected]> --- configure.ac | 3 +++ src/radeon_probe.c | 6 ++++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index a9e5b76..61360a0 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/radeon_probe.c b/src/radeon_probe.c index 42e7259..e169ee4 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -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, -- 1.6.3.3 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
