diff options
author | Matthias Hopf <mhopf@suse.de> | 2010-03-25 16:00:04 +0100 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2010-03-25 17:01:52 +0100 |
commit | f6c99911c7a8e4a8d5f6df57776ef2a47ef98761 (patch) | |
tree | b3eb16c547826c4aeff97584dfe6b8970e33f552 | |
parent | 54ca9630e35278e9626e32d9b45140931fd4333b (diff) |
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.
-rw-r--r-- | src/rhd_dri.c | 8 |
1 files changed, 8 insertions, 0 deletions
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", |