From 51db34c7c634df463d2636a8d0a49828af6cca34 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Wed, 15 Sep 2004 16:33:58 +0000 Subject: Pull XORG-6_8_0 to CYGWIN branch --- src/glint_dri.c | 32 ++++++++++++++++++-------------- src/glint_dripriv.h | 2 +- src/glint_driver.c | 24 +++++++++++++----------- src/pm3_accel.c | 3 ++- 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/glint_dri.c b/src/glint_dri.c index 7b34f2a..c6d8c9c 100644 --- a/src/glint_dri.c +++ b/src/glint_dri.c @@ -54,7 +54,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static char GLINTKernelDriverName[] = "gamma"; static char GLINTClientDriverName[] = "gamma"; -static void GLINTDestroyContext(ScreenPtr pScreen, drmContext hwContext, +static void GLINTDestroyContext(ScreenPtr pScreen, drm_context_t hwContext, DRIContextType contextStore); @@ -166,7 +166,7 @@ GLINTInitVisualConfigs(ScreenPtr pScreen) } else { pConfigs[i].visualRating = GLX_NONE_EXT; } - pConfigs[i].transparentPixel = 0; + pConfigs[i].transparentPixel = GLX_NONE; pConfigs[i].transparentRed = 0; pConfigs[i].transparentGreen = 0; pConfigs[i].transparentBlue = 0; @@ -259,7 +259,7 @@ GLINTInitVisualConfigs(ScreenPtr pScreen) } else { pConfigs[i].visualRating = GLX_NONE_EXT; } - pConfigs[i].transparentPixel = 0; + pConfigs[i].transparentPixel = GLX_NONE; pConfigs[i].transparentRed = 0; pConfigs[i].transparentGreen = 0; pConfigs[i].transparentBlue = 0; @@ -483,11 +483,15 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* setup device info */ pDRIInfo->drmDriverName = GLINTKernelDriverName; pDRIInfo->clientDriverName = GLINTClientDriverName; - pDRIInfo->busIdString = xalloc(64); /* Freed in DRIDestroyInfoRec */ - sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", - ((pciConfigPtr)pGlint->PciInfo->thisCard)->busnum, - ((pciConfigPtr)pGlint->PciInfo->thisCard)->devnum, - ((pciConfigPtr)pGlint->PciInfo->thisCard)->funcnum); + if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) { + pDRIInfo->busIdString = DRICreatePCIBusID(pGlint->PciInfo); + } else { + pDRIInfo->busIdString = xalloc(64); /* Freed in DRIDestroyInfoRec */ + sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", + ((pciConfigPtr)pGlint->PciInfo->thisCard)->busnum, + ((pciConfigPtr)pGlint->PciInfo->thisCard)->devnum, + ((pciConfigPtr)pGlint->PciInfo->thisCard)->funcnum); + } pDRIInfo->ddxDriverMajorVersion = GLINT_MAJOR_VERSION; pDRIInfo->ddxDriverMinorVersion = GLINT_MINOR_VERSION; pDRIInfo->ddxDriverPatchVersion = GLINT_PATCHLEVEL; @@ -635,7 +639,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, first 4k page, priveledged writes */ pGlintDRI->registers0.size = 0x1000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)pGlint->IOAddress, + (drm_handle_t)pGlint->IOAddress, pGlintDRI->registers0.size, DRM_REGISTERS, DRM_READ_ONLY, &pGlintDRI->registers0.handle) < 0) @@ -650,7 +654,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, following region, client access */ pGlintDRI->registers1.size = 0xf000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)(pGlint->IOAddress + 0x1000), + (drm_handle_t)(pGlint->IOAddress + 0x1000), pGlintDRI->registers1.size, DRM_REGISTERS, 0, &pGlintDRI->registers1.handle) < 0) @@ -665,7 +669,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, second MX, first 4k page */ pGlintDRI->registers2.size = 0x1000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)(pGlint->IOAddress + 0x10000), + (drm_handle_t)(pGlint->IOAddress + 0x10000), pGlintDRI->registers2.size, DRM_REGISTERS, DRM_READ_ONLY, &pGlintDRI->registers2.handle) < 0) @@ -680,7 +684,7 @@ GLINTDRIScreenInit(ScreenPtr pScreen) /* pci region 0: control regs, second MX, following region */ pGlintDRI->registers3.size = 0xf000; if (drmAddMap( pGlint->drmSubFD, - (drmHandle)(pGlint->IOAddress + 0x11000), + (drm_handle_t)(pGlint->IOAddress + 0x11000), pGlintDRI->registers3.size, DRM_REGISTERS, 0, &pGlintDRI->registers3.handle) < 0) @@ -824,7 +828,7 @@ GLINTDRICloseScreen(ScreenPtr pScreen) Bool GLINTCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, + drm_context_t hwContext, void *pVisualConfigPriv, DRIContextType contextStore) { @@ -855,7 +859,7 @@ GLINTCreateContext(ScreenPtr pScreen, static void GLINTDestroyContext(ScreenPtr pScreen, - drmContext hwContext, + drm_context_t hwContext, DRIContextType contextStore) { } diff --git a/src/glint_dripriv.h b/src/glint_dripriv.h index 7803c4b..76dfd2b 100644 --- a/src/glint_dripriv.h +++ b/src/glint_dripriv.h @@ -41,7 +41,7 @@ extern void GlxSetVisualConfigs( extern Bool GLINTCreateContext(ScreenPtr pScreen, VisualPtr visual, - drmContext hwContext, + drm_context_t hwContext, void* pVisualConfigPriv, DRIContextType contextStore); diff --git a/src/glint_driver.c b/src/glint_driver.c index da3c6f2..ec145f4 100644 --- a/src/glint_driver.c +++ b/src/glint_driver.c @@ -294,6 +294,7 @@ static const char *ramdacSymbols[] = { "RamDacInit", "TIramdacCalculateMNPForClock", "TIramdacLoadPalette", + "TIramdacLoadPaletteWeak", "TIramdacProbe", "xf86CreateCursorInfoRec", "xf86DestroyCursorInfoRec", @@ -312,12 +313,12 @@ static const char *fbdevHWSymbols[] = { "fbdevHWGetVidmem", /* colormap */ - "fbdevHWLoadPalette", + "fbdevHWLoadPaletteWeak", /* ScrnInfo hooks */ - "fbdevHWAdjustFrame", + "fbdevHWAdjustFrameWeak", "fbdevHWEnterVT", - "fbdevHWLeaveVT", + "fbdevHWLeaveVTWeak", "fbdevHWMapMMIO", "fbdevHWMapVidmem", "fbdevHWModeInit", @@ -326,7 +327,7 @@ static const char *fbdevHWSymbols[] = { "fbdevHWSwitchMode", "fbdevHWUnmapMMIO", "fbdevHWUnmapVidmem", - "fbdevHWValidMode", + "fbdevHWValidModeWeak", NULL }; @@ -374,6 +375,7 @@ static const char *driSymbols[] = { "DRIQueryVersion", "DRIScreenInit", "GlxSetVisualConfigs", + "DRICreatePCIBusID", NULL }; #endif @@ -386,7 +388,7 @@ static XF86ModuleVersionInfo glintVersRec = MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, GLINT_MAJOR_VERSION, GLINT_MINOR_VERSION, GLINT_PATCHLEVEL, ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, @@ -932,7 +934,7 @@ GLINTProbeTIramdac(ScrnInfoPtr pScrn) pGlint->RamDacRec->WriteAddress = glintTIWriteAddress; pGlint->RamDacRec->ReadData = glintTIReadData; pGlint->RamDacRec->WriteData = glintTIWriteData; - pGlint->RamDacRec->LoadPalette = TIramdacLoadPalette; + pGlint->RamDacRec->LoadPalette = TIramdacLoadPaletteWeak(); if(!RamDacInit(pScrn, pGlint->RamDacRec)) { RamDacDestroyInfoRec(pGlint->RamDacRec); @@ -1247,9 +1249,9 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags) pGlint->FBDev = TRUE; from = X_CONFIG; - pScrn->AdjustFrame = fbdevHWAdjustFrame; - pScrn->LeaveVT = fbdevHWLeaveVT; - pScrn->ValidMode = fbdevHWValidMode; + pScrn->AdjustFrame = fbdevHWAdjustFrameWeak(); + pScrn->LeaveVT = fbdevHWLeaveVTWeak(); + pScrn->ValidMode = fbdevHWValidModeWeak(); } else { /* Only use FBDev if requested */ @@ -3103,7 +3105,7 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ((pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA) && (pGlint->MultiChip == PCI_CHIP_PERMEDIA3)) ) { if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits, - (pGlint->FBDev) ? fbdevHWLoadPalette : + (pGlint->FBDev) ? fbdevHWLoadPaletteWeak() : ((pScrn->depth == 16) ? Permedia3LoadPalette16:Permedia3LoadPalette), NULL, CMAP_RELOAD_ON_MODE_SWITCH | @@ -3115,7 +3117,7 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_PERMEDIA2) || (pGlint->Chipset == PCI_VENDOR_TI_CHIP_PERMEDIA2)) { if (!xf86HandleColormaps(pScreen, 256, pScrn->rgbBits, - (pGlint->FBDev) ? fbdevHWLoadPalette : + (pGlint->FBDev) ? fbdevHWLoadPaletteWeak() : ((pScrn->depth == 16) ? Permedia2LoadPalette16:Permedia2LoadPalette), NULL, CMAP_RELOAD_ON_MODE_SWITCH | diff --git a/src/pm3_accel.c b/src/pm3_accel.c index 9745db8..e9806c0 100644 --- a/src/pm3_accel.c +++ b/src/pm3_accel.c @@ -1,3 +1,4 @@ +/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c,v 1.2 2004/04/23 19:33:33 eich Exp $ */ /* * Copyright 2000-2001 by Sven Luther . * @@ -384,7 +385,7 @@ Permedia3InitializeEngine(ScrnInfoPtr pScrn) GLINT_SLOW_WRITE_REG(0, StartXSub); GLINT_SLOW_WRITE_REG(0, StartY); GLINT_SLOW_WRITE_REG(0, GLINTCount); - if (*pGlint->AccelInfoRec->Sync) + if (*pGlint->AccelInfoRec->Sync != NULL) (*pGlint->AccelInfoRec->Sync)(pScrn); TRACE_EXIT("Permedia3InitializeEngine"); } -- cgit v1.2.3