diff options
author | Adam Jackson <ajax@nwnk.net> | 2004-07-30 20:30:52 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2004-07-30 20:30:52 +0000 |
commit | dd173d29d2c2bd73bea8eef018b1c6dd6b7a967c (patch) | |
tree | fcb6ff7b31b14ed6a4c04b1a7f21db98472bf0b5 /src | |
parent | e12aa54892259cdfef7c0f9419b58f0b9d4163d7 (diff) |
Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all
framebuffer formats except cfb and the overlay modes should work, and
r128 and radeon need to be loaded from the ati driver (both issues to
be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga
drivers. elfloader users shouldn't be affected.
Diffstat (limited to 'src')
-rw-r--r-- | src/mga_dac3026.c | 2 | ||||
-rw-r--r-- | src/mga_dacG.c | 2 | ||||
-rw-r--r-- | src/mga_driver.c | 15 | ||||
-rw-r--r-- | src/mga_storm.c | 16 |
4 files changed, 20 insertions, 15 deletions
diff --git a/src/mga_dac3026.c b/src/mga_dac3026.c index e997eec..58aacdc 100644 --- a/src/mga_dac3026.c +++ b/src/mga_dac3026.c @@ -1282,6 +1282,6 @@ void MGA2064SetupFuncs(ScrnInfoPtr pScrn) pMga->ModeInit = MGA3026Init; pMga->ddc1Read = MGA3026_ddc1Read; /* vgaHWddc1SetSpeed will only work if the card is in VGA mode */ - pMga->DDC1SetSpeed = vgaHWddc1SetSpeed; + pMga->DDC1SetSpeed = LoaderSymbol("vgaHWddc1SetSpeed"); pMga->i2cInit = MGA3026_i2cInit; } diff --git a/src/mga_dacG.c b/src/mga_dacG.c index 7496020..e9ec043 100644 --- a/src/mga_dacG.c +++ b/src/mga_dacG.c @@ -1331,7 +1331,7 @@ void MGAGSetupFuncs(ScrnInfoPtr pScrn) pMga->ModeInit = MGAGInit; pMga->ddc1Read = MGAG_ddc1Read; /* vgaHWddc1SetSpeed will only work if the card is in VGA mode */ - pMga->DDC1SetSpeed = vgaHWddc1SetSpeed; + pMga->DDC1SetSpeed = LoaderSymbol("vgaHWddc1SetSpeed"); pMga->i2cInit = MGAG_i2cInit; } diff --git a/src/mga_driver.c b/src/mga_driver.c index c6e2c07..d0bc9b2 100644 --- a/src/mga_driver.c +++ b/src/mga_driver.c @@ -267,7 +267,7 @@ static const char *xaaSymbols[] = { "XAACachePlanarMonoStipple", "XAACreateInfoRec", "XAADestroyInfoRec", - "XAAFallbackOps", + "XAAGetFallbackOps", "XAAInit", "XAAMoveDWORDS", "XAA_888_plus_PICT_a8_to_8888", @@ -1029,7 +1029,7 @@ MGAdoDDC(ScrnInfoPtr pScrn) return NULL; } else { /* XXX Need to write an MGA mode ddc1SetSpeed */ - if (pMga->DDC1SetSpeed == vgaHWddc1SetSpeed) { + if (pMga->DDC1SetSpeed == LoaderSymbol("vgaHWddc1SetSpeed")) { pMga->DDC1SetSpeed = NULL; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 2, "DDC1 disabled - chip not in VGA mode\n"); @@ -1692,11 +1692,11 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags) xf86LoaderReqSymLists(fbdevHWSymbols, NULL); if (!fbdevHWInit(pScrn, pMga->PciInfo, NULL)) return FALSE; - pScrn->SwitchMode = fbdevHWSwitchMode; - pScrn->AdjustFrame = fbdevHWAdjustFrame; + pScrn->SwitchMode = LoaderSymbol("fbdevHWSwitchMode"); + pScrn->AdjustFrame = LoaderSymbol("fbdevHWAdjustFrame"); pScrn->EnterVT = MGAEnterVTFBDev; - pScrn->LeaveVT = fbdevHWLeaveVT; - pScrn->ValidMode = fbdevHWValidMode; + pScrn->LeaveVT = LoaderSymbol("fbdevHWLeaveVT"); + pScrn->ValidMode = LoaderSymbol("fbdevHWValidMode"); } pMga->Rotate = 0; if ((s = xf86GetOptValString(pMga->Options, OPTION_ROTATE))) { @@ -3428,7 +3428,8 @@ MGAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) else f = CMAP_RELOAD_ON_MODE_SWITCH; if(!xf86HandleColormaps(pScreen, 256, 8, - (pMga->FBDev ? fbdevHWLoadPalette : MGAdac->LoadPalette), NULL, f)) + pMga->FBDev ? LoaderSymbol("fbdevHWLoadPalette") : MGAdac->LoadPalette, + NULL, f)) return FALSE; if(pMga->Overlay8Plus24) { /* Must come after colormap initialization */ diff --git a/src/mga_storm.c b/src/mga_storm.c index ff083ac..88f6cc8 100644 --- a/src/mga_storm.c +++ b/src/mga_storm.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c,v 1.98 2003/01/16 16:09:10 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c,v 1.99tsi Exp $ */ /* All drivers should typically include these */ @@ -745,7 +745,7 @@ MGANAME(AccelInit)(ScreenPtr pScreen) infoPtr->SubsequentScreenToScreenColorExpandFill = MGANAME(SubsequentPlanarScreenToScreenColorExpandFill); infoPtr->CacheColorExpandDensity = PSZ; - infoPtr->CacheMonoStipple = XAACachePlanarMonoStipple; + infoPtr->CacheMonoStipple = LoaderSymbol("XAACachePlanarMonoStipple"); /* It's faster to blit the stipples if you have fastbilt */ if(pMga->HasFBitBlt) infoPtr->ScreenToScreenColorExpandFillFlags = TRANSPARENCY_ONLY; @@ -1076,7 +1076,9 @@ MGAStormSync(ScrnInfoPtr pScrn) CHECK_DMA_QUIESCENT(pMga, pScrn); - while(MGAISBUSY()); + /* This reportedly causes a freeze for the Mystique. */ + if (pMga->Chipset != PCI_CHIP_MGA1064) + while(MGAISBUSY()); /* flush cache before a read (mga-1064g 5.1.6) */ OUTREG8(MGAREG_CRTC_INDEX, 0); if(pMga->AccelFlags & CLIPPER_ON) { @@ -2359,16 +2361,18 @@ MGAPolyPoint ( BoxPtr pbox; MGAPtr pMga; int xorg, yorg; + ScrnInfoPtr pScrn; if(!numRects) return; if(numRects != 1) { - XAAFallbackOps.PolyPoint(pDraw, pGC, mode, npt, ppt); + XAAGetFallbackOps()->PolyPoint(pDraw, pGC, mode, npt, ppt); return; } infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - pMga = MGAPTR(infoRec->pScrn); + pScrn = infoRec->pScrn; + pMga = MGAPTR(pScrn); xorg = pDraw->x; yorg = pDraw->y; @@ -2415,7 +2419,7 @@ MGAValidatePolyPoint( MGAPtr pMga = MGAPTR(pScrn); Bool fullPlanemask = TRUE; - pGC->ops->PolyPoint = XAAFallbackOps.PolyPoint; + pGC->ops->PolyPoint = XAAGetFallbackOps()->PolyPoint; if((pGC->planemask & pMga->AccelInfoRec->FullPlanemask) != pMga->AccelInfoRec->FullPlanemask) |