From f6c99911c7a8e4a8d5f6df57776ef2a47ef98761 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Thu, 25 Mar 2010 16:00:04 +0100 Subject: Load DRM module in probe() to check whether KMS is enabled. This doesn't completely conform with the notion that probe() should return with all resources freed. However, resources are outside the Xserver in this case. X configuration is unknown at probe time. Thus this cannot be disabled even with option nodri. --- src/rhd_dri.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rhd_dri.c b/src/rhd_dri.c index a5aaf46..d7e599b 100644 --- a/src/rhd_dri.c +++ b/src/rhd_dri.c @@ -2043,8 +2043,16 @@ RHDKMSEnabled(ScrnInfoPtr pScrn, struct pci_device *pciDev) "No DRICreatePCIBusID symbol\n"); return FALSE; } + busId = DRICreatePCIBusID(pciDev); + + if ( (ret = drmOpen(dri_driver_name, busId)) >= 0) + drmClose (ret); + else + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Could not open DRM - module might not be loaded, KMS detection faulty.\n"); ret = (drmCheckModesettingSupported(busId) == 0); + xfree(busId); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[DRM] Kernel mode setting %s\n", -- cgit v1.2.3