diff options
author | brianp <brianp> | 2001-04-30 17:34:24 +0000 |
---|---|---|
committer | brianp <brianp> | 2001-04-30 17:34:24 +0000 |
commit | 099a980420ce1fbe8c190587f42e069b0cc05fb6 (patch) | |
tree | 21a15ee2f2e565cc6452a939e31e5cd165e749bd /xc/programs/Xserver/hw/xfree86/drivers | |
parent | ed09e61091b67a8125a1e9fcf8309f586740513e (diff) |
Better version mismatch error messages.
Prefix DRI-related messages with [dri].
Replaced some ErrorF() calls with xf86DrvMsg().
Added DRM version check code to ffb and sis drivers (disabled until tested).
Disabled R128's alpha channel when using 32bpp since it doesn't work.
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers')
8 files changed, 220 insertions, 130 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c index 29080224e..e97ab0608 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dri.c @@ -80,8 +80,8 @@ static Bool R128InitVisualConfigs(ScreenPtr pScreen) case 8: /* 8bpp mode is not support */ case 15: /* FIXME */ case 24: /* FIXME */ - xf86DrvMsg(pScreen->myNum, X_WARNING, - "R128DRIScreenInit failed (depth %d not supported). " + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] R128DRIScreenInit failed (depth %d not supported). " "Disabling DRI.\n", info->CurrentLayout.pixel_code); return FALSE; @@ -200,16 +200,16 @@ static Bool R128InitVisualConfigs(ScreenPtr pScreen) pConfigs[i].redSize = 8; pConfigs[i].greenSize = 8; pConfigs[i].blueSize = 8; - pConfigs[i].alphaSize = 8; + pConfigs[i].alphaSize = 0; pConfigs[i].redMask = 0x00FF0000; pConfigs[i].greenMask = 0x0000FF00; pConfigs[i].blueMask = 0x000000FF; - pConfigs[i].alphaMask = 0xFF000000; + pConfigs[i].alphaMask = 0x00000000; if (accum) { /* Simulated in software */ pConfigs[i].accumRedSize = 16; pConfigs[i].accumGreenSize = 16; pConfigs[i].accumBlueSize = 16; - pConfigs[i].accumAlphaSize = 16; + pConfigs[i].accumAlphaSize = 0; } else { pConfigs[i].accumRedSize = 0; pConfigs[i].accumGreenSize = 0; @@ -877,7 +877,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE; if (!xf86LoaderCheckSymbol("DRIQueryVersion")) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "R128DRIScreenInit failed (libdri.a too old)\n"); + "[dri] R128DRIScreenInit failed (libdri.a too old)\n"); return FALSE; } @@ -885,10 +885,10 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) DRIQueryVersion(&major, &minor, &patch); if (major != 4 || minor < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "R128DRIScreenInit failed " - "(DRI version = %d.%d.%d, expected 4.0.x). " - "Disabling DRI.\n", - major, minor, patch); + "[dri] R128DRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] Disabling the DRI.\n", + major, minor, patch); return FALSE; } @@ -897,6 +897,9 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) /* These modes are not supported (yet). */ case 15: case 24: + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] R128DRIScreenInit failed (depth %d not supported). " + "[dri] Disabling DRI.\n", info->CurrentLayout.pixel_code); return FALSE; /* Only 16 and 32 color depths are supports currently. */ @@ -943,7 +946,8 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) * in the SAREA header */ if (sizeof(XF86DRISAREARec)+sizeof(R128SAREAPriv)>SAREA_MAX) { - ErrorF("Data does not fit in SAREA\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] Data does not fit in SAREA. Disabling DRI.\n"); return FALSE; } pDRIInfo->SAREASize = SAREA_MAX; @@ -969,7 +973,8 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) pDRIInfo->createDummyCtxPriv = FALSE; if (!DRIScreenInit(pScreen, pDRIInfo, &info->drmFD)) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "DRIScreenInit failed!\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] DRIScreenInit failed. Disabling DRI.\n"); xfree(pDRIInfo->devPrivate); pDRIInfo->devPrivate = NULL; DRIDestroyInfoRec(pDRIInfo); @@ -984,12 +989,12 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) version->version_minor < 1) { /* incompatible drm version */ xf86DrvMsg(pScreen->myNum, X_ERROR, - "R128DRIScreenInit failed " - "(DRM version = %d.%d.%d, expected 2.1.x). " - "Disabling DRI.\n", - version->version_major, - version->version_minor, - version->version_patchlevel); + "[dri] R128DRIScreenInit failed because of a version mismatch.\n" + "[dri] r128.o kernel module version is %d.%d.%d but version 2.1.x is needed.\n" + "[dri] Disabling the DRI.\n", + version->version_major, + version->version_minor, + version->version_patchlevel); drmFreeVersion(version); R128DRICloseScreen(pScreen); return FALSE; @@ -1001,9 +1006,9 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) if (!info->IsPCI && !R128DRIAgpInit(info, pScreen)) { info->IsPCI = TRUE; xf86DrvMsg(pScreen->myNum, X_WARNING, - "AGP failed to initialize -- falling back to PCI mode.\n"); + "[agp] AGP failed to initialize -- falling back to PCI mode.\n"); xf86DrvMsg(pScreen->myNum, X_WARNING, - "Make sure you have the agpgart kernel module loaded.\n"); + "[agp] Make sure you have the agpgart kernel module loaded.\n"); } /* Initialize PCIGART */ @@ -1026,7 +1031,7 @@ Bool R128DRIScreenInit(ScreenPtr pScreen) R128DRICloseScreen(pScreen); return FALSE; } - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Visual configs initialized\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] Visual configs initialized\n"); return TRUE; } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c index 4ec7b1d4c..ea9f7ad1b 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c @@ -84,6 +84,9 @@ static Bool RADEONInitVisualConfigs(ScreenPtr pScreen) case 8: /* 8bpp mode is not support */ case 15: /* FIXME */ case 24: /* FIXME */ + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] RADEONInitVisualConfigs failed (depth %d not supported). " + "Disabling DRI.\n", info->CurrentLayout.pixel_code); return FALSE; #define RADEON_USE_ACCUM 1 @@ -271,7 +274,7 @@ static Bool RADEONCreateContext(ScreenPtr pScreen, VisualPtr visual, DRM_REMOVABLE, &ctx_info->sarea_handle) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "[DRI] could not create private sarea for ctx id (%d)\n", + "[dri] could not create private sarea for ctx id (%d)\n", (int)hwContext); return FALSE; } @@ -279,7 +282,7 @@ static Bool RADEONCreateContext(ScreenPtr pScreen, VisualPtr visual, if (drmAddContextPrivateMapping(info->drmFD, hwContext, ctx_info->sarea_handle) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "[DRI] could not associate private sarea to ctx id (%d)\n", + "[dri] could not associate private sarea to ctx id (%d)\n", (int)hwContext); drmRmMap(info->drmFD, ctx_info->sarea_handle); return FALSE; @@ -304,7 +307,7 @@ static void RADEONDestroyContext(ScreenPtr pScreen, drmContext hwContext, if (drmRmMap(info->drmFD, ctx_info->sarea_handle) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "[DRI] could not remove private sarea for ctx id (%d)\n", + "[dri] could not remove private sarea for ctx id (%d)\n", (int)hwContext); } #endif @@ -536,7 +539,7 @@ static void RADEONDRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 indx) pSAREAPriv->boxes, pSAREAPriv->nbox); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "DRIInitBuffers timed out, resetting engine...\n"); + "[dri] DRIInitBuffers timed out, resetting engine...\n"); RADEONEngineReset(pScrn); RADEONEngineRestore(pScrn); RADEONCP_RESET(pScrn, info); @@ -1120,7 +1123,7 @@ static void RADEONDRISAREAInit(ScreenPtr pScreen, break; default: xf86DrvMsg(pScreen->myNum, X_ERROR, - "RADEONDRISAREAInit failed: Unsupported depth (%d bpp)\n", + "[dri] RADEONDRISAREAInit failed: Unsupported depth (%d bpp). Disabling DRI.\n", info->CurrentLayout.pixel_code); return; } @@ -1304,7 +1307,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE; if (!xf86LoaderCheckSymbol("DRIQueryVersion")) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "RADEONDRIScreenInit failed (libdri.a too old)\n"); + "[dri] RADEONDRIScreenInit failed (libdri.a too old)\n"); return FALSE; } @@ -1312,18 +1315,21 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) DRIQueryVersion(&major, &minor, &patch); if (major != 4 || minor < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "RADEONDRIScreenInit failed " - "(DRI version = %d.%d.%d, expected 4.0.x). " - "Disabling DRI.\n", + "[dri] RADEONDRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] Disabling DRI.\n", major, minor, patch); return FALSE; } switch (info->CurrentLayout.pixel_code) { case 8: - /* These modes are not supported (yet). */ case 15: case 24: + /* These modes are not supported (yet). */ + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] RADEONInitVisualConfigs failed (depth %d not supported). " + "Disabling DRI.\n", info->CurrentLayout.pixel_code); return FALSE; /* Only 16 and 32 color depths are supports currently. */ @@ -1401,7 +1407,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) pDRIInfo->createDummyCtxPriv = FALSE; if (!DRIScreenInit(pScreen, pDRIInfo, &info->drmFD)) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "DRIScreenInit failed!\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] DRIScreenInit failed. Disabling DRI.\n"); xfree(pDRIInfo->devPrivate); pDRIInfo->devPrivate = NULL; DRIDestroyInfoRec(pDRIInfo); @@ -1416,12 +1422,12 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) version->version_minor < 1) { /* incompatible drm version */ xf86DrvMsg(pScreen->myNum, X_ERROR, - "RADEONDRIScreenInit failed " - "(DRM version = %d.%d.%d, expected 1.1.x). " - "Disabling DRI.\n", - version->version_major, - version->version_minor, - version->version_patchlevel); + "[dri] RADEONDRIScreenInit failed because of a version mismatch.\n" + "[dri] radeon.o kernel module version is %d.%d.%d but version 1.1.x is needed.\n" + "[dri] Disabling DRI.\n", + version->version_major, + version->version_minor, + version->version_patchlevel); drmFreeVersion(version); RADEONDRICloseScreen(pScreen); return FALSE; @@ -1438,7 +1444,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) /* Initialize PCI */ if (info->IsPCI) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "PCI cards not yet supported\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] PCI cards not yet supported. Disabling DRI.\n"); RADEONDRICloseScreen(pScreen); return FALSE; } @@ -1447,9 +1453,9 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) if (!info->IsPCI && !RADEONDRIAgpInit(info, pScreen)) { info->IsPCI = TRUE; xf86DrvMsg(pScreen->myNum, X_WARNING, - "AGP failed to initialize -- falling back to PCI mode.\n"); + "[agp] AGP failed to initialize -- falling back to PCI mode.\n"); xf86DrvMsg(pScreen->myNum, X_WARNING, - "Make sure you have the agpgart kernel module loaded.\n"); + "[agp] Make sure you have the agpgart kernel module loaded.\n"); } /* Initialize PCI */ @@ -1473,7 +1479,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen) RADEONDRICloseScreen(pScreen); return FALSE; } - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Visual configs initialized\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] Visual configs initialized\n"); return TRUE; } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c index 622e3a6d2..8a6daa5be 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c @@ -345,7 +345,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE; if (!xf86LoaderCheckSymbol("DRIQueryVersion")) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "GLINTDRIScreenInit failed (libdri.a too old)\n"); + "[dri] GLINTDRIScreenInit failed (libdri.a too old)\n"); return FALSE; } @@ -355,7 +355,9 @@ GLINTDRIScreenInit(ScreenPtr pScreen) DRIQueryVersion(&major, &minor, &patch); if (major != 4 || minor < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "GLINTDRIScreenInit failed (DRI version = %d.%d.%d, expected 4.0.x). Disabling DRI.\n", + "[dri] GLINTDRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] Disabling DRI.\n", major, minor, patch); return FALSE; } @@ -446,10 +448,12 @@ GLINTDRIScreenInit(ScreenPtr pScreen) version->version_minor < 0) { /* incompatible drm version */ xf86DrvMsg(pScreen->myNum, X_ERROR, - "GLINTDRIScreenInit failed (DRM version = %d.%d.%d, expected 1.0.x). Disabling DRI.\n", - version->version_major, - version->version_minor, - version->version_patchlevel); + "[dri] GLINTDRIScreenInit failed because of a version mismatch.\n" + "[dri] gamma.o kernel module version is %d.%d.%d but version 1.0.x is needed.\n" + "[dri] Disabling DRI.\n", + version->version_major, + version->version_minor, + version->version_patchlevel); GLINTDRICloseScreen(pScreen); drmFreeVersion(version); return FALSE; @@ -622,7 +626,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) DRICloseScreen(pScreen); return FALSE; } - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configs initialized\n" ); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] visual configs initialized.\n" ); return TRUE; } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c index 4831f4ab2..f04b9e5be 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c @@ -60,7 +60,7 @@ Bool I810CleanupDma(ScrnInfoPtr pScrn) ret_val = drmI810CleanupDma(pI810->drmSubFD); if (ret_val == FALSE) - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I810 Dma Cleanup Failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[dri] I810 Dma Cleanup Failed\n"); return ret_val; } @@ -88,7 +88,10 @@ Bool I810InitDma(ScrnInfoPtr pScrn) info.pitch_bits = pI810->auxPitchBits; ret_val = drmI810InitDma(pI810->drmSubFD, &info); - if(ret_val == FALSE) ErrorF("I810 Dma Initialization Failed\n"); + if(ret_val == FALSE) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[drm] I810 Dma Initialization failed.\n"); + } return ret_val; } @@ -232,7 +235,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE; if (!xf86LoaderCheckSymbol("DRIQueryVersion")) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "TDFXDRIScreenInit failed (libdri.a too old)\n"); + "[dri] TDFXDRIScreenInit failed (libdri.a too old)\n"); return FALSE; } @@ -242,7 +245,9 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) DRIQueryVersion(&major, &minor, &patch); if (major != 4 || minor < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "I810DRIScreenInit failed (DRI version = %d.%d.%d, expected 4.0.x). Disabling DRI.\n", + "[dri] I810DRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version is %d.%d.%d bug version 4.0.x is needed.\n" + "[dri] Disabling DRI.\n", major, minor, patch); return FALSE; } @@ -250,7 +255,8 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) pDRIInfo = DRICreateInfoRec(); if (!pDRIInfo) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "DRICreateInfoRec failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] DRICreateInfoRec failed. Disabling DRI.\n"); return FALSE; } @@ -289,7 +295,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) * in the SAREA header */ if (sizeof(XF86DRISAREARec)+sizeof(I810SAREARec)>SAREA_MAX) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "Data does not fit in SAREA\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[dri] Data does not fit in SAREA\n"); return FALSE; } pDRIInfo->SAREASize = SAREA_MAX; @@ -317,7 +323,8 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) * to allocate it. Scary stuff, hold on... */ if (!DRIScreenInit(pScreen, pDRIInfo, &pI810->drmSubFD)) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "DRIScreenInit failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] DRIScreenInit failed. Disabling DRI.\n"); xfree(pDRIInfo->devPrivate); pDRIInfo->devPrivate=0; DRIDestroyInfoRec(pI810->pDRIInfo); @@ -333,7 +340,9 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) version->version_minor < 1) { /* incompatible drm version */ xf86DrvMsg(pScreen->myNum, X_ERROR, - "I810DRIScreenInit failed (DRM version = %d.%d.%d, expected 1.0.x). Disabling DRI.\n", + "[dri] I810DRIScreenInit failed because of a version mismatch.\n" + "[dri] i810.o kernel module version is %d.%d.%d but version 1.0.x is needed.\n" + "[dri] Disabling DRI.\n", version->version_major, version->version_minor, version->version_patchlevel); @@ -348,7 +357,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) pI810DRI->regsSize=I810_REG_SIZE; if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->MMIOAddr, pI810DRI->regsSize, DRM_REGISTERS, 0, &pI810DRI->regs)<0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(regs) failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(regs) failed\n"); DRICloseScreen(pScreen); return FALSE; } @@ -365,14 +374,14 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) /* Agp Support - Need this just to get the framebuffer. */ if(drmAgpAcquire(pI810->drmSubFD) < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpAquire failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] drmAgpAquire failed\n"); DRICloseScreen(pScreen); return FALSE; } pI810->agpAcquired = TRUE; if (drmAgpEnable(pI810->drmSubFD, 0) < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpEnable failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] drmAgpEnable failed\n"); DRICloseScreen(pScreen); return FALSE; } @@ -388,7 +397,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) drmAgpAlloc(pI810->drmSubFD, 4096 * 1024, 1, NULL, &dcacheHandle); pI810->dcacheHandle = dcacheHandle; - xf86DrvMsg(pScreen->myNum, X_INFO, "dcacheHandle : %p\n", dcacheHandle); + xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] dcacheHandle : %p\n", dcacheHandle); #define Elements(x) sizeof(x)/sizeof(*x) for (pitch_idx = 0 ; pitch_idx < Elements(i810_pitches) ; pitch_idx++) @@ -397,7 +406,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if (pitch_idx == Elements(i810_pitches)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Couldn't find depth/back buffer pitch"); + "[dri] Couldn't find depth/back buffer pitch"); DRICloseScreen(pScreen); return FALSE; } @@ -409,7 +418,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) sysmem_size = pScrn->videoRam * 1024; if (dcacheHandle != 0) { if (back_size > 4*1024*1024) { - xf86DrvMsg(pScreen->myNum, X_INFO, "Backsize is larger then 4 meg\n"); + xf86DrvMsg(pScreen->myNum, X_INFO, "[dri] Backsize is larger then 4 meg\n"); sysmem_size = sysmem_size - 2*back_size; drmAgpFree(pI810->drmSubFD, dcacheHandle); pI810->dcacheHandle = dcacheHandle = 0; @@ -426,7 +435,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) sysmem_size = 48*1024*1024; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "User requested more memory then fits in the agp aperture\n" + "[dri] User requested more memory then fits in the agp aperture\n" "Truncating to %d bytes of memory\n", sysmem_size); } @@ -445,7 +454,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if(drmAgpBind(pI810->drmSubFD, dcacheHandle, 48*1024*1024) == 0) { memset (&pI810->DcacheMem, 0, sizeof(I810MemRange)); xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "GART: Found 4096K Z buffer memory\n"); + "[agp] GART: Found 4096K Z buffer memory\n"); pI810->DcacheMem.Start = 48*1024*1024; pI810->DcacheMem.Size = 1024 * 4096; pI810->DcacheMem.End = pI810->DcacheMem.Start + pI810->DcacheMem.Size; @@ -454,17 +463,17 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) back_size)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Depth buffer allocation failed\n"); + "[agp] Depth buffer allocation failed\n"); DRICloseScreen(pScreen); return FALSE; } } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GART: dcache bind failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[agp] GART: dcache bind failed\n"); drmAgpFree(pI810->drmSubFD, dcacheHandle); pI810->dcacheHandle = dcacheHandle = 0; } } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GART: no dcache memory found\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[agp] GART: no dcache memory found\n"); } drmAgpAlloc(pI810->drmSubFD, back_size, 0, NULL, &agpHandle); @@ -474,20 +483,21 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) /* The backbuffer is always aligned to the 56 mb mark in the aperture */ if(drmAgpBind(pI810->drmSubFD, agpHandle, 56*1024*1024) == 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Bound backbuffer memory\n"); + "[agp] Bound backbuffer memory\n"); pI810->BackBuffer.Start = 56*1024*1024; pI810->BackBuffer.Size = back_size; pI810->BackBuffer.End = (pI810->BackBuffer.Start + pI810->BackBuffer.Size); } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Unable to bind backbuffer\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "[agp] Unable to bind backbuffer. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Unable to allocate backbuffer memory\n"); + "[dri] Unable to allocate backbuffer memory. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -500,20 +510,20 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if(agpHandle != 0) { if(drmAgpBind(pI810->drmSubFD, agpHandle, 48*1024*1024) == 0) { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Bound depthbuffer memory\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[agp] Bound depthbuffer memory\n"); pI810->DepthBuffer.Start = 48*1024*1024; pI810->DepthBuffer.Size = back_size; pI810->DepthBuffer.End = (pI810->DepthBuffer.Start + pI810->DepthBuffer.Size); } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Unable to bind depthbuffer\n"); + "[agp] Unable to bind depthbuffer. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Unable to allocate depthbuffer memory\n"); + "[agp] Unable to allocate depthbuffer memory. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -524,14 +534,14 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) */ drmAgpAlloc(pI810->drmSubFD, sysmem_size, 0, NULL, &agpHandle); if (agpHandle == 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpAlloc failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] drmAgpAlloc failed\n"); DRICloseScreen(pScreen); return FALSE; } pI810->sysmemHandle = agpHandle; if (drmAgpBind(pI810->drmSubFD, agpHandle, 0) != 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpBind failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] drmAgpBind failed\n"); DRICloseScreen(pScreen); return FALSE; } @@ -545,17 +555,17 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if (drmAgpBind(pI810->drmSubFD, agpHandle, tom) == 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "GART: Allocated 4K for mouse cursor image\n"); + "[agp] GART: Allocated 4K for mouse cursor image\n"); pI810->CursorStart = tom; tom += 4096; } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GART: cursor bind failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[agp] GART: cursor bind failed\n"); pI810->CursorPhysical = 0; } } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GART: cursor alloc failed\n"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[agp] GART: cursor alloc failed\n"); pI810->CursorPhysical = 0; } @@ -587,7 +597,8 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->BackBuffer.Start, pI810->BackBuffer.Size, DRM_AGP, 0, &pI810DRI->backbuffer) < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(backbuffer) failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[drm] drmAddMap(backbuffer) failed. Disabling DRI\n"); DRICloseScreen(pScreen); return FALSE; } @@ -596,7 +607,8 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->DepthBuffer.Start, pI810->DepthBuffer.Size, DRM_AGP, 0, &pI810DRI->depthbuffer) < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(depthbuffer) failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[drm] drmAddMap(depthbuffer) failed. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -611,21 +623,22 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) I810AllocHigh( &(pI810->BufferMem), &(pI810->SysMem), I810_DMA_BUF_NR * I810_DMA_BUF_SZ); - xf86DrvMsg(pScreen->myNum, X_INFO, "Buffer map : %lx\n", + xf86DrvMsg(pScreen->myNum, X_INFO, "[dri] Buffer map : %lx\n", pI810->BufferMem.Start); if (pI810->BufferMem.Start == 0 || pI810->BufferMem.End - pI810->BufferMem.Start > I810_DMA_BUF_NR * I810_DMA_BUF_SZ) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "Not enough memory for dma buffers\n"); + "[dri] Not enough memory for dma buffers. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->BufferMem.Start, pI810->BufferMem.Size, DRM_AGP, 0, &pI810->buffer_map) < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(buffer_map) failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[drm] drmAddMap(buffer_map) failed. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -636,7 +649,8 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->LpRing.mem.Start, pI810->LpRing.mem.Size, DRM_AGP, 0, &pI810->ring_map) < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(ring_map) failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[drm] drmAddMap(ring_map) failed. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -653,7 +667,8 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) pI810DRI->textureSize = (pI810DRI->textureSize >> i) << i; /* truncate */ if(pI810DRI->textureSize < 512*1024) { - ErrorF("Less then 512k for textures\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[drm] Less then 512k memory left for textures. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -664,7 +679,8 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->TexMem.Start, pI810->TexMem.Size, DRM_AGP, 0, &pI810DRI->textures) < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(textures) failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[drm] drmAddMap(textures) failed. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -674,7 +690,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) I810_DMA_BUF_SZ, DRM_AGP_BUFFER, pI810->BufferMem.Start)) <= 0) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "[drm] failure adding %d %d byte DMA buffers\n", + "[drm] failure adding %d %d byte DMA buffers. Disabling DRI.\n", I810_DMA_BUF_NR, I810_DMA_BUF_SZ); DRICloseScreen(pScreen); @@ -702,7 +718,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] failure adding irq handler, there is a device " "already using that irq\n Consider rearranging your " - "PCI cards\n"); + "PCI cards. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } @@ -738,12 +754,13 @@ Bool I810DRIScreenInit(ScreenPtr pScreen) pI810DRI->sarea_priv_offset = sizeof(XF86DRISAREARec); if (!(I810InitVisualConfigs(pScreen))) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "I810InitVisualConfigs failed\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] I810InitVisualConfigs failed. Disabling DRI.\n"); DRICloseScreen(pScreen); return FALSE; } - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configs initialized\n" ); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] visual configs initialized.\n" ); pI810->pDRIInfo->driverSwapMethod = DRI_HIDE_X_CONTEXT; return TRUE; diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c index ab79946cd..8be907de6 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c @@ -355,7 +355,7 @@ static void MGAWaitForIdleDMA( ScrnInfoPtr pScrn ) return; xf86DrvMsg( pScrn->scrnIndex, X_ERROR, - "Idle timed out, resetting engine...\n" ); + "[dri] Idle timed out, resetting engine...\n" ); drmMGAEngineReset( pMga->drmFD ); } @@ -919,7 +919,7 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) if ( !xf86LoaderCheckSymbol( "drmAvailable" ) ) return FALSE; if ( !xf86LoaderCheckSymbol( "DRIQueryVersion" ) ) { xf86DrvMsg( pScreen->myNum, X_ERROR, - "MGADRIScreenInit failed (libdri.a too old)\n" ); + "[dri] MGADRIScreenInit failed (libdri.a too old)\n" ); return FALSE; } @@ -927,11 +927,11 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) { int major, minor, patch; DRIQueryVersion( &major, &minor, &patch ); - if ( major != 4 || minor < 0) { + if ( major != 4 || minor < 0 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, - "[drm] MGADRIScreenInit failed " - "(DRI version = %d.%d.%d, expected 4.0.x). " - "Disabling DRI.\n", + "[dri] MGADRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version = %d.%d.%d but version 4.0.x is needed.\n" + "[dri] Disabling the DRI.\n", major, minor, patch ); return FALSE; } @@ -944,14 +944,14 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) if ( (pScrn->bitsPerPixel / 8) != 2 && (pScrn->bitsPerPixel / 8) != 4 ) { xf86DrvMsg( pScreen->myNum, X_ERROR, - "[drm] Direct rendering only supported in 16 and 32 bpp modes\n" ); + "[dri] Direct rendering only supported in 16 and 32 bpp modes\n" ); return FALSE; } pDRIInfo = DRICreateInfoRec(); if ( !pDRIInfo ) { xf86DrvMsg( pScreen->myNum, X_ERROR, - "[drm] DRICreateInfoRec() failed\n" ); + "[dri] DRICreateInfoRec() failed\n" ); return FALSE; } pMga->pDRIInfo = pDRIInfo; @@ -1059,7 +1059,7 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) DRIDestroyInfoRec( pMga->pDRIInfo ); pMga->pDRIInfo = 0; xf86DrvMsg( pScreen->myNum, X_ERROR, - "[drm] DRIScreenInit Failed\n" ); + "[drm] DRIScreenInit failed. Disabling DRI.\n" ); return FALSE; } @@ -1068,12 +1068,12 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) drmVersionPtr version = drmGetVersion(pMga->drmFD); if ( version ) { if ( version->version_major != 3 || - version->version_minor < 0) { + version->version_minor < 0 ) { /* incompatible drm version */ xf86DrvMsg( pScreen->myNum, X_ERROR, - "[drm] MGADRIScreenInit failed " - "(DRM version = %d.%d.%d, expected 3.0.x). " - "Disabling DRI.\n", + "[dri] MGADRIScreenInit failed because of a version mismatch.\n" + "[dri] mga.o kernel module version is %d.%d.%d but version 3.0.x is needed.\n" + "[dri] Disabling DRI.\n", version->version_major, version->version_minor, version->version_patchlevel ); @@ -1117,7 +1117,7 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) DRICloseScreen( pScreen ); return FALSE; } - xf86DrvMsg( pScrn->scrnIndex, X_INFO, "visual configs initialized\n" ); + xf86DrvMsg( pScrn->scrnIndex, X_INFO, "[dri] visual configs initialized\n" ); return TRUE; } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c index ae6fe3878..fd4ca7849 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dri.c @@ -158,7 +158,7 @@ SISInitVisualConfigs(ScreenPtr pScreen) } if (i != numConfigs) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "[drm] Incorrect initialization of visuals\n"); + "[dri] Incorrect initialization of visuals. Disabling DRI.\n"); return FALSE; } break; @@ -178,6 +178,7 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) SISPtr pSIS = SISPTR(pScrn); DRIInfoPtr pDRIInfo; SISDRIPtr pSISDRI; + drmVersionPtr version; /* Check that the GLX, DRI, and DRM modules have been loaded by testing * for canonical symbols in each module. */ @@ -186,7 +187,7 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) if (!xf86LoaderCheckSymbol("drmAvailable")) return FALSE; if (!xf86LoaderCheckSymbol("DRIQueryVersion")) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "SISDRIScreenInit failed (libdri.a too old)\n"); + "[dri] SISDRIScreenInit failed (libdri.a too old)\n"); return FALSE; } @@ -196,7 +197,9 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) DRIQueryVersion(&major, &minor, &patch); if (major != 4 || minor < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "[drm] SISDRIScreenInit failed (DRI version = %d.%d.%d, expected 4.0.x). Disabling DRI.\n", + "[dri] SISDRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] Disabling DRI.\n", major, minor, patch); return FALSE; } @@ -266,6 +269,8 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) pDRIInfo->createDummyCtxPriv = FALSE; if (!DRIScreenInit(pScreen, pDRIInfo, &pSIS->drmSubFD)) { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] DRIScreenInit failed. Disabling DRI.\n"); xfree(pDRIInfo->devPrivate); pDRIInfo->devPrivate=0; DRIDestroyInfoRec(pSIS->pDRIInfo); @@ -274,6 +279,28 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) return FALSE; } +#if 000 + /* XXX Check DRM kernel version here */ + version = drmGetVersion(info->drmFD); + if (version) { + if (version->version_major != 1 || + version->version_minor < 0) { + /* incompatible drm version */ + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] SISDRIScreenInit failed because of a version mismatch.\n" + "[dri] sis.o kernel module version is %d.%d.%d but version 1.0.x is needed.\n" + "[dri] Disabling the DRI.\n", + version->version_major, + version->version_minor, + version->version_patchlevel); + drmFreeVersion(version); + R128DRICloseScreen(pScreen); + return FALSE; + } + drmFreeVersion(version); + } +#endif + pSISDRI->regs.size = SISIOMAPSIZE; pSISDRI->regs.map = 0; if (drmAddMap(pSIS->drmSubFD, (drmHandle)pSIS->IOAddress, @@ -372,7 +399,7 @@ Bool SISDRIScreenInit(ScreenPtr pScreen) SISDRICloseScreen(pScreen); return FALSE; } - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configs initialized\n" ); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[dri] visual configs initialized.\n" ); return TRUE; } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c index e56a9f55d..eaf1d1969 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dri.c @@ -217,16 +217,17 @@ FFBDRIScreenInit(ScreenPtr pScreen) /* Check the DRI version */ { - int major, minor, patch; - DRIQueryVersion(&major, &minor, &patch); - if (major != 3 || minor != 1 || patch < 0) { - xf86DrvMsg(pScreen->myNum, X_ERROR, - "[drm] SISDRIScreenInit failed (DRI version = %d.%d.%d, " - "expected 3.1.x). Disabling DRI.\n", - major, minor, patch); - return FALSE; - } - } + int major, minor, patch; + DRIQueryVersion(&major, &minor, &patch); + if (major != 3 || minor != 1 || patch < 0) { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] FFBDRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version is %d.%d.%d but version 3.1.x is needed.\n" + "[dri] Disabling DRI.\n", + major, minor, patch); + return FALSE; + } + } pDRIInfo = DRICreateInfoRec(); if (pDRIInfo == NULL) @@ -277,11 +278,35 @@ FFBDRIScreenInit(ScreenPtr pScreen) pDRIInfo->createDummyCtxPriv = FALSE; if (!DRIScreenInit(pScreen, pDRIInfo, &(pFfb->drmSubFD))) { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] DRIScreenInit failed. Disabling DRI.\n"); DRIDestroyInfoRec(pFfb->pDRIInfo); xfree(pFfbDRI); return FALSE; } +#if 000 /* XXX this should be cleaned up and used */ + /* Check the ffb DRM version */ + version = drmGetVersion(info->drmFD); + if (version) { + if (version->version_major != 1 || + version->version_minor < 0) { + /* incompatible drm version */ + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] FFBDRIScreenInit failed because of a version mismatch.\n" + "[dri] ffb.o kernel module version is %d.%d.%d but version 1.0.x is needed.\n" + "[dri] Disabling the DRI.\n", + version->version_major, + version->version_minor, + version->version_patchlevel); + drmFreeVersion(version); + R128DRICloseScreen(pScreen); + return FALSE; + } + drmFreeVersion(version); + } +#endif + pFfb->pFfbSarea = DRIGetSAREAPrivate(pScreen); init_ffb_sarea(pFfb, pFfb->pFfbSarea); diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c index 5b91ad1ac..3591cc9b7 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c @@ -132,7 +132,7 @@ TDFXInitVisualConfigs(ScreenPtr pScreen) } if (i!=numConfigs) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "Incorrect initialization of visuals\n"); + "[dri] TDFXInitVisualConfigs: wrong number of visuals\n"); return FALSE; } break; /* 16bpp */ @@ -227,7 +227,7 @@ TDFXInitVisualConfigs(ScreenPtr pScreen) } if (i!=numConfigs) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "Incorrect initialization of visuals\n"); + "[dri] TDFXInitVisualConfigs: wrong number of visuals\n"); return FALSE; } break; @@ -269,20 +269,20 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) switch (pScrn->bitsPerPixel) { case 8: xf86DrvMsg(pScreen->myNum, X_ERROR, - "DRI not supported in 8 bpp mode, disabling DRI.\n"); + "[dri] tdfx DRI not supported in 8 bpp mode, disabling DRI.\n"); return FALSE; case 16: break; case 24: xf86DrvMsg(pScreen->myNum, X_ERROR, - "DRI not supported in 24 bpp mode, disabling DRI.\n"); + "[dri] tdfx DRI not supported in 24 bpp mode, disabling DRI.\n"); return FALSE; case 32: if (pTDFX->ChipType<=PCI_CHIP_VOODOO3) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "DRI requires Voodoo4/5 in 32 bpp mode, disabling DRI.\n"); + "[dri] DRI requires Voodoo4/5 in 32 bpp mode, disabling DRI.\n"); xf86DrvMsg(pScreen->myNum, X_INFO, - "To use DRI, invoke the server using 16 bpp (depth 16).\n"); + "[dri] To use DRI, invoke the server using 16 bpp (depth 16).\n"); return FALSE; } } @@ -304,7 +304,9 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) DRIQueryVersion(&major, &minor, &patch); if (major != 4 || minor < 0) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "TDFXDRIScreenInit failed (DRI version = %d.%d.%d, expected 4.0.x). Disabling DRI.\n", + "[dri] TDFXDRIScreenInit failed because of a version mismatch.\n" + "[dri] libDRI version is %d.%d.%d but version 4.0.x is needed.\n" + "[dri] Disabling the DRI.\n", major, minor, patch); return FALSE; } @@ -313,7 +315,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) pDRIInfo = DRICreateInfoRec(); if (!pDRIInfo) { xf86DrvMsg(pScreen->myNum, X_ERROR, - "DRICreateInfoRect() failed, disabling DRI.\n"); + "[dri] DRICreateInfoRect() failed, disabling DRI.\n"); return FALSE; } @@ -363,7 +365,8 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) #endif if (!(pTDFXDRI = (TDFXDRIPtr)xcalloc(sizeof(TDFXDRIRec),1))) { - xf86DrvMsg(pScreen->myNum, X_ERROR, "DRI memory allocation failed, disabling DRI.\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] DRI memory allocation failed, disabling DRI.\n"); DRIDestroyInfoRec(pTDFX->pDRIInfo); pTDFX->pDRIInfo=0; return FALSE; @@ -391,7 +394,8 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) pDRIInfo->devPrivate=0; DRIDestroyInfoRec(pTDFX->pDRIInfo); pTDFX->pDRIInfo=0; - xf86DrvMsg(pScreen->myNum, X_ERROR, "DRIScreenInit failed, disabling DRI.\n"); + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[dri] DRIScreenInit failed, disabling DRI.\n"); return FALSE; } @@ -404,7 +408,9 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) version->version_minor < 0) { /* incompatible drm version */ xf86DrvMsg(pScreen->myNum, X_ERROR, - "TDFXDRIScreenInit failed (DRM version = %d.%d.%d, expected 1.0.x). Disabling DRI.\n", + "[dri] TDFXDRIScreenInit failed because of a version mismatch.\n" + "[dri] tdfx.o kernel module version is %d.%d.%d but version 1.0.x is needed.\n" + "[dri] Disabling the DRI.\n", version->version_major, version->version_minor, version->version_patchlevel); |