diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-02-01 19:47:32 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-02-01 19:47:32 +0000 |
commit | a103496e08f699b609be875827ecf1f3afa45e68 (patch) | |
tree | 903b187accb531b8bc55de00190f673095702840 | |
parent | 7ff7cec9220815eb5f74cfd95860aaa5f1f263bd (diff) |
Check return value of i830InitDma() and fail to initialize the DRI
if that fails.
Also, check the DRM module name that it matches i915 and not the
older i830 driver which some people were still trying to use
and was causing Dma Initialization failures and lockups.
-rw-r--r-- | src/i830_dri.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index 034b0960..01f02513 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -586,6 +586,13 @@ I830DRIScreenInit(ScreenPtr pScreen) drmFreeVersion(version); return FALSE; } + if (strncmp(version->name, I830KernelDriverName, strlen(I830KernelDriverName))) { + xf86DrvMsg(pScreen->myNum, X_WARNING, + "i830 Kernel module detected, Use the i915 Kernel module instead, aborting DRI init.\n"); + I830DRICloseScreen(pScreen); + drmFreeVersion(version); + return FALSE; + } if (version->version_minor < 2) xf86DrvMsg(pScreen->myNum, X_WARNING, "Resume functionality not available with DRM < 1.2\n"); @@ -593,6 +600,7 @@ I830DRIScreenInit(ScreenPtr pScreen) drmFreeVersion(version); } } + return TRUE; } @@ -676,7 +684,10 @@ I830DRIDoMappings(ScreenPtr pScreen) xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] textures = 0x%08lx\n", pI830DRI->textures); - I830InitDma(pScrn); + if (!I830InitDma(pScrn)) { + DRICloseScreen(pScreen); + return FALSE; + } if (pI830->PciInfo->chipType != PCI_CHIP_845_G && pI830->PciInfo->chipType != PCI_CHIP_I830_M) { |