diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-06-29 16:26:15 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-06-30 12:02:12 -0700 |
commit | 362883c2f9a3442f7678e6e815f41b21baaa3f53 (patch) | |
tree | 44e3d81b313a0667f0b4beecfa5f434e7f111dc3 | |
parent | afac333bef4a0ac934f0e4d933dc5053d81ca88c (diff) |
Add a few error messages for DRM initialization
Makes it easier to see where things go wrong.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r-- | src/i830_driver.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index bd7a32c2..40255cd3 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1440,7 +1440,8 @@ i830_open_drm_master(ScrnInfoPtr scrn) if (i830->drmSubFD == -1) { xfree(busid); xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "[drm] Failed to open DRM device for %s\n", busid); + "[drm] Failed to open DRM device for %s: %s\n", busid, + strerror(errno)); return FALSE; } @@ -1455,6 +1456,8 @@ i830_open_drm_master(ScrnInfoPtr scrn) sv.drm_dd_major = -1; err = drmSetInterfaceVersion(i830->drmSubFD, &sv); if (err != 0) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "[drm] failed to set drm interface version.\n"); drmClose(i830->drmSubFD); i830->drmSubFD = -1; return FALSE; @@ -1594,7 +1597,9 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) pI830->PciInfo = xf86GetPciInfoForEntity(pI830->pEnt->index); - i830_open_drm_master(pScrn); + if (!i830_open_drm_master(pScrn)) + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to become DRM master.\n"); + if (xf86RegisterResources(pI830->pEnt->index, NULL, ResNone)) { PreInitCleanup(pScrn); |